CLOUDSTACK-5501: Allow one vpn customer gateway with multiple connections This restriction was purposely avoid confusion of VPN setup, but later found too strictly and cause troubles for deployment. Removed after testing one customer gateway with multiple connections.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0a62eb83 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0a62eb83 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0a62eb83 Branch: refs/heads/master Commit: 0a62eb8380390acc7b76a211ef802de0e19aaf13 Parents: 10de19e Author: Sheng Yang <[email protected]> Authored: Mon May 12 18:26:53 2014 -0700 Committer: Sheng Yang <[email protected]> Committed: Mon May 12 18:50:48 2014 -0700 ---------------------------------------------------------------------- server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0a62eb83/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 1d6ed22..a34aa6c 100644 --- a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java +++ b/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java @@ -264,13 +264,9 @@ public class Site2SiteVpnManagerImpl extends ManagerBase implements Site2SiteVpn } if (_vpnConnectionDao.findByVpnGatewayIdAndCustomerGatewayId(vpnGatewayId, customerGatewayId) != null) { - throw new InvalidParameterValueException("The vpn connection with customer gateway id " + customerGatewayId + " or vpn gateway id " + vpnGatewayId + + throw new InvalidParameterValueException("The vpn connection with customer gateway id " + customerGatewayId + " and vpn gateway id " + vpnGatewayId + " already existed!"); } - if (_vpnConnectionDao.findByCustomerGatewayId(customerGatewayId) != null) { - throw new InvalidParameterValueException("The vpn connection with specified customer gateway id " + customerGatewayId + " already exists!"); - } - String[] cidrList = customerGateway.getGuestCidrList().split(","); // Remote sub nets cannot overlap VPC's sub net
