...
|
...
|
@@ -200,6 +200,15 @@ public class MObjectInfoCtrl { |
|
|
try {
|
|
|
if (null != request) {
|
|
|
|
|
|
if (!checkHost(request.getMoHostIp())) {
|
|
|
|
|
|
response.setCode(400);
|
|
|
|
|
|
response.setMessage("Host " + request.getMoHostIp() + " does not exist...");
|
|
|
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
MObjectInfo info = new MObjectInfo();
|
|
|
|
|
|
info.setMoName(request.getMoName());
|
...
|
...
|
@@ -259,6 +268,16 @@ public class MObjectInfoCtrl { |
|
|
|
|
|
try {
|
|
|
if (null != request) {
|
|
|
|
|
|
if (!checkHost(request.getMoHostIp())) {
|
|
|
|
|
|
response.setCode(400);
|
|
|
|
|
|
response.setMessage("Host " + request.getMoHostIp() + " does not exist...");
|
|
|
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
MObjectInfo info = new MObjectInfo();
|
|
|
|
|
|
info.setMoId(request.getMoId());
|
...
|
...
|
@@ -287,4 +306,12 @@ public class MObjectInfoCtrl { |
|
|
return response;
|
|
|
}
|
|
|
|
|
|
private boolean checkHost(String hostIp) {
|
|
|
|
|
|
if (null == hostInfoService.getHostInfoByHostIp(hostIp)) {
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
} |
...
|
...
|
|