use of com.cloud.vm.InstanceGroup in project cloudstack by apache.
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());
setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create vm instance group");
}
}
use of com.cloud.vm.InstanceGroup in project cloudstack by apache.
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());
setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update vm instance group");
}
}
Aggregations