shwstppr commented on code in PR #6483:
URL: https://github.com/apache/cloudstack/pull/6483#discussion_r903458858
##########
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/guru/VMwareGuru.java:
##########
@@ -1070,6 +1073,21 @@ private boolean isInterClusterMigration(Long
srcClusterId, Long destClusterId) {
return srcClusterId != null && destClusterId != null && !
srcClusterId.equals(destClusterId);
}
+ private String getHostGuidForLocalStorage(Map<Volume, StoragePool>
volumeToPool) {
+ String hostGuidInTargetCluster = null;
+ for (Map.Entry<Volume, StoragePool> entry : volumeToPool.entrySet()) {
+ Volume volume = entry.getKey();
+ StoragePool pool = entry.getValue();
+ if (volume.getVolumeType().equals(Volume.Type.ROOT) &&
pool.isLocal()) {
+ List<StoragePoolHostVO> storagePoolHostVOs =
storagePoolHostDao.listByPoolId(pool.getId());
+ StoragePoolHostVO storagePoolHostVO =
storagePoolHostVOs.get(0);
+ HostVO hostVO =
_hostDao.findById(storagePoolHostVO.getHostId());
+ hostGuidInTargetCluster = hostVO.getGuid();
+ }
+ }
Review Comment:
@harikrishna-patnala do we need to continue traversing through all entries,
we can return the first found?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]