You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2018/05/03 11:00:33 UTC

[cloudstack] branch master updated: api: Fixes #2528 move ostypeid from id to uuid (#2608)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new d94a5be  api: Fixes #2528 move ostypeid from id to uuid (#2608)
d94a5be is described below

commit d94a5bea3c3f826fc53d8a555bd69714546e025d
Author: Marc-Aurèle Brothier <m...@brothier.org>
AuthorDate: Thu May 3 13:00:26 2018 +0200

    api: Fixes #2528 move ostypeid from id to uuid (#2608)
    
    This moves the ostypeid in api response to uuid instead of integer id.
---
 .../java/org/apache/cloudstack/api/response/UserVmResponse.java     | 6 +++---
 server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java
index 2ff1eaa..8db4f85 100644
--- a/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java
+++ b/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java
@@ -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;
     }
 }
diff --git a/server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java b/server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
index f0a0a56..00ec61a 100644
--- a/server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
+++ b/server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
@@ -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

-- 
To stop receiving notification emails like this one, please contact
rohit@apache.org.