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

 ##########
 File path: api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
 ##########
 @@ -443,6 +449,37 @@ public String getKeyboard() {
         return dhcpOptionsMap;
     }
 
+    public Map<Long, DiskOffering> getDataDiskTemplateToDiskOfferingMap() {
+        if (diskOfferingId != null && dataDiskTemplateToDiskOfferingList != 
null) {
+            throw new InvalidParameterValueException("diskofferingid paramter 
can't be specified along with datadisktemplatetodiskofferinglist parameter");
+        }
+        HashMap<Long, DiskOffering> dataDiskTemplateToDiskOfferingMap = new 
HashMap<Long, DiskOffering>();
+        if (dataDiskTemplateToDiskOfferingList != null && 
!dataDiskTemplateToDiskOfferingList.isEmpty()) {
+            Collection dataDiskTemplatesCollection = 
dataDiskTemplateToDiskOfferingList.values();
+            Iterator iter = dataDiskTemplatesCollection.iterator();
+            while (iter.hasNext()) {
 
 Review comment:
   why not a for each?
   ```
   for( HashMap<String, String> dataDiskTemplates:  
dataDiskTemplateToDiskOfferingList.values()){
   ...
   }
   ```
   
   The use of Iterator manually does not seem to be necessary.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to