This commit is contained in:
Mengyi Zhou 2016-12-27 16:35:45 +08:00
parent 2ede271d36
commit cc3bdf821c
2 changed files with 1 additions and 3 deletions

View file

@ -260,8 +260,6 @@ public class DeactivateResource {
throw new ValidationException("Cannot find vs by id " + vsId + ".");
}
authService.authValidate(UserUtils.getUserName(request), ResourceOperationType.ACTIVATE, ResourceDataType.Vs, vsId);
ModelStatusMapping<Slb> slbMap = entityFactory.getSlbsByIds(new Long[]{slbId});
Slb slb = slbMap.getOnlineMapping().get(slbId);
if (slb == null) {

View file

@ -71,7 +71,7 @@ public class DefaultSlbValidator implements SlbValidator {
}
}
if (check.size() == 0)
return;
continue;
check.remove(slb.getId());
if (check.size() > 0) {
throw new ValidationException("Slb server " + slbServer.getIp() + " exists in the system. Unique server ip is required.");