use of com.cloud.api.response.ServiceOfferingResponse in project cosmic by MissionCriticalCloud.
the class UpdateServiceOfferingCmd method execute.
// ///////////////////////////////////////////////////
// ///////////// API Implementation///////////////////
// ///////////////////////////////////////////////////
@Override
public void execute() {
// Note
// Once an offering is created, we cannot update the domainId field (keeping consistent with zones logic)
final ServiceOffering result = _configService.updateServiceOffering(this);
if (result != null) {
final ServiceOfferingResponse response = _responseGenerator.createServiceOfferingResponse(result);
response.setResponseName(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update service offering");
}
}
Aggregations