private VPlexVirtualVolumeInfo findVirtualVolumeAfterDeviceMigration(String originalVolumeName,VPlexMigrationInfo migrationInfo,List<VPlexClusterInfo> clusterInfoList){
  VPlexVirtualVolumeInfo virtualVolumeInfo=null;
  VPlexApiDiscoveryManager discoveryMgr=_vplexApiClient.getDiscoveryManager();
  for (  VPlexClusterInfo clusterInfo : clusterInfoList) {
    String clusterName=clusterInfo.getName();
    virtualVolumeInfo=discoveryMgr.findVirtualVolume(clusterName,originalVolumeName,false);
    if (virtualVolumeInfo != null) {
      s_logger.info("Found virtual volume after device migration with name {} on cluster {}",originalVolumeName,clusterName);
      break;
    }
 else {
      String virtualVolumeName=migrationInfo.getTarget();
      virtualVolumeInfo=discoveryMgr.findVirtualVolume(clusterName,virtualVolumeName,false);
      if (virtualVolumeInfo != null) {
        s_logger.info("Found virtual volume after device migration with name {} on cluster {}",virtualVolumeName,clusterName);
        break;
      }
 else {
        virtualVolumeName+=VPlexApiConstants.VIRTUAL_VOLUME_SUFFIX;
        virtualVolumeInfo=discoveryMgr.findVirtualVolume(clusterInfo.getName(),virtualVolumeName,false);
        if (virtualVolumeInfo != null) {
          s_logger.info("Found virtual volume after device migration with name {} on cluster {}",virtualVolumeName,clusterName);
          break;
        }
      }
    }
  }
  return virtualVolumeInfo;
}

private VPlexVirtualVolumeInfo findVirtualVolumeAfterDeviceMigration ( String originalVolumeName , VPlexMigrationInfo migrationInfo , List < VPlexClusterInfo > clusterInfoList ) { VPlexVirtualVolumeInfo virtualVolumeInfo = null ; VPlexApiDiscoveryManager discoveryMgr = _vplexApiClient . getDiscoveryManager ( ) ; for ( VPlexClusterInfo clusterInfo : clusterInfoList ) { String clusterName = clusterInfo . getName ( ) ; virtualVolumeInfo = discoveryMgr . findVirtualVolume ( clusterName , originalVolumeName , false ) ; if ( virtualVolumeInfo != null ) { s_logger . info ( "Found virtual volume after device migration with name {} on cluster {}" , originalVolumeName , clusterName ) ; break ; } else { String virtualVolumeName = migrationInfo . getTarget ( ) ; virtualVolumeInfo = discoveryMgr . findVirtualVolume ( clusterName , virtualVolumeName , false ) ; if ( virtualVolumeInfo != null ) { s_logger . info ( "Found virtual volume after device migration with name {} on cluster {}" , virtualVolumeName , clusterName ) ; break ; } else { virtualVolumeName += VPlexApiConstants . VIRTUAL_VOLUME_SUFFIX ; virtualVolumeInfo = discoveryMgr . findVirtualVolume ( clusterInfo . getName ( ) , virtualVolumeName , false ) ; if ( virtualVolumeInfo != null ) { s_logger . info ( "Found virtual volume after device migration with name {} on cluster {}" , virtualVolumeName , clusterName ) ; break ; } } } } return virtualVolumeInfo ; }
finds the virtual volume after a device migration .
