You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@git.apache.org on 2017/05/10 08:20:51 UTC

[GitHub] yvsubhash commented on a change in pull request #1985: CLOUDSTACK-9812:Update "updatePortForwardingRule" api to include additional parameter to update the end port in case of port range

yvsubhash commented on a change in pull request #1985: CLOUDSTACK-9812:Update "updatePortForwardingRule" api to include additional parameter to update the end port in case of port range
URL: https://github.com/apache/cloudstack/pull/1985#discussion_r115680171
 
 

 ##########
 File path: server/src/com/cloud/network/rules/RulesManagerImpl.java
 ##########
 @@ -1578,8 +1593,13 @@ public PortForwardingRule updatePortForwardingRule(long id, Integer privatePort,
         rule.setState(State.Add);
         if (privatePort != null) {
             rule.setDestinationPortStart(privatePort.intValue());
-            rule.setDestinationPortEnd(privatePort.intValue());
+            rule.setDestinationPortEnd((privateEndPort == null) ? privatePort.intValue() : privateEndPort.intValue());
+        }
+        if (privateEndPort != null) {
+            rule.setDestinationPortStart((privatePort == null) ? privateEndPort.intValue() : privatePort.intValue());
+            rule.setDestinationPortEnd(privateEndPort);
 
 Review comment:
   This line is not needed. It would have got set already
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services