bug 9534: CloudStack API - extend listServiceOfferings API to return limitCpuUse.

This commit is contained in:
Jessica Wang 2011-05-04 15:26:48 -07:00
parent 9aba817256
commit 48765a8ae9
2 changed files with 13 additions and 1 deletions

View File

@ -50,7 +50,10 @@ public class ServiceOfferingResponse extends BaseResponse {
@SerializedName("offerha") @Param(description="the ha support in the service offering")
private Boolean offerHa;
@SerializedName("limitcpuuse") @Param(description="restrict the CPU usage to committed service offering")
private Boolean limitCpuUse;
@SerializedName("tags") @Param(description="the tags for the service offering")
private String tags;
@ -135,6 +138,14 @@ public class ServiceOfferingResponse extends BaseResponse {
this.offerHa = offerHa;
}
public Boolean getLimitCpuUse() {
return limitCpuUse;
}
public void setLimitCpuUse(Boolean limitCpuUse) {
this.limitCpuUse = limitCpuUse;
}
public String getTags() {
return tags;
}

View File

@ -408,6 +408,7 @@ public class ApiResponseHelper implements ResponseGenerator {
offeringResponse.setCreated(offering.getCreated());
offeringResponse.setStorageType(offering.getUseLocalStorage() ? "local" : "shared");
offeringResponse.setOfferHa(offering.getOfferHA());
offeringResponse.setLimitCpuUse(offering.getLimitCpuUse());
offeringResponse.setTags(offering.getTags());
if (offering.getDomainId() != null) {
offeringResponse.setDomain(ApiDBUtils.findDomainById(offering.getDomainId()).getName());