mentat.services.nerd module

Implementation of internal NERD service connector.

exception mentat.services.nerd.NerdConfigException[source]

Bases: ValueError

exception mentat.services.nerd.NerdRuntimeException[source]

Bases: RuntimeError

class mentat.services.nerd.NerdService(base_url, base_api_url, api_key)[source]

Bases: object

Implementation of internal NERD access service.

get_api_url_lookup_ip(ipaddr)[source]

Get URL for looking up given IP address in NERD service.

get_url_lookup_ip(ipaddr)[source]

Get URL for looking up given IP address in NERD service.

lookup_ip(ipaddr)[source]

Lookup given IP address in NERD service.

setup()[source]

Additional internal setup currently not necessary.

status()[source]

Display status of the service.

class mentat.services.nerd.NerdServiceManager(core_config, updates=None)[source]

Bases: object

Class representing a custom NerdServiceManager capable of understanding and parsing Mentat system core configurations and enabling easy way of unified bootstrapping of mentat.services.nerd.NerdService service.

service()[source]

Return handle to NERD service according to internal configurations.

Returns

Reference to NERD service object.

Return type

mentat.services.nerd.NerdService

mentat.services.nerd.init(core_config, updates=None)[source]

(Re-)Initialize NerdServiceManager instance at module level and store the refence within module.

mentat.services.nerd.manager()[source]

Obtain reference to NerdServiceManager instance stored at module level.

mentat.services.nerd.service()[source]

Obtain reference to NerdService instance from module level manager.