CLOUDSTACK-6968: Allowing cluster scope volumes to attach to any VM. If migration is

needed then first they will be migrated to appropriate cluster before attaching.
This commit is contained in:
Anshul Gangwar 2014-06-20 16:35:06 +05:30 committed by Devdeep Singh
parent 64153a4371
commit e7ba46b5f7

View File

@ -1972,7 +1972,9 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
}
if (storeForDataStoreScope.getScopeId().equals(vmClusterId)) {
return false;
}
} else {
return true;
}
} else if (storeForDataStoreScope.getScopeType() == ScopeType.HOST
&& (storeForRootStoreScope.getScopeType() == ScopeType.CLUSTER || storeForRootStoreScope.getScopeType() == ScopeType.ZONE)) {
Long hostId = _vmInstanceDao.findById(rootVolumeOfVm.getInstanceId()).getHostId();