private void releaseLUSEVolumesIfPresent(String systemObjectID,Set<String> logicalUnitIdList){
  if (null != logicalUnitIdList && !logicalUnitIdList.isEmpty()) {
    for (    String logicalUnitObjectId : logicalUnitIdList) {
      try {
        LogicalUnit logicalUnit=getLogicalUnitInfo(systemObjectID,logicalUnitObjectId);
        if (null == logicalUnit || logicalUnit.getComposite() == 0) {
          continue;
        }
        if (logicalUnit.getComposite() == 1) {
          releaseLUSE(systemObjectID,logicalUnitObjectId);
        }
      }
 catch (      Exception e) {
        log.error(e.getMessage(),e);
      }
    }
  }
}

private void releaseLUSEVolumesIfPresent ( String systemObjectID , Set < String > logicalUnitIdList ) { if ( null != logicalUnitIdList && ! logicalUnitIdList . isEmpty ( ) ) { for ( String logicalUnitObjectId : logicalUnitIdList ) { try { LogicalUnit logicalUnit = getLogicalUnitInfo ( systemObjectID , logicalUnitObjectId ) ; if ( null == logicalUnit || logicalUnit . getComposite ( ) == 0 ) { continue ; } if ( logicalUnit . getComposite ( ) == 1 ) { releaseLUSE ( systemObjectID , logicalUnitObjectId ) ; } } catch ( Exception e ) { log . error ( e . getMessage ( ) , e ) ; } } } }
when we delete a logicalunit we should first check whether it is luse volume or not . if it is luse volume , then we should release luse and delete all volumes .
