use of org.apache.cloudstack.api.response.ManagementServerResponse in project cloudstack by apache.
the class QueryManagerImpl method listManagementServers.
@Override
public ListResponse<ManagementServerResponse> listManagementServers(ListMgmtsCmd cmd) {
ListResponse<ManagementServerResponse> response = new ListResponse<>();
Pair<List<ManagementServerHostVO>, Integer> result = listManagementServersInternal(cmd);
List<ManagementServerResponse> hostResponses = new ArrayList<>();
for (ManagementServerHostVO host : result.first()) {
ManagementServerResponse hostResponse = createManagementServerResponse(host);
hostResponses.add(hostResponse);
}
response.setResponses(hostResponses);
return response;
}
use of org.apache.cloudstack.api.response.ManagementServerResponse in project cloudstack by apache.
the class ApiResponseHelper method createManagementResponse.
public ManagementServerResponse createManagementResponse(ManagementServerHost mgmt) {
ManagementServerResponse response = new ManagementServerResponse();
response.setId(mgmt.getUuid());
response.setName(mgmt.getName());
response.setVersion(mgmt.getVersion());
response.setState(mgmt.getState());
return response;
}
use of org.apache.cloudstack.api.response.ManagementServerResponse in project cloudstack by apache.
the class QueryManagerImpl method createManagementServerResponse.
protected ManagementServerResponse createManagementServerResponse(ManagementServerHostVO mgmt) {
ManagementServerResponse mgmtResponse = new ManagementServerResponse();
mgmtResponse.setId(mgmt.getUuid());
mgmtResponse.setName(mgmt.getName());
mgmtResponse.setState(mgmt.getState());
mgmtResponse.setVersion(mgmt.getVersion());
mgmtResponse.setObjectName("managementserver");
return mgmtResponse;
}
Aggregations