use of com.cloud.api.response.InstanceGroupResponse in project CloudStack-archive by CloudStack-extras.
the class UpdateVMGroupCmd method execute.
@Override
public void execute() {
InstanceGroup result = _mgr.updateVmGroup(this);
if (result != null) {
InstanceGroupResponse response = _responseGenerator.createInstanceGroupResponse(result);
response.setResponseName(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update vm instance group");
}
}
use of com.cloud.api.response.InstanceGroupResponse in project CloudStack-archive by CloudStack-extras.
the class ListVMGroupsCmd method execute.
@Override
public void execute() {
List<? extends InstanceGroup> groups = _mgr.searchForVmGroups(this);
ListResponse<InstanceGroupResponse> response = new ListResponse<InstanceGroupResponse>();
List<InstanceGroupResponse> responses = new ArrayList<InstanceGroupResponse>();
for (InstanceGroup group : groups) {
InstanceGroupResponse groupResponse = _responseGenerator.createInstanceGroupResponse(group);
groupResponse.setObjectName("instancegroup");
responses.add(groupResponse);
}
response.setResponses(responses);
response.setResponseName(getCommandName());
this.setResponseObject(response);
}
use of com.cloud.api.response.InstanceGroupResponse in project CloudStack-archive by CloudStack-extras.
the class CreateVMGroupCmd method execute.
@Override
public void execute() {
InstanceGroup result = _userVmService.createVmGroup(this);
if (result != null) {
InstanceGroupResponse response = _responseGenerator.createInstanceGroupResponse(result);
response.setResponseName(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to create vm instance group");
}
}
Aggregations