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/09 12:33:15 UTC

[cloudstack] branch 4.11 updated: listostypes: Fixes #2529 return boolean than string in response (#2632)

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

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


The following commit(s) were added to refs/heads/4.11 by this push:
     new 253f7d7  listostypes: Fixes #2529 return boolean than string in response (#2632)
253f7d7 is described below

commit 253f7d7728e561d5da6532a138b6786e7499e145
Author: Rohit Yadav <ro...@apache.org>
AuthorDate: Wed May 9 18:03:09 2018 +0530

    listostypes: Fixes #2529 return boolean than string in response (#2632)
    
    This returns the boolean value of the `isuserdefined` key than
    converting it to string. Fixes #2529.
    
    Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
 api/src/org/apache/cloudstack/api/response/GuestOSResponse.java | 6 +++---
 server/src/com/cloud/api/ApiResponseHelper.java                 | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java b/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java
index 6822288..c1a57c3 100644
--- a/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java
@@ -41,7 +41,7 @@ public class GuestOSResponse extends BaseResponse {
 
     @SerializedName(ApiConstants.IS_USER_DEFINED)
     @Param(description = "is the guest OS user defined")
-    private String isUserDefined;
+    private Boolean isUserDefined;
 
     public String getId() {
         return id;
@@ -67,11 +67,11 @@ public class GuestOSResponse extends BaseResponse {
         this.description = description;
     }
 
-    public String getIsUserDefined() {
+    public Boolean getIsUserDefined() {
         return isUserDefined;
     }
 
-    public void setIsUserDefined(String isUserDefined) {
+    public void setIsUserDefined(Boolean isUserDefined) {
         this.isUserDefined = isUserDefined;
     }
 
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 88da634..24fecb6 100644
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -3203,7 +3203,7 @@ public class ApiResponseHelper implements ResponseGenerator {
         GuestOSResponse response = new GuestOSResponse();
         response.setDescription(guestOS.getDisplayName());
         response.setId(guestOS.getUuid());
-        response.setIsUserDefined(Boolean.valueOf(guestOS.getIsUserDefined()).toString());
+        response.setIsUserDefined(guestOS.getIsUserDefined());
         GuestOSCategoryVO category = ApiDBUtils.findGuestOsCategoryById(guestOS.getCategoryId());
         if (category != null) {
             response.setOsCategoryId(category.getUuid());

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