public boolean deleteRSetStep(URI rpSystemId,List<URI> volumeIds,String token) throws InternalException {
  List<String> replicationSetNames=new ArrayList<String>();
  try {
    List<RecoverPointVolumeProtectionInfo> volumeProtectionInfoList=new ArrayList<RecoverPointVolumeProtectionInfo>();
    ProtectionSystem rpSystem=_dbClient.queryObject(ProtectionSystem.class,rpSystemId);
    RecoverPointClient rp=RPHelper.getRecoverPointClient(rpSystem);
    for (    URI volumeId : volumeIds) {
      Volume volume=_dbClient.queryObject(Volume.class,volumeId);
      RecoverPointVolumeProtectionInfo volumeProtectionInfo=rp.getProtectionInfoForVolume(RPHelper.getRPWWn(volume.getId(),_dbClient));
      Volume sourceVolume=RPHelper.getRPSourceVolume(_dbClient,volume);
      VirtualPool virtualPool=_dbClient.queryObject(VirtualPool.class,sourceVolume.getVirtualPool());
      volumeProtectionInfo.setMetroPoint(VirtualPool.vPoolSpecifiesMetroPoint(virtualPool));
      volumeProtectionInfoList.add(volumeProtectionInfo);
      replicationSetNames.add(volume.getRSetName());
    }
    if (!volumeProtectionInfoList.isEmpty()) {
      rp.deleteReplicationSets(volumeProtectionInfoList);
    }
    WorkflowStepCompleter.stepSucceded(token);
  }
 catch (  Exception e) {
    _log.error(String.format("deleteRSetStep Failed - Replication Sets: %s",replicationSetNames.toString()));
    return stepFailed(token,e,"deleteRSetStep");
  }
  return true;
}

public boolean deleteRSetStep ( URI rpSystemId , List < URI > volumeIds , String token ) throws InternalException { List < String > replicationSetNames = new ArrayList < String > ( ) ; try { List < RecoverPointVolumeProtectionInfo > volumeProtectionInfoList = new ArrayList < RecoverPointVolumeProtectionInfo > ( ) ; ProtectionSystem rpSystem = _dbClient . queryObject ( ProtectionSystem . class , rpSystemId ) ; RecoverPointClient rp = RPHelper . getRecoverPointClient ( rpSystem ) ; for ( URI volumeId : volumeIds ) { Volume volume = _dbClient . queryObject ( Volume . class , volumeId ) ; RecoverPointVolumeProtectionInfo volumeProtectionInfo = rp . getProtectionInfoForVolume ( RPHelper . getRPWWn ( volume . getId ( ) , _dbClient ) ) ; Volume sourceVolume = RPHelper . getRPSourceVolume ( _dbClient , volume ) ; VirtualPool virtualPool = _dbClient . queryObject ( VirtualPool . class , sourceVolume . getVirtualPool ( ) ) ; volumeProtectionInfo . setMetroPoint ( VirtualPool . vPoolSpecifiesMetroPoint ( virtualPool ) ) ; volumeProtectionInfoList . add ( volumeProtectionInfo ) ; replicationSetNames . add ( volume . getRSetName ( ) ) ; } if ( ! volumeProtectionInfoList . isEmpty ( ) ) { rp . deleteReplicationSets ( volumeProtectionInfoList ) ; } WorkflowStepCompleter . stepSucceded ( token ) ; } catch ( Exception e ) { _log . error ( String . format ( "deleteRSetStep Failed - Replication Sets: %s" , replicationSetNames . toString ( ) ) ) ; return stepFailed ( token , e , "deleteRSetStep" ) ; } return true ; }
delete the replication set
