use of com.cloud.api.response.GuestOSCategoryResponse in project CloudStack-archive by CloudStack-extras.
the class ListGuestOsCategoriesCmd method execute.
@Override
public void execute() {
List<? extends GuestOsCategory> result = _mgr.listGuestOSCategoriesByCriteria(this);
ListResponse<GuestOSCategoryResponse> response = new ListResponse<GuestOSCategoryResponse>();
List<GuestOSCategoryResponse> osCatResponses = new ArrayList<GuestOSCategoryResponse>();
for (GuestOsCategory osCategory : result) {
GuestOSCategoryResponse categoryResponse = new GuestOSCategoryResponse();
categoryResponse.setId(osCategory.getId());
categoryResponse.setName(osCategory.getName());
categoryResponse.setObjectName("oscategory");
osCatResponses.add(categoryResponse);
}
response.setResponses(osCatResponses);
response.setResponseName(getCommandName());
this.setResponseObject(response);
}
Aggregations