From a457ad1f03e4191529d0a4aa6e998b7d25c9d056 Mon Sep 17 00:00:00 2001 From: Remi Bergsma Date: Tue, 17 Jul 2018 14:35:28 +0200 Subject: [PATCH] osTypeId is supposed to be UUID instead of ID --- .../src/main/java/com/cloud/api/response/UserVmResponse.java | 4 ++-- .../main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cosmic-core/api/src/main/java/com/cloud/api/response/UserVmResponse.java b/cosmic-core/api/src/main/java/com/cloud/api/response/UserVmResponse.java index 3463a7629d..73bcb66d4f 100644 --- a/cosmic-core/api/src/main/java/com/cloud/api/response/UserVmResponse.java +++ b/cosmic-core/api/src/main/java/com/cloud/api/response/UserVmResponse.java @@ -214,7 +214,7 @@ public class UserVmResponse extends BaseResponse implements ControlledEntityResp @SerializedName(ApiConstants.OS_TYPE_ID) @Param(description = "OS type id of the vm", since = "4.4") - private Long osTypeId; + private String osTypeId; @SerializedName(ApiConstants.MAINTENANCE_POLICY) @Param(description = "Maintenance Policy of the VM") @@ -713,7 +713,7 @@ public void setDetails(final Map details) { this.details = details; } - public void setOsTypeId(final Long osTypeId) { + public void setOsTypeId(final String osTypeId) { this.osTypeId = osTypeId; } diff --git a/cosmic-core/server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java b/cosmic-core/server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java index 433c5817c5..70d027c78b 100644 --- a/cosmic-core/server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java +++ b/cosmic-core/server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java @@ -167,7 +167,7 @@ public UserVmResponse newUserVmResponse(final ResponseView view, final String ob userVmResponse.setPublicIpId(userVm.getPublicIpUuid()); userVmResponse.setPublicIp(userVm.getPublicIpAddress()); userVmResponse.setKeyPairName(userVm.getKeypairName()); - userVmResponse.setOsTypeId(userVm.getGuestOsId()); + userVmResponse.setOsTypeId(userVm.getGuestOsUuid()); userVmResponse.setManufacturerString(userVm.getManufacturerString()); userVmResponse.setOptimiseFor(userVm.getOptimiseFor()); userVmResponse.setRequiresRestart(userVm.getRequiresRestart());