private boolean allVolumesInSameBackendCG(List<Volume> volumes){
  boolean result=true;
  String replicationGroup=null;
  int count=0;
  URI storageUri=null;
  for (  Volume volume : volumes) {
    URI cgURI=volume.getConsistencyGroup();
    if (NullColumnValueGetter.isNullURI(cgURI)) {
      result=false;
      break;
    }
    Volume srcVol=VPlexUtil.getVPLEXBackendVolume(volume,true,_dbClient,false);
    if (srcVol == null) {
      result=false;
      break;
    }
    URI storage=volume.getStorageController();
    String rgName=srcVol.getReplicationGroupInstance();
    if (count == 0) {
      replicationGroup=rgName;
      storageUri=storage;
    }
    if (replicationGroup == null || replicationGroup.isEmpty()) {
      result=false;
      break;
    }
    if (rgName == null || !replicationGroup.equals(rgName)) {
      result=false;
      break;
    }
    if (!storageUri.equals(storage)) {
      result=false;
      break;
    }
    count++;
  }
  return result;
}

private boolean allVolumesInSameBackendCG ( List < Volume > volumes ) { boolean result = true ; String replicationGroup = null ; int count = 0 ; URI storageUri = null ; for ( Volume volume : volumes ) { URI cgURI = volume . getConsistencyGroup ( ) ; if ( NullColumnValueGetter . isNullURI ( cgURI ) ) { result = false ; break ; } Volume srcVol = VPlexUtil . getVPLEXBackendVolume ( volume , true , _dbClient , false ) ; if ( srcVol == null ) { result = false ; break ; } URI storage = volume . getStorageController ( ) ; String rgName = srcVol . getReplicationGroupInstance ( ) ; if ( count == 0 ) { replicationGroup = rgName ; storageUri = storage ; } if ( replicationGroup == null || replicationGroup . isEmpty ( ) ) { result = false ; break ; } if ( rgName == null || ! replicationGroup . equals ( rgName ) ) { result = false ; break ; } if ( ! storageUri . equals ( storage ) ) { result = false ; break ; } count ++ ; } return result ; }
check if the volumes are in a cg and in the same backend cg
