(self)
return profiles
Load the configured SNMP profiles.
Load the configured SNMP profiles.
Load the configured SNMP profiles .
def _load_profiles(self):
        # type: () -> Dict[str, Dict[str, Any]]
        """
        Load the configured SNMP profiles.
        """
        configured_profiles = self.init_config.get('profiles')

        if configured_profiles is None:
            return get_default_profiles()

        profiles = {}

        for name, profile in configured_profiles.items():
            try:
                definition = get_profile_definition(profile)
            except Exception as exc:
                raise ConfigurationError("Couldn't read profile '{}': {}".format(name, exc))

            try:
                recursively_expand_base_profiles(definition)
            except Exception as exc:
                raise ConfigurationError("Failed to expand base profiles in profile '{}': {}".format(name, exc))

            profiles[name] = {'definition': definition}

        return profiles
def _load_profiles ( self ) : # type: () -> Dict[str, Dict[str, Any]] configured_profiles = self . init_config . get ( 'profiles' ) if configured_profiles is None : return get_default_profiles ( ) profiles = { } for name , profile in configured_profiles . items ( ) : try : definition = get_profile_definition ( profile ) except Exception as exc : raise ConfigurationError ( "Couldn't read profile '{}': {}" . format ( name , exc ) ) try : recursively_expand_base_profiles ( definition ) except Exception as exc : raise ConfigurationError ( "Failed to expand base profiles in profile '{}': {}" . format ( name , exc ) ) profiles [ name ] = { 'definition' : definition } return profiles