* Carrier object implementation #909 * API keys: disabling of user account by a PeeringDB admin does not disable access via a User API key. Also no disable mech, only revoke. #1140 * Ops: django needs lightweight healthcheck route that confirms database connectivity #1284 * Ops: various indexes are needed #1285 * API requests with invalid Authentication headers should notify users in some way. #1220 * Allow user to change account username #1130 * UX to remove carriers from facilities more inline the other similar UX * more UX fixes for removing carriers from facilities * Cache hints are needed for optimal CDN use #970 * fixes Commandline tool "Run command" button gone #1278 * RIR status gets deleted when changes are made to the network #1279 * Improve MTU field #658 * CSRF cookie not set error from email confirmation view #1296 * expose CSP_CONNECT_SRC * fix confirm email path checking in session middleware * Ops: Emails to OPERATIONS_EMAIL need to be rate-limited #1282 * add website field to carrier ux * website field on carrier optional with org fallback * linting * add *.google-analytics.com to CSP_CONNECT_SRC * poetry relock * fix issues with confirm-email reverse during session creation validation * fix tests * fix tests * pin django-peeringdb to support_202211 * linting * django ratelimit to <4 * regen docs * fix automated net stats to only include networks with status `ok` #1283 * linting * poetry lock Co-authored-by: Matt Griswold <grizz@20c.com>
2.6 KiB
Generated from inet.py on 2023-01-17 22:33:48.360745
peeringdb_server.inet
RDAP lookup and validation.
Network validation.
Prefix renumbering.
Functions
asn_is_bogon
def asn_is_bogon(asn)
Test if an asn is bogon by being either in the documentation or private asn ranges.
Arguments: - asn
Return: - bool: True if in bogon range
asn_is_in_ranges
def asn_is_in_ranges(asn, ranges)
Test if an asn falls within any of the ranges provided.
Arguments: - asn - ranges<list[tuple(min,max)]>
Return: - bool
get_prefix_protocol
def get_prefix_protocol(prefix)
Take a network address space prefix string and return a string describing the protocol.
Will raise a ValueError if it cannot determine protocol.
Returns: str: IPv4 or IPv6
network_is_bogon
def network_is_bogon(network)
Return if the passed ipaddress network is a bogon.
Arguments: - network <ipaddress.IPv4Network|ipaddress.IPv6Network>
Return: - bool
network_is_pdb_valid
def network_is_pdb_valid(network)
Return if the passed ipaddress network is in pdb valid address space.
Arguments: - network <ipaddress.IPv4Network|ipaddress.IPv6Network>
Return: - bool
rdap_pretty_error_message
def rdap_pretty_error_message(exc)
Take an RdapException instance and return a customer friendly error message (str).
renumber_ipaddress
def renumber_ipaddress(ipaddr, old_prefix, new_prefix)
Renumber an ipaddress from old prefix to new prefix.
Arguments: - ipaddr (ipaddress.ip_address) - old_prefix (ipaddress.ip_network) - new_prefix (ipaddress.ip_network)
Returns: - ipaddress.ip_address: renumbered ip address
Classes
BogonAsn
BogonAsn(rdap.objects.RdapAsn)
On tutorial mode environments, return an instance of this to provide an rdapasn result for asns in the private and documentation ranges.
Methods
_init_
def __init__(self, asn)
Initialize self. See help(type(self)) for accurate signature.
RdapInvalidRange
RdapInvalidRange(rdap.exceptions.RdapException)
Base exception used by this module.
RdapLookup
RdapLookup(rdap.client.RdapClient)
Does RDAP lookups against defined URL.
Methods
_init_
def __init__(self)
Initialize an RdapClient.
config is a dict or rdap.config.Config object config_dir is a string pointing to a config directory
get_asn
def get_asn(self, asn)
Handle asns that fall into the private/documentation ranges manually - others are processed normally through rdap lookup.