List<String> result = _mgr.getHypervisors(getZoneId());
ListResponse<HypervisorResponse> response = new ListResponse<HypervisorResponse>();
ArrayList<HypervisorResponse> responses = new ArrayList<HypervisorResponse>();
if (result != null) {
for (String hypervisor : result) {
HypervisorResponse hypervisorResponse = new HypervisorResponse();
hypervisorResponse.setName(hypervisor);
hypervisorResponse.setObjectName("hypervisor");
responses.add(hypervisorResponse);
}
}
response.setResponses(responses);
response.setResponseName(getCommandName());