api: move ostypeid from DB id to DB uuid, backports #2528 (#3066)

This is a backport to 4.11 of #2528
This commit is contained in:
Boris Stoyanov - a.k.a Bobby 2018-11-29 18:50:51 +02:00 committed by Rohit Yadav
parent 29b8a9da48
commit 44bc516609
2 changed files with 4 additions and 4 deletions

View File

@ -284,7 +284,7 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co
@SerializedName(ApiConstants.OS_TYPE_ID)
@Param(description = "OS type id of the vm", since = "4.4")
private Long osTypeId;
private String osTypeId;
public UserVmResponse() {
securityGroupList = new LinkedHashSet<SecurityGroupResponse>();
@ -810,7 +810,7 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co
this.details = details;
}
public void setOsTypeId(Long osTypeId) {
public void setOsTypeId(String osTypeId) {
this.osTypeId = osTypeId;
}
@ -834,7 +834,7 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co
isDynamicallyScalable = dynamicallyScalable;
}
public Long getOsTypeId() {
public String getOsTypeId() {
return osTypeId;
}
}

View File

@ -196,7 +196,7 @@ public class UserVmJoinDaoImpl extends GenericDaoBaseWithTagInformation<UserVmJo
userVmResponse.setPublicIpId(userVm.getPublicIpUuid());
userVmResponse.setPublicIp(userVm.getPublicIpAddress());
userVmResponse.setKeyPairName(userVm.getKeypairName());
userVmResponse.setOsTypeId(userVm.getGuestOsId());
userVmResponse.setOsTypeId(userVm.getGuestOsUuid());
if (details.contains(VMDetails.all) || details.contains(VMDetails.stats)) {
// stats calculation