private void rollBackVpoolOnVplexBackendVolume(Volume volume,List<Volume> volumesToUpdate,DbClient dbClient,URI oldVpoolURI){
  Volume backendSrc=VPlexUtil.getVPLEXBackendVolume(volume,true,dbClient,false);
  if (backendSrc != null) {
    _log.info("Rolling back virtual pool on VPLEX backend Source volume {}({})",backendSrc.getId(),backendSrc.getLabel());
    backendSrc.setVirtualPool(oldVpoolURI);
    _log.info("Set volume's virtual pool back to {}",oldVpoolURI);
    volumesToUpdate.add(backendSrc);
    Volume backendHa=VPlexUtil.getVPLEXBackendVolume(volume,false,dbClient,false);
    if (backendHa != null) {
      _log.info("Rolling back virtual pool on VPLEX backend Distributed volume {}({})",backendHa.getId(),backendHa.getLabel());
      VirtualPool oldVpoolObj=dbClient.queryObject(VirtualPool.class,oldVpoolURI);
      VirtualPool oldHAVpool=VirtualPool.getHAVPool(oldVpoolObj,dbClient);
      if (oldHAVpool == null) {
        oldHAVpool=oldVpoolObj;
      }
      backendHa.setVirtualPool(oldHAVpool.getId());
      _log.info("Set volume's virtual pool back to {}",oldHAVpool.getId());
      volumesToUpdate.add(backendHa);
    }
  }
}

private void rollBackVpoolOnVplexBackendVolume ( Volume volume , List < Volume > volumesToUpdate , DbClient dbClient , URI oldVpoolURI ) { Volume backendSrc = VPlexUtil . getVPLEXBackendVolume ( volume , true , dbClient , false ) ; if ( backendSrc != null ) { _log . info ( "Rolling back virtual pool on VPLEX backend Source volume {}({})" , backendSrc . getId ( ) , backendSrc . getLabel ( ) ) ; backendSrc . setVirtualPool ( oldVpoolURI ) ; _log . info ( "Set volume's virtual pool back to {}" , oldVpoolURI ) ; volumesToUpdate . add ( backendSrc ) ; Volume backendHa = VPlexUtil . getVPLEXBackendVolume ( volume , false , dbClient , false ) ; if ( backendHa != null ) { _log . info ( "Rolling back virtual pool on VPLEX backend Distributed volume {}({})" , backendHa . getId ( ) , backendHa . getLabel ( ) ) ; VirtualPool oldVpoolObj = dbClient . queryObject ( VirtualPool . class , oldVpoolURI ) ; VirtualPool oldHAVpool = VirtualPool . getHAVPool ( oldVpoolObj , dbClient ) ; if ( oldHAVpool == null ) { oldHAVpool = oldVpoolObj ; } backendHa . setVirtualPool ( oldHAVpool . getId ( ) ) ; _log . info ( "Set volume's virtual pool back to {}" , oldHAVpool . getId ( ) ) ; volumesToUpdate . add ( backendHa ) ; } } }
roll back vpool on vplex backend volumes .
