cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] nvazquez commented on a change in pull request #2146: CLOUDSTACK-4757: Support OVA files with multiple disks for templates
Date Thu, 01 Jan 1970 00:00:00 GMT
nvazquez commented on a change in pull request #2146: CLOUDSTACK-4757: Support OVA files with
multiple disks for templates
URL: https://github.com/apache/cloudstack/pull/2146#discussion_r158594660
 
 

 ##########
 File path: engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
 ##########
 @@ -324,6 +333,17 @@ public void handleTemplateSync(DataStore store) {
                         }
                     }
 
+                    for (Iterator<VMTemplateVO> iter = allTemplates.listIterator();
iter.hasNext();) {
+                        VMTemplateVO child_template = iter.next();
+                        if (child_template.getParentTemplateId() != null) {
+                            String uniqueName = child_template.getUniqueName();
+                            if (templateInfos.containsKey(uniqueName)) {
+                                templateInfos.remove(uniqueName);
+                            }
+                            iter.remove();
+                        }
+                    }
+
                     toBeDownloaded.addAll(allTemplates);
 
 Review comment:
   As per my understanding, only parent templates (parent_template_id = null) will be on allTemplates
after previous code

----------------------------------------------------------------
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

Mime
View raw message