mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 13812: throw error if addition of host fails
This commit is contained in:
parent
4ec26ae3cb
commit
1d96a17698
@ -142,7 +142,7 @@ public class AddHostCmd extends BaseCmd {
|
||||
List<? extends Host> result = _resourceService.discoverHosts(this);
|
||||
ListResponse<HostResponse> response = new ListResponse<HostResponse>();
|
||||
List<HostResponse> hostResponses = new ArrayList<HostResponse>();
|
||||
if (result != null) {
|
||||
if (result != null && result.size() > 0) {
|
||||
for (Host host : result) {
|
||||
HostResponse hostResponse = _responseGenerator.createHostResponse(host);
|
||||
hostResponses.add(hostResponse);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user