private void addIoLimitsOnVolume(WBEMClient client,CIMObjectPath path,Map<String,VolHostIOObject> volToIolimits,Map<String,String> volToFastPolicy,String parentHostIoBw,String parentHostIoPs){
  try {
    CIMInstance instance=client.getInstance(path,false,true,SmisConstants.PS_HOST_IO);
    String hostIoBw=String.valueOf(instance.getPropertyValue(SmisConstants.EMC_MAX_BANDWIDTH));
    String hostIoPs=String.valueOf(instance.getPropertyValue(SmisConstants.EMC_MAX_IO));
    String fastSetting=SmisUtils.getSLOPolicyName(instance);
    _logger.info("Bw {} and Iops {} found for SG : {} ",new Object[]{hostIoBw,hostIoPs,String.valueOf(instance.getPropertyValue(Constants.ELEMENTNAME))});
    if (hostIoBw.equals("0") && hostIoPs.equals("0")) {
      hostIoBw=parentHostIoBw;
      hostIoPs=parentHostIoPs;
    }
    CloseableIterator<CIMObjectPath> volPaths=client.associatorNames(path,null,Constants.STORAGE_VOLUME,null,null);
    while (volPaths.hasNext()) {
      CIMObjectPath volPath=volPaths.next();
      String volumeNativeGuid=getVolumeNativeGuid(volPath);
      VolHostIOObject obj=new VolHostIOObject();
      obj.setVolNativeGuid(volumeNativeGuid);
      obj.setHostIoBw(hostIoBw);
      obj.setHostIops(hostIoPs);
      _logger.debug("Volume key: {}..obj : {}",volumeNativeGuid,obj.toString());
      volToIolimits.put(volumeNativeGuid,obj);
      if (!Strings.isNullOrEmpty(fastSetting)) {
        volToFastPolicy.put(volumeNativeGuid,fastSetting);
      }
    }
  }
 catch (  Exception e) {
    _logger.warn("Finding HostIO limits failed during unmanaged volume discovery",e);
  }
}

private void addIoLimitsOnVolume ( WBEMClient client , CIMObjectPath path , Map < String , VolHostIOObject > volToIolimits , Map < String , String > volToFastPolicy , String parentHostIoBw , String parentHostIoPs ) { try { CIMInstance instance = client . getInstance ( path , false , true , SmisConstants . PS_HOST_IO ) ; String hostIoBw = String . valueOf ( instance . getPropertyValue ( SmisConstants . EMC_MAX_BANDWIDTH ) ) ; String hostIoPs = String . valueOf ( instance . getPropertyValue ( SmisConstants . EMC_MAX_IO ) ) ; String fastSetting = SmisUtils . getSLOPolicyName ( instance ) ; _logger . info ( "Bw {} and Iops {} found for SG : {} " , new Object [ ] { hostIoBw , hostIoPs , String . valueOf ( instance . getPropertyValue ( Constants . ELEMENTNAME ) ) } ) ; if ( hostIoBw . equals ( "0" ) && hostIoPs . equals ( "0" ) ) { hostIoBw = parentHostIoBw ; hostIoPs = parentHostIoPs ; } CloseableIterator < CIMObjectPath > volPaths = client . associatorNames ( path , null , Constants . STORAGE_VOLUME , null , null ) ; while ( volPaths . hasNext ( ) ) { CIMObjectPath volPath = volPaths . next ( ) ; String volumeNativeGuid = getVolumeNativeGuid ( volPath ) ; VolHostIOObject obj = new VolHostIOObject ( ) ; obj . setVolNativeGuid ( volumeNativeGuid ) ; obj . setHostIoBw ( hostIoBw ) ; obj . setHostIops ( hostIoPs ) ; _logger . debug ( "Volume key: {}..obj : {}" , volumeNativeGuid , obj . toString ( ) ) ; volToIolimits . put ( volumeNativeGuid , obj ) ; if ( ! Strings . isNullOrEmpty ( fastSetting ) ) { volToFastPolicy . put ( volumeNativeGuid , fastSetting ) ; } } } catch ( Exception e ) { _logger . warn ( "Finding HostIO limits failed during unmanaged volume discovery" , e ) ; } }
add io limits on volume based on sg they belong to . also sets the slo name in which the sg is configured .
