CLOUDSTACK-9399 : NPE during deletion of host when clusterId is null

This commit is contained in:
Nick Livens 2016-06-03 11:04:09 +02:00
parent 971c8a74e4
commit ffe72ca227
2 changed files with 6 additions and 4 deletions

View File

@ -847,7 +847,7 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
return true;
}
long clusterId = host.getClusterId();
Long clusterId = host.getClusterId();
_agentMgr.notifyMonitorsOfHostAboutToBeRemoved(host.getId());
@ -927,7 +927,9 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
}
});
_agentMgr.notifyMonitorsOfRemovedHost(host.getId(), clusterId);
if (clusterId != null) {
_agentMgr.notifyMonitorsOfRemovedHost(host.getId(), clusterId);
}
return true;
}

View File

@ -13256,7 +13256,7 @@
dataType: "json",
async: false,
success: function(json) {
var items = json.listnuagevspdeviceresponse.nuagevspdevice;
var items = json.listnuagevspdevicesresponse.nuagevspdevice;
args.response.success({
data: items
});
@ -13325,7 +13325,7 @@
dataType: "json",
async: true,
success: function(json) {
var item = json.listnuagevspdeviceresponse.nuagevspdevice[0];
var item = json.listnuagevspdevicesresponse.nuagevspdevice[0];
args.response.success({
data: item
});