This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 8fe13f91a10 OSType response: isuserdefined as string not bool #8127
(#8128)
8fe13f91a10 is described below
commit 8fe13f91a10cc326eb33f3aaf4ba3900b9efd1ba
Author: Aakash Sinha <[email protected]>
AuthorDate: Wed Oct 25 14:32:57 2023 +0530
OSType response: isuserdefined as string not bool #8127 (#8128)
Co-authored-by: Aakash Sinha <[email protected]>
---
.../java/org/apache/cloudstack/api/response/GuestOSResponse.java | 6 +++---
server/src/main/java/com/cloud/api/ApiResponseHelper.java | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/api/src/main/java/org/apache/cloudstack/api/response/GuestOSResponse.java
b/api/src/main/java/org/apache/cloudstack/api/response/GuestOSResponse.java
index 6ad5e2ac828..f870a2f0d94 100644
--- a/api/src/main/java/org/apache/cloudstack/api/response/GuestOSResponse.java
+++ b/api/src/main/java/org/apache/cloudstack/api/response/GuestOSResponse.java
@@ -53,7 +53,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;
@SerializedName(ApiConstants.FOR_DISPLAY)
@Param(description = "is the guest OS visible for the users")
@@ -99,11 +99,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/main/java/com/cloud/api/ApiResponseHelper.java
b/server/src/main/java/com/cloud/api/ApiResponseHelper.java
index 7d80cd1a6da..0d00fece4c3 100644
--- a/server/src/main/java/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/main/java/com/cloud/api/ApiResponseHelper.java
@@ -3730,7 +3730,7 @@ public class ApiResponseHelper implements
ResponseGenerator {
response.setName(guestOS.getDisplayName());
response.setDescription(guestOS.getDisplayName());
response.setId(guestOS.getUuid());
- response.setIsUserDefined(String.valueOf(guestOS.getIsUserDefined()));
+ response.setIsUserDefined(guestOS.getIsUserDefined());
response.setForDisplay(guestOS.getForDisplay());
GuestOSCategoryVO category =
ApiDBUtils.findGuestOsCategoryById(guestOS.getCategoryId());
if (category != null) {