mirror of https://github.com/apache/cloudstack.git
S2S VPN: CS-15932: Allow user to update customer gateway when connection state is ERROR
This commit is contained in:
parent
727d0d60f4
commit
0bbefcecff
|
|
@ -409,10 +409,10 @@ public class Site2SiteVpnManagerImpl implements Site2SiteVpnManager, Manager {
|
|||
List<Site2SiteVpnConnectionVO> conns = _vpnConnectionDao.listByCustomerGatewayId(id);
|
||||
if (conns != null) {
|
||||
for (Site2SiteVpnConnection conn : conns) {
|
||||
if (conn.getState() != State.Disconnected || conn.getState() != State.Error) {
|
||||
if (conn.getState() != State.Error) {
|
||||
List<IdentityProxy> idList = new ArrayList<IdentityProxy>();
|
||||
idList.add(new IdentityProxy(conn, conn.getId(), "vpnConnectionId"));
|
||||
throw new InvalidParameterValueException("Unable to update customer gateway because there is an active VPN connection with specified vpn connection id", idList);
|
||||
throw new InvalidParameterValueException("Unable to update customer gateway with connections in non-Error state!", idList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue