Skip to content

Commit d94a5be

Browse files
marcaureleyadvr
authored andcommitted
api: Fixes #2528 move ostypeid from id to uuid (#2608)
This moves the ostypeid in api response to uuid instead of integer id.
1 parent 3adc2b8 commit d94a5be

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co
284284

285285
@SerializedName(ApiConstants.OS_TYPE_ID)
286286
@Param(description = "OS type id of the vm", since = "4.4")
287-
private Long osTypeId;
287+
private String osTypeId;
288288

289289
public UserVmResponse() {
290290
securityGroupList = new LinkedHashSet<SecurityGroupResponse>();
@@ -810,7 +810,7 @@ public void setDetails(Map details) {
810810
this.details = details;
811811
}
812812

813-
public void setOsTypeId(Long osTypeId) {
813+
public void setOsTypeId(String osTypeId) {
814814
this.osTypeId = osTypeId;
815815
}
816816

@@ -834,7 +834,7 @@ public void setDynamicallyScalable(Boolean dynamicallyScalable) {
834834
isDynamicallyScalable = dynamicallyScalable;
835835
}
836836

837-
public Long getOsTypeId() {
837+
public String getOsTypeId() {
838838
return osTypeId;
839839
}
840840
}

server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public UserVmResponse newUserVmResponse(ResponseView view, String objectName, Us
196196
userVmResponse.setPublicIpId(userVm.getPublicIpUuid());
197197
userVmResponse.setPublicIp(userVm.getPublicIpAddress());
198198
userVmResponse.setKeyPairName(userVm.getKeypairName());
199-
userVmResponse.setOsTypeId(userVm.getGuestOsId());
199+
userVmResponse.setOsTypeId(userVm.getGuestOsUuid());
200200

201201
if (details.contains(VMDetails.all) || details.contains(VMDetails.stats)) {
202202
// stats calculation

0 commit comments

Comments
 (0)