private void rollbackMethodForCreateSnapshot(boolean isSnapshotCreated,boolean isDummyLunPathAdded,HDSApiClient hdsApiClient,StorageSystem storage,URI snapshot) throws Exception {
  if (isDummyLunPathAdded) {
    log.info("Remove dummy path while doing roll back");
    hdsProtectionOperations.removeDummyLunPath(storage,snapshot);
  }
  if (isSnapshotCreated) {
    log.info("Remove snapshot volume for roll back");
    BlockSnapshot snapshotObj=dbClient.queryObject(BlockSnapshot.class,snapshot);
    String systemObjectID=HDSUtils.getSystemObjectID(storage);
    String logicalUnitObjId=HDSUtils.getLogicalUnitObjectId(snapshotObj.getNativeId(),storage);
    hdsApiClient.deleteSnapshotVolume(systemObjectID,logicalUnitObjId,storage.getModel());
  }
}

private void rollbackMethodForCreateSnapshot ( boolean isSnapshotCreated , boolean isDummyLunPathAdded , HDSApiClient hdsApiClient , StorageSystem storage , URI snapshot ) throws Exception { if ( isDummyLunPathAdded ) { log . info ( "Remove dummy path while doing roll back" ) ; hdsProtectionOperations . removeDummyLunPath ( storage , snapshot ) ; } if ( isSnapshotCreated ) { log . info ( "Remove snapshot volume for roll back" ) ; BlockSnapshot snapshotObj = dbClient . queryObject ( BlockSnapshot . class , snapshot ) ; String systemObjectID = HDSUtils . getSystemObjectID ( storage ) ; String logicalUnitObjId = HDSUtils . getLogicalUnitObjectId ( snapshotObj . getNativeId ( ) , storage ) ; hdsApiClient . deleteSnapshotVolume ( systemObjectID , logicalUnitObjId , storage . getModel ( ) ) ; } }
roll back method to clean up stale snapshot volume on storage system
