private boolean checkIfMigrationRequired(Map<Volume, List<StoragePool>> volumePools) {
boolean migratingToOtherStoragePool = false;
Iterator<Volume> volumesIt = volumePools.keySet().iterator();
while(volumesIt.hasNext()) {
Volume vol = volumesIt.next();
List<StoragePool> poolList = volumePools.get(vol);
for (StoragePool pool : poolList) {
// See if any volume requies migration to another storage pool
if (pool.getId() != vol.getPoolId()) {
migratingToOtherStoragePool = true;
}
}
}
return migratingToOtherStoragePool;