Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add methods ex_add/ex_delete port_forwarding_rule to CloudstackNode (similar to ip_forwarding_rule) #196
I have added port forwarding method to CloudstackNode object because class CloudstackPortForwardingRule has a method delete which doesn't work. And change call signature because node object was not in first place
And want ask about naming of port forwarding methods. We have ex_add_ip_forwarding_rule and ex_create_port_forwarding_rule maybe rename one of this?
I am not sure what you mean by 'has a method delete which doesn't work' ? what exactly does not work ? you did not seem to modify that method.
Also what do you mean by "change call signature...'
Ok to rename ex_add_ip_forwarding_rule to ex_create_ip_frowarding_rule, but we will have to keep track of the fact this will break backward compatibility.
def ex_create_port_forwarding_rule(self, address, private_port, public_port, protocol, node, public_end_port=None, private_end_port=None, openfirewall=True):
def ex_create_port_forwarding_rule(self, node, address, private_port, public_port, protocol, public_end_port=None, private_end_port=None, openfirewall=True):
Because in all methods argument 'node' in first place.
About method delete:
Ok, I'm rename method and fix test.
Sorry for bad english :(
(I also plan open a corresponding JIRA ticket so it will be easier to track this issue)
@runseb While reviewing this pull request I noticed a couple of unrelated issues in the driver.
Both of those methods call methods on the driver class with invalid arguments. They pass
We have two options:
We also need better test coverage to detect issues like this automatically in the future.
Edit: I've opened a JIRA issue for it - https://issues.apache.org/jira/browse/LIBCLOUD-462. We can move this off topic debate there.