rafaelweingartner commented on a change in pull request #2298: CLOUDSTACK-9620: 
Enhancements for managed storage
URL: https://github.com/apache/cloudstack/pull/2298#discussion_r161181962
 
 

 ##########
 File path: core/src/com/cloud/agent/api/MigrateCommand.java
 ##########
 @@ -40,6 +45,26 @@ public MigrateCommand(String vmName, String destIp, boolean 
isWindows, VirtualMa
         this.executeInSequence = executeInSequence;
     }
 
+    public void setMigrateStorage(Map<String, MigrateDiskInfo> migrateStorage) 
{
+        this.migrateStorage = migrateStorage;
+    }
+
+    public Map<String, MigrateDiskInfo> getMigrateStorage() {
+        return migrateStorage != null ? new HashMap<>(migrateStorage) : new 
HashMap<String, MigrateDiskInfo>();
+    }
+
+    public boolean isMigrateStorage() {
+        return migrateStorage != null && !migrateStorage.isEmpty();
 
 Review comment:
   You can use MapUtils.isNotEmpty here.
   BTW, `migrateStorage` is a quite misleading variable name. It feels boolean, 
but it is a map. Can you  change it to something more descriptive?

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