mirror of https://github.com/apache/cloudstack.git
Adding os type id to the usage record response for virtual machines (#4266)
This commit is contained in:
parent
39734afcbc
commit
9b72e5dfb8
|
|
@ -88,6 +88,10 @@ public class UsageRecordResponse extends BaseResponseWithTagInformation implemen
|
|||
@Param(description = "template ID")
|
||||
private String templateId;
|
||||
|
||||
@SerializedName(ApiConstants.OS_TYPE_ID)
|
||||
@Param(description = "virtual machine os type id")
|
||||
private Long osTypeId;
|
||||
|
||||
@SerializedName("usageid")
|
||||
@Param(description = "id of the resource")
|
||||
private String usageId;
|
||||
|
|
@ -198,6 +202,10 @@ public class UsageRecordResponse extends BaseResponseWithTagInformation implemen
|
|||
this.templateId = templateId;
|
||||
}
|
||||
|
||||
public void setOsTypeId(Long osTypeId) {
|
||||
this.osTypeId = osTypeId;
|
||||
}
|
||||
|
||||
public void setUsageId(String usageId) {
|
||||
this.usageId = usageId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3387,6 +3387,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
resourceType = ResourceTag.ResourceObjectType.UserVm;
|
||||
usageRecResponse.setUsageId(vm.getUuid());
|
||||
resourceId = vm.getId();
|
||||
usageRecResponse.setOsTypeId(vm.getGuestOSId());
|
||||
}
|
||||
//Hypervisor Type
|
||||
usageRecResponse.setType(usageRecord.getType());
|
||||
|
|
|
|||
Loading…
Reference in New Issue