private void addEndpointAliasName(WBEMClient client,Map<String,FCEndpoint> fabricEps){
  CloseableIterator<CIMInstance> it=null;
  long start=System.currentTimeMillis();
  int count=0;
  try {
    CIMObjectPath path=CimObjectPathCreator.createInstance(_Brocade_ZoneMembershipSettingDataInZoneAlias,_namespace);
    it=client.enumerateInstances(path,false,true,true,null);
    CIMInstance ins=null;
    FCEndpoint ep;
    String aliasPath=null;
    String memberPath=null;
    String wwn=null;
    while (it.hasNext()) {
      count++;
      ins=it.next();
      _log.debug(ins.toString());
      aliasPath=cimStringProperty(ins,_ManagedElement);
      memberPath=cimStringProperty(ins,_SettingData);
      wwn=formatWWN(getPropertyValueFromString(memberPath,SmisConstants.CP_NSNAME));
      ep=fabricEps.get(wwn);
      if (ep != null) {
        ep.setRemotePortAlias(getPropertyValueFromString(aliasPath,SmisConstants.CP_NSNAME));
        fabricEps.remove(ep);
        _log.debug("added alias " + ep.getRemotePortAlias() + " to "+ ep.getRemotePortName());
      }
    }
  }
 catch (  Exception ex) {
    _log.warn("An exception was encountered while updating the endpoint aliases. " + "Discovery will proceed. The exception is: " + ex.getMessage());
  }
 finally {
    if (it != null) {
      it.close();
    }
  }
  _log.info("Processing " + count + " aliases took "+ (start - System.currentTimeMillis()));
}

private void addEndpointAliasName ( WBEMClient client , Map < String , FCEndpoint > fabricEps ) { CloseableIterator < CIMInstance > it = null ; long start = System . currentTimeMillis ( ) ; int count = 0 ; try { CIMObjectPath path = CimObjectPathCreator . createInstance ( _Brocade_ZoneMembershipSettingDataInZoneAlias , _namespace ) ; it = client . enumerateInstances ( path , false , true , true , null ) ; CIMInstance ins = null ; FCEndpoint ep ; String aliasPath = null ; String memberPath = null ; String wwn = null ; while ( it . hasNext ( ) ) { count ++ ; ins = it . next ( ) ; _log . debug ( ins . toString ( ) ) ; aliasPath = cimStringProperty ( ins , _ManagedElement ) ; memberPath = cimStringProperty ( ins , _SettingData ) ; wwn = formatWWN ( getPropertyValueFromString ( memberPath , SmisConstants . CP_NSNAME ) ) ; ep = fabricEps . get ( wwn ) ; if ( ep != null ) { ep . setRemotePortAlias ( getPropertyValueFromString ( aliasPath , SmisConstants . CP_NSNAME ) ) ; fabricEps . remove ( ep ) ; _log . debug ( "added alias " + ep . getRemotePortAlias ( ) + " to " + ep . getRemotePortName ( ) ) ; } } } catch ( Exception ex ) { _log . warn ( "An exception was encountered while updating the endpoint aliases. " + "Discovery will proceed. The exception is: " + ex . getMessage ( ) ) ; } finally { if ( it != null ) { it . close ( ) ; } } _log . info ( "Processing " + count + " aliases took " + ( start - System . currentTimeMillis ( ) ) ) ; }
update the fcendpoints with aliases from the alias database . this function uses the associations to improve performance and parses the alias name and member address from the paths : brocade_zonemembershipsettingdatainzonealias { managedelement = " root / brocade1 : brocade_zonealias . instanceid = \ " name = hala_rest_api_zone_12 ; active = false ; fabric = 10000027f858f6c0 ; classname = brocade_zonealias \ " " ; settingdata = " root / brocade1 : brocade_zonemembershipsettingdata . instanceid = \ " name = 2010101010101010 ; zmtype = 5 ; active = false ; fabric = 10000027f858f6c0 ; classname = brocade_zonemembershipsettingdata \ " " ; } ;
