Inherits list.
Inherited by rpki.resource_set.roa_prefix_set_ipv4, and rpki.resource_set.roa_prefix_set_ipv6.
Public Member Functions | |
def | __init__ |
def | __str__ |
def | from_sql |
def | parse_str |
def | to_resource_set |
def | to_roa_tuple |
Set of ROA prefixes, analogous to the resource_set_ip class.
Definition at line 766 of file resource_set.py.
def rpki.resource_set.roa_prefix_set.__init__ | ( | self, | ||
ini = None | ||||
) |
Initialize a ROA prefix set.
Definition at line 771 of file resource_set.py.
def rpki.resource_set.roa_prefix_set.__str__ | ( | self | ) |
Convert a ROA prefix set to string format.
Definition at line 791 of file resource_set.py.
def rpki.resource_set.roa_prefix_set.from_sql | ( | cls, | ||
sql, | ||||
query, | ||||
args = None | ||||
) |
Create ROA prefix set from an SQL query. sql is an object that supports execute() and fetchall() methods like a DB API 2.0 cursor object. query is an SQL query that returns a sequence of (prefix, prefixlen, max_prefixlen) triples.
Definition at line 825 of file resource_set.py.
def rpki.resource_set.roa_prefix_set.parse_str | ( | self, | ||
x | ||||
) |
Parse ROA prefix from text (eg, an XML attribute).
Definition at line 795 of file resource_set.py.
def rpki.resource_set.roa_prefix_set.to_resource_set | ( | self | ) |
Convert a ROA prefix set to a resource set. This is an irreversable transformation. We have to compute a union here because ROA prefix sets can include overlaps, while RFC 3779 resource sets cannot. This is ugly, and there is almost certainly a more efficient way to do this, but start by getting the output right before worrying about making it fast or pretty.
Definition at line 807 of file resource_set.py.
def rpki.resource_set.roa_prefix_set.to_roa_tuple | ( | self | ) |
Convert ROA prefix set into tuple format used by ROA ASN.1 encoder. This is a variation on the format used in RFC 3779.
Definition at line 840 of file resource_set.py.