Module Contents

class noc.peer.models.whoiscache.WhoisCache

Bases: object

Whois cache interface

classmethod has_asset_members(cls)

Returns True if cache contains asset.members :return:

classmethod has_origin_routes(cls)

Returns True if cache contains origin.routes :return:

classmethod has_asset(cls, as_set)

Returns true if as-set has members in cache :param as_set: :return:

classmethod resolve_as_set(cls, as_set, seen=None, collection=None)
classmethod _resolve_as_set_prefixes(cls, as_set)
classmethod resolve_as_set_prefixes(cls, as_set, optimize=None)
classmethod resolve_as_set_prefixes_maxlen(cls, as_set, optimize=None)

Generate prefixes for as-sets. Returns a list of (prefix, min length, max length)

classmethod cone_power(cls, as_set, mask)

Returns amount of prefixes of size _mask_ needed to cover as_set