cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] rafaelweingartner commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates
Date Thu, 01 Jan 1970 00:00:00 GMT
rafaelweingartner commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary
Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159628986
 
 

 ##########
 File path: engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateDataFactoryImpl.java
 ##########
 @@ -153,4 +164,67 @@ public TemplateInfo getReadyTemplateOnCache(long templateId) {
         return tmplObjs;
     }
 
+    /**
+     * Given existing spool refs, return one pool id existing on pools and refs
+     * @param existingRefs
+     * @param pools
+     * @return
+     */
+    private Long getOneMatchingPoolIdFromRefs(List<VMTemplateStoragePoolVO> existingRefs,
List<StoragePoolVO> pools) {
+        for (VMTemplateStoragePoolVO ref : existingRefs) {
+            for (StoragePoolVO p : pools) {
+                if (ref.getPoolId() == p.getId()) {
+                    return p.getId();
+                }
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Retrieve storage pools with scope = cluster or zone matching clusterId or dataCenterId
depending on their scope
+     * @param clusterId
 
 Review comment:
   same here

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