cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cloudstack] anuragaw commented on a change in pull request #3310: Fix removing static NAT rules with Juniper SRX
Date Mon, 03 Jun 2019 11:23:11 GMT
anuragaw commented on a change in pull request #3310: Fix removing static NAT rules with Juniper
SRX
URL: https://github.com/apache/cloudstack/pull/3310#discussion_r289797663
 
 

 ##########
 File path: plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
 ##########
 @@ -2078,11 +2078,11 @@ private boolean manageStaticNatRule(SrxCommand command, String publicIp,
String
                         xml = replaceXmlValue(xml, "rule-set", _privateZone);
                         xml = replaceXmlValue(xml, "from-zone", _privateZone);
                         xml = replaceXmlValue(xml, "rule-name", ruleName_private);
-                    }
 
-                    if (!sendRequestAndCheckResponse(command, xml, "name", ruleName_private))
-                    {
-                        throw new ExecutionException("Failed to delete trust static NAT rule
from public IP " + publicIp + " to private IP " + privateIp);
+                        if (!sendRequestAndCheckResponse(command, xml, "name", ruleName_private))
+                        {
+                            throw new ExecutionException("Failed to delete trust static NAT
rule from public IP " + publicIp + " to private IP " + privateIp);
+                        }
 
 Review comment:
   nit- This is one confusing else block :/ I don't think we need the else at all. Essentially
it's about sending command and post that checking if private rules delete exists and execute
that. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Mime
View raw message