Add methods ex_add/ex_delete port_forwarding_rule to CloudstackNode (similar to ip_forwarding_rule) - #196
Add methods ex_add/ex_delete port_forwarding_rule to CloudstackNode (similar to ip_forwarding_rule)#196gigimon wants to merge 1 commit into
Conversation
|
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. |
|
ex_create_port_forwarding_rule was: def ex_create_port_forwarding_rule(self, address, private_port,
public_port, protocol, node,
public_end_port=None,
private_end_port=None,
openfirewall=True):Now it: 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 :( |
|
@gigimon Can you please also add tests which cover those newly added methods? |
|
@Kami ok, later today I add tests |
|
@Kami I've added tests, please check, if all good I create one commit with all changess |
There was a problem hiding this comment.
I just went over the pull request again and I'm kinda confused now.
Why did you rename methods from add to create (ex_add_ip_forwarding_rule -> ex_create_ip_forwarding_rule)? Is it for consistency reasons or is it something else?
There was a problem hiding this comment.
Yes, it's for consistency reason. In pull request @Runseb say me rename to create
There was a problem hiding this comment.
OK, sounds good. Need to note this in the changelog though since it's a backward incompatible change.
|
(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 See:
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. |
|
@gigimon Rebased the commits and merged those changes into trunk. This PR can be closed now. Thanks. |
…Node object (similar to ip_forwarding_rule) * rename ex_add_ip_forwarding_rule to ex_create_ip_forwarding_rule * add tests for CloudStackNode.ex_create/ex_delete_port_forwarding_rule
|
@Kami done |
Hi!
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?