This commit is contained in:
nkorange 2019-01-10 10:57:20 +08:00
parent 5290c16539
commit 366ffcd3fe

View File

@ -1213,8 +1213,9 @@ public class ApiCommands {
String dom = WebUtils.required(request, "dom"); String dom = WebUtils.required(request, "dom");
String ipListString = WebUtils.required(request, "ipList"); String ipListString = WebUtils.required(request, "ipList");
Loggers.DEBUG_LOG.debug("[REMOVE-IP] full arguments: serviceName:" + dom + ", iplist:" + ipListString); if (Loggers.DEBUG_LOG.isDebugEnabled()) {
Loggers.DEBUG_LOG.debug("[REMOVE-IP] full arguments: serviceName:" + dom + ", iplist:" + ipListString);
}
List<IpAddress> newIPs = new ArrayList<>(); List<IpAddress> newIPs = new ArrayList<>();
List<String> ipList = new ArrayList<>(); List<String> ipList = new ArrayList<>();
if (Boolean.parseBoolean(WebUtils.optional(request, SwitchEntry.PARAM_JSON, Boolean.FALSE.toString()))) { if (Boolean.parseBoolean(WebUtils.optional(request, SwitchEntry.PARAM_JSON, Boolean.FALSE.toString()))) {
@ -1233,6 +1234,11 @@ public class ApiCommands {
} }
} }
VirtualClusterDomain domain = (VirtualClusterDomain) domainsManager.getDomain(namespaceId, dom);
if (domain == null) {
throw new IllegalStateException("[" + namespaceId + "] service " + dom + " not found!");
}
domainsManager.easyRemvIP4Dom(namespaceId, dom, ipObjList); domainsManager.easyRemvIP4Dom(namespaceId, dom, ipObjList);
Loggers.EVT_LOG.info("{" + dom + "} {POS} {IP-REMV}" + " dead: " Loggers.EVT_LOG.info("{" + dom + "} {POS} {IP-REMV}" + " dead: "