public Map<CIMObjectPath,Set<String>> findAnySLOStorageGroupsCanBeReUsed(StorageSystem forProvider,StorageSystem storage,String policyName,boolean associatedToView) throws WBEMException {
  CloseableIterator<CIMInstance> groupInstanceItr=null;
  CloseableIterator<CIMObjectPath> volumePathItr=null;
  Map<CIMObjectPath,Set<String>> groupPaths=new ConcurrentHashMap<CIMObjectPath,Set<String>>();
  try {
    CIMObjectPath controllerConfigSvcPath=_cimPath.getControllerConfigSvcPath(storage);
    _log.info("Trying to get all Storage Groups");
    groupInstanceItr=getAssociatorInstances(forProvider,controllerConfigSvcPath,null,SE_DEVICE_MASKING_GROUP,null,null,PS_V3_STORAGE_GROUP_PROPERTIES);
    while (groupInstanceItr.hasNext()) {
      CIMInstance groupInstance=groupInstanceItr.next();
      CIMObjectPath groupPath=groupInstance.getObjectPath();
      String groupName=CIMPropertyFactory.getPropertyValue(groupInstance,CP_ELEMENT_NAME);
      String fastSetting=CIMPropertyFactory.getPropertyValue(groupInstance,CP_FAST_SETTING);
      String groupAssociatedToView=CIMPropertyFactory.getPropertyValue(groupInstance,CP_ASSOCIATED_TO_VIEW);
      Set<String> returnedNativeGuids=new HashSet<String>();
      if (fastSetting.equals(policyName) && associatedToView == Boolean.parseBoolean(groupAssociatedToView) && groupName.startsWith(Constants.STORAGE_GROUP_PREFIX)) {
        _log.debug("Looping through all volumes in storage group {}",groupName);
        volumePathItr=getAssociatorNames(forProvider,groupPath,null,CIM_STORAGE_VOLUME,null,null);
        while (volumePathItr.hasNext()) {
          returnedNativeGuids.add(getVolumeNativeGuid(volumePathItr.next()));
        }
        groupPaths.put(groupPath,returnedNativeGuids);
      }
    }
  }
  finally {
    closeCIMIterator(groupInstanceItr);
    closeCIMIterator(volumePathItr);
  }
  return groupPaths;
}

public Map < CIMObjectPath , Set < String > > findAnySLOStorageGroupsCanBeReUsed ( StorageSystem forProvider , StorageSystem storage , String policyName , boolean associatedToView ) throws WBEMException { CloseableIterator < CIMInstance > groupInstanceItr = null ; CloseableIterator < CIMObjectPath > volumePathItr = null ; Map < CIMObjectPath , Set < String > > groupPaths = new ConcurrentHashMap < CIMObjectPath , Set < String > > ( ) ; try { CIMObjectPath controllerConfigSvcPath = _cimPath . getControllerConfigSvcPath ( storage ) ; _log . info ( "Trying to get all Storage Groups" ) ; groupInstanceItr = getAssociatorInstances ( forProvider , controllerConfigSvcPath , null , SE_DEVICE_MASKING_GROUP , null , null , PS_V3_STORAGE_GROUP_PROPERTIES ) ; while ( groupInstanceItr . hasNext ( ) ) { CIMInstance groupInstance = groupInstanceItr . next ( ) ; CIMObjectPath groupPath = groupInstance . getObjectPath ( ) ; String groupName = CIMPropertyFactory . getPropertyValue ( groupInstance , CP_ELEMENT_NAME ) ; String fastSetting = CIMPropertyFactory . getPropertyValue ( groupInstance , CP_FAST_SETTING ) ; String groupAssociatedToView = CIMPropertyFactory . getPropertyValue ( groupInstance , CP_ASSOCIATED_TO_VIEW ) ; Set < String > returnedNativeGuids = new HashSet < String > ( ) ; if ( fastSetting . equals ( policyName ) && associatedToView == Boolean . parseBoolean ( groupAssociatedToView ) && groupName . startsWith ( Constants . STORAGE_GROUP_PREFIX ) ) { _log . debug ( "Looping through all volumes in storage group {}" , groupName ) ; volumePathItr = getAssociatorNames ( forProvider , groupPath , null , CIM_STORAGE_VOLUME , null , null ) ; while ( volumePathItr . hasNext ( ) ) { returnedNativeGuids . add ( getVolumeNativeGuid ( volumePathItr . next ( ) ) ) ; } groupPaths . put ( groupPath , returnedNativeGuids ) ; } } } finally { closeCIMIterator ( groupInstanceItr ) ; closeCIMIterator ( volumePathItr ) ; } return groupPaths ; }
this method is used for vmax3 storage system to find exiting storage group with a specified slo for parking volumes .
