bug 11202: added "networkRate" param to service offering api responses

This commit is contained in:
alena 2011-08-22 13:34:47 -07:00
parent 033765f93f
commit c2732850f4
2 changed files with 7 additions and 0 deletions

View File

@ -74,6 +74,9 @@ public class ServiceOfferingResponse extends BaseResponse {
@SerializedName(ApiConstants.SYSTEM_VM_TYPE) @Param(description="is this a the systemvm type for system vm offering")
private String vm_type;
@SerializedName(ApiConstants.NETWORKRATE) @Param(description="data transfer rate in megabits per second allowed.")
private Integer networkRate;
public Long getId() {
@ -215,4 +218,7 @@ public class ServiceOfferingResponse extends BaseResponse {
this.hostTag = hostTag;
}
public void setNetworkRate(Integer networkRate) {
this.networkRate = networkRate;
}
}

View File

@ -445,6 +445,7 @@ public class ApiResponseHelper implements ResponseGenerator {
offeringResponse.setDomain(ApiDBUtils.findDomainById(offering.getDomainId()).getName());
offeringResponse.setDomainId(offering.getDomainId());
}
offeringResponse.setNetworkRate(offering.getRateMbps());
offeringResponse.setHostTag(offering.getHostTag());
offeringResponse.setObjectName("serviceoffering");