cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] resmo commented on a change in pull request #2377: CLOUDSTACK-10207: updateVpnCustomerGateway: fix defaulting for option…
Date Fri, 20 Apr 2018 13:32:54 GMT
resmo commented on a change in pull request #2377: CLOUDSTACK-10207: updateVpnCustomerGateway:
fix defaulting for option…
URL: https://github.com/apache/cloudstack/pull/2377#discussion_r183051063
 
 

 ##########
 File path: server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
 ##########
 @@ -426,72 +426,52 @@ public Site2SiteCustomerGateway updateCustomerGateway(UpdateVpnCustomerGatewayCm
                 }
             }
         }
-        String name = cmd.getName();
         String gatewayIp = cmd.getGatewayIp();
         if (!NetUtils.isValidIp(gatewayIp) && !NetUtils.verifyDomainName(gatewayIp))
{
             throw new InvalidParameterValueException("The customer gateway ip/Domain " +
gatewayIp + " is invalid!");
         }
-        if (name == null) {
-            name = "VPN-" + gatewayIp;
-        }
         String guestCidrList = cmd.getGuestCidrList();
         if (!NetUtils.isValidCidrList(guestCidrList)) {
             throw new InvalidParameterValueException("The customer gateway peer cidr list
" + guestCidrList + " contains an invalid cidr!");
         }
-        String ipsecPsk = cmd.getIpsecPsk();
         String ikePolicy = cmd.getIkePolicy();
-        String espPolicy = cmd.getEspPolicy();
         if (!NetUtils.isValidS2SVpnPolicy("ike", ikePolicy)) {
-            throw new InvalidParameterValueException("The customer gateway IKE policy" +
ikePolicy + " is invalid!  Verify the required Diffie Hellman (DH) group is specified.");
+            throw new InvalidParameterValueException("Error while updating a customer gateway.
The IKE policy" + ikePolicy + " is invalid! Verify whether the required Diffie Hellman (DH)
group is specified.");
         }
+        String espPolicy = cmd.getEspPolicy();
         if (!NetUtils.isValidS2SVpnPolicy("esp", espPolicy)) {
             throw new InvalidParameterValueException("The customer gateway ESP policy" +
espPolicy + " is invalid!");
         }
         Long ikeLifetime = cmd.getIkeLifetime();
-        if (ikeLifetime == null) {
 
 Review comment:
   if null, we should keep what we already have

----------------------------------------------------------------
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

Mime
View raw message