Spaceman1984 commented on a change in pull request #3748: Systemvm template api 
(WIP)
URL: https://github.com/apache/cloudstack/pull/3748#discussion_r358665305
 
 

 ##########
 File path: 
server/src/main/java/com/cloud/template/HypervisorTemplateAdapter.java
 ##########
 @@ -211,8 +219,14 @@ private void persistDirectDownloadTemplate(long 
templateId, Long size) {
 
     @Override
     public VMTemplateVO create(TemplateProfile profile) {
-        // persist entry in vm_template, vm_template_details and 
template_zone_ref tables, not that entry at template_store_ref is not created 
here, and created in createTemplateAsync.
-        VMTemplateVO template = persistTemplate(profile, State.Active);
+        VMTemplateVO template;
+        // persist entry in vm_template, vm_template_details and 
template_zone_ref tables, note that entry at template_store_ref is not created 
here, but created in createTemplateAsync.
+        if (profile.getTemplateType() == TemplateType.SYSTEM ){
+            profile.setAccountId(1L); // System account
 
 Review comment:
   Removed

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


With regards,
Apache Git Services

Reply via email to