public void updateVVset(String volumeCGName,String volName,int actionValue) throws Exception {
  _log.info("3PARDriver: updateVVset enter");
  ClientResponse clientResp=null;
  final String path=MessageFormat.format(URI_UPDATE_CG,volumeCGName);
  String payload="{\"action\": " + actionValue + ", \"setmembers\": [ \""+ volName+ "\" ] }";
  _log.info("3PARDriver:updateVVset running update VV Set with URI {} and payload {} ",path,payload);
  try {
    clientResp=put(path,payload);
    if (clientResp == null) {
      _log.error("3PARDriver:updateVVset There is no response from 3PAR");
      throw new HP3PARException("There is no response from 3PAR");
    }
 else     if (clientResp.getStatus() != 200) {
      String errResp=getResponseDetails(clientResp);
      throw new HP3PARException(errResp);
    }
 else {
      _log.info("3PARDriver: updateVVset success");
    }
  }
 catch (  Exception e) {
    throw e;
  }
 finally {
    if (clientResp != null) {
      clientResp.close();
    }
    _log.info("3PARDriver:updateVVset leave");
  }
}

public void updateVVset ( String volumeCGName , String volName , int actionValue ) throws Exception { _log . info ( "3PARDriver: updateVVset enter" ) ; ClientResponse clientResp = null ; final String path = MessageFormat . format ( URI_UPDATE_CG , volumeCGName ) ; String payload = "{\"action\": " + actionValue + ", \"setmembers\": [ \"" + volName + "\" ] }" ; _log . info ( "3PARDriver:updateVVset running update VV Set with URI {} and payload {} " , path , payload ) ; try { clientResp = put ( path , payload ) ; if ( clientResp == null ) { _log . error ( "3PARDriver:updateVVset There is no response from 3PAR" ) ; throw new HP3PARException ( "There is no response from 3PAR" ) ; } else if ( clientResp . getStatus ( ) != 200 ) { String errResp = getResponseDetails ( clientResp ) ; throw new HP3PARException ( errResp ) ; } else { _log . info ( "3PARDriver: updateVVset success" ) ; } } catch ( Exception e ) { throw e ; } finally { if ( clientResp != null ) { clientResp . close ( ) ; } _log . info ( "3PARDriver:updateVVset leave" ) ; } }
add or remove volume from an existing consistency group or vv set
