S2S VPN: CS-15932: Allow user to update customer gateway when connection state is ERROR

This commit is contained in:
Sheng Yang 2012-08-10 11:50:21 -07:00
parent 727d0d60f4
commit 0bbefcecff
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}
}
}