private void cleanupAnyGroupBackupSnapshots(StorageSystem storage,CIMObjectPath replicationGroupPath){
  _log.info("Cleaning up backup snapshots for: {}",replicationGroupPath);
  CloseableIterator<CIMObjectPath> settings=null;
  try {
    settings=_helper.getReference(storage,replicationGroupPath,SmisConstants.CLAR_SETTINGS_DEFINE_STATE_RG_SAFS,null);
    while (settings.hasNext()) {
      CIMObjectPath path=settings.next();
      CIMArgument[] inArgs=_helper.getDeleteSettingsForSnapshotInputArguments(path,true);
      CIMArgument[] outArgs=new CIMArgument[5];
      _helper.callModifySettingsDefineState(storage,inArgs,outArgs);
    }
  }
 catch (  Exception e) {
    _log.warn("Problem making SMI-S call: ",e);
  }
 finally {
    if (settings != null) {
      settings.close();
    }
  }
}

private void cleanupAnyGroupBackupSnapshots ( StorageSystem storage , CIMObjectPath replicationGroupPath ) { _log . info ( "Cleaning up backup snapshots for: {}" , replicationGroupPath ) ; CloseableIterator < CIMObjectPath > settings = null ; try { settings = _helper . getReference ( storage , replicationGroupPath , SmisConstants . CLAR_SETTINGS_DEFINE_STATE_RG_SAFS , null ) ; while ( settings . hasNext ( ) ) { CIMObjectPath path = settings . next ( ) ; CIMArgument [ ] inArgs = _helper . getDeleteSettingsForSnapshotInputArguments ( path , true ) ; CIMArgument [ ] outArgs = new CIMArgument [ 5 ] ; _helper . callModifySettingsDefineState ( storage , inArgs , outArgs ) ; } } catch ( Exception e ) { _log . warn ( "Problem making SMI-S call: " , e ) ; } finally { if ( settings != null ) { settings . close ( ) ; } } }
method will look up backup snapshots that were created when a snapshot restore operation was performed , then clean them up . this would be required in order to delete the replicationgroup .
