cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cloudstack] DaanHoogland commented on a change in pull request #3748: Systemvm template api (WIP)
Date Thu, 12 Dec 2019 15:31:07 GMT
DaanHoogland commented on a change in pull request #3748: Systemvm template api (WIP)
URL: https://github.com/apache/cloudstack/pull/3748#discussion_r357172286
 
 

 ##########
 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:
   I think we have a constant for that somewhere. and if not we should ;)

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message