You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2018/10/24 10:50:29 UTC

[GitHub] rhtyd closed pull request #2921: template: Return requireshvm key in list template response

rhtyd closed pull request #2921: template: Return requireshvm key in list template response
URL: https://github.com/apache/cloudstack/pull/2921
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/api/src/main/java/org/apache/cloudstack/api/response/TemplateResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/TemplateResponse.java
index 373198ed29f..a83fe426b56 100644
--- a/api/src/main/java/org/apache/cloudstack/api/response/TemplateResponse.java
+++ b/api/src/main/java/org/apache/cloudstack/api/response/TemplateResponse.java
@@ -197,6 +197,10 @@
     @Param(description = "if root disk template, then ids of the datas disk templates this template owns")
     private Set<ChildTemplateResponse> childTemplates;
 
+    @SerializedName(ApiConstants.REQUIRES_HVM)
+    @Param(description = "true if template requires HVM enabled, false otherwise")
+    private Boolean requiresHvm;
+
     public TemplateResponse() {
         tags = new LinkedHashSet<ResourceTagResponse>();
     }
@@ -391,4 +395,11 @@ public void setChildTemplates(Set<ChildTemplateResponse> childTemplateIds) {
         this.childTemplates = childTemplateIds;
     }
 
+    public Boolean isRequiresHvm() {
+        return requiresHvm;
+    }
+
+    public void setRequiresHvm(Boolean requiresHvm) {
+        this.requiresHvm = requiresHvm;
+    }
 }
diff --git a/server/src/main/java/com/cloud/api/query/dao/TemplateJoinDaoImpl.java b/server/src/main/java/com/cloud/api/query/dao/TemplateJoinDaoImpl.java
index c0d57d7e4af..e4e0c442bf4 100644
--- a/server/src/main/java/com/cloud/api/query/dao/TemplateJoinDaoImpl.java
+++ b/server/src/main/java/com/cloud/api/query/dao/TemplateJoinDaoImpl.java
@@ -213,6 +213,7 @@ public TemplateResponse newTemplateResponse(ResponseView view, TemplateJoinVO te
         }
 
         templateResponse.setDirectDownload(template.isDirectDownload());
+        templateResponse.setRequiresHvm(template.isRequiresHvm());
 
         //set template children disks
         Set<ChildTemplateResponse> childTemplatesSet = new HashSet<ChildTemplateResponse>();


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services