(self, sys_object_oid)
return matched_profiles_by_oid[oid]
Return the most specific profile that matches the given sysObjectID.
Return the most specific profile that matches the given sysObjectID.
Return the most specific profile that matches the given sysObjectID .
def _profile_for_sysobject_oid(self, sys_object_oid):
        # type: (str) -> str
        """
        Return the most specific profile that matches the given sysObjectID.
        """
        matched_profiles_by_oid = {
            oid: self.profiles_by_oid[oid] for oid in self.profiles_by_oid if fnmatch.fnmatch(sys_object_oid, oid)
        }

        if not matched_profiles_by_oid:
            raise ConfigurationError('No profile matching sysObjectID {}'.format(sys_object_oid))

        oid = max(matched_profiles_by_oid.keys(), key=lambda oid: oid_pattern_specificity(oid))

        return matched_profiles_by_oid[oid]
def _profile_for_sysobject_oid ( self , sys_object_oid ) : # type: (str) -> str matched_profiles_by_oid = { oid : self . profiles_by_oid [ oid ] for oid in self . profiles_by_oid if fnmatch . fnmatch ( sys_object_oid , oid ) } if not matched_profiles_by_oid : raise ConfigurationError ( 'No profile matching sysObjectID {}' . format ( sys_object_oid ) ) oid = max ( matched_profiles_by_oid . keys ( ) , key = lambda oid : oid_pattern_specificity ( oid ) ) return matched_profiles_by_oid [ oid ]