return diskOfferingResponse;
}
@Override
public ResourceLimitResponse createResourceLimitResponse(ResourceLimit limit) {
ResourceLimitResponse resourceLimitResponse = new ResourceLimitResponse();
if (limit.getResourceOwnerType() == ResourceOwnerType.Domain) {
populateDomain(resourceLimitResponse, limit.getOwnerId());
} else if (limit.getResourceOwnerType() == ResourceOwnerType.Account) {
Account accountTemp = ApiDBUtils.findAccountById(limit.getOwnerId());
populateAccount(resourceLimitResponse, limit.getOwnerId());
populateDomain(resourceLimitResponse, accountTemp.getDomainId());
}
resourceLimitResponse.setResourceType(Integer.valueOf(limit.getType().getOrdinal()).toString());
resourceLimitResponse.setMax(limit.getMax());
resourceLimitResponse.setObjectName("resourcelimit");
return resourceLimitResponse;
}