api: Fixes #2528 move ostypeid from id to uuid (#2608)

This moves the ostypeid in api response to uuid instead of integer id.
This commit is contained in:
Marc-Aurèle Brothier 2018-05-03 13:00:26 +02:00 committed by Rohit Yadav
parent 3adc2b8485
commit d94a5bea3c
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