cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: updated refs/heads/master to 17850c7
Date Wed, 25 Jun 2014 13:45:43 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master cd3b027f4 -> 17850c7af


CLOUDSTACK-6747: call a more forgiving test on the supplied peer
cidr-list

Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/17850c7a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/17850c7a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/17850c7a

Branch: refs/heads/master
Commit: 17850c7aff432a504d65a34d2f22ca7e1952a770
Parents: cd3b027
Author: Daan Hoogland <dhoogland@schubergphilis.com>
Authored: Wed Jun 25 15:45:28 2014 +0200
Committer: Daan Hoogland <daan@onecht.net>
Committed: Wed Jun 25 15:45:28 2014 +0200

----------------------------------------------------------------------
 .../api/command/user/vpn/CreateVpnCustomerGatewayCmd.java |  4 ++--
 .../com/cloud/network/vpn/Site2SiteVpnManagerImpl.java    | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/17850c7a/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnCustomerGatewayCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnCustomerGatewayCmd.java
b/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnCustomerGatewayCmd.java
index 6967ff4..46ad92f 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnCustomerGatewayCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnCustomerGatewayCmd.java
@@ -48,7 +48,7 @@ public class CreateVpnCustomerGatewayCmd extends BaseAsyncCmd {
     private String gatewayIp;
 
     @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.STRING, required = true,
description = "guest cidr list of the customer gateway")
-    private String guestCidrList;
+    private String peerCidrList;
 
     @Parameter(name = ApiConstants.IPSEC_PSK, type = CommandType.STRING, required = true,
description = "IPsec Preshared-Key of the customer gateway")
     private String ipsecPsk;
@@ -97,7 +97,7 @@ public class CreateVpnCustomerGatewayCmd extends BaseAsyncCmd {
     }
 
     public String getGuestCidrList() {
-        return guestCidrList;
+        return peerCidrList;
     }
 
     public String getGatewayIp() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/17850c7a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java b/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
index 8edab62..a470ba1 100644
--- a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
+++ b/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
@@ -185,9 +185,9 @@ public class Site2SiteVpnManagerImpl extends ManagerBase implements Site2SiteVpn
         if (name == null) {
             name = "VPN-" + gatewayIp;
         }
-        String guestCidrList = cmd.getGuestCidrList();
-        if (!NetUtils.validateGuestCidrList(guestCidrList)) {
-            throw new InvalidParameterValueException("The customer gateway guest cidr list
" + guestCidrList + " is invalid guest cidr!");
+        String peerCidrList = cmd.getGuestCidrList();
+        if (!NetUtils.isValidCidrList(peerCidrList)) {
+            throw new InvalidParameterValueException("The customer gateway peer cidr list
" + peerCidrList + " contains an invalid cidr!");
         }
         String ipsecPsk = cmd.getIpsecPsk();
         String ikePolicy = cmd.getIkePolicy();
@@ -228,10 +228,10 @@ public class Site2SiteVpnManagerImpl extends ManagerBase implements
Site2SiteVpn
             throw new InvalidParameterValueException("The customer gateway with name " +
name + " already existed!");
         }
 
-        checkCustomerGatewayCidrList(guestCidrList);
+        checkCustomerGatewayCidrList(peerCidrList);
 
         Site2SiteCustomerGatewayVO gw =
-            new Site2SiteCustomerGatewayVO(name, accountId, owner.getDomainId(), gatewayIp,
guestCidrList, ipsecPsk, ikePolicy, espPolicy, ikeLifetime, espLifetime, dpd);
+            new Site2SiteCustomerGatewayVO(name, accountId, owner.getDomainId(), gatewayIp,
peerCidrList, ipsecPsk, ikePolicy, espPolicy, ikeLifetime, espLifetime, dpd);
         _customerGatewayDao.persist(gw);
         return gw;
     }


Mime
View raw message