use of com.cloud.hypervisor.HypervisorCapabilities in project cloudstack by apache.
the class ListHypervisorCapabilitiesCmd method execute.
@Override
public void execute() {
Pair<List<? extends HypervisorCapabilities>, Integer> hpvCapabilities = _mgr.listHypervisorCapabilities(getId(), getHypervisor(), getKeyword(), this.getStartIndex(), this.getPageSizeVal());
ListResponse<HypervisorCapabilitiesResponse> response = new ListResponse<HypervisorCapabilitiesResponse>();
List<HypervisorCapabilitiesResponse> hpvCapabilitiesResponses = new ArrayList<HypervisorCapabilitiesResponse>();
for (HypervisorCapabilities capability : hpvCapabilities.first()) {
HypervisorCapabilitiesResponse hpvCapabilityResponse = _responseGenerator.createHypervisorCapabilitiesResponse(capability);
hpvCapabilityResponse.setObjectName("hypervisorCapabilities");
hpvCapabilitiesResponses.add(hpvCapabilityResponse);
}
response.setResponses(hpvCapabilitiesResponses, hpvCapabilities.second());
response.setResponseName(getCommandName());
this.setResponseObject(response);
}
Aggregations