RPKI Engine 1.0
Public Member Functions | Static Public Attributes | Private Member Functions

rpki.resource_set.resource_set Class Reference

Inheritance diagram for rpki.resource_set.resource_set:
Inheritance graph
Collaboration diagram for rpki.resource_set.resource_set:
Collaboration graph

List of all members.

Public Member Functions

def __init__
def __str__
def append
def canonize
def contains
def difference
def extend
def from_sql
def intersection
def issubset
def issuperset
def parse_str
def symmetric_difference
def union

Static Public Attributes

 canonical = False
 Whether this resource_set is currently in canonical form.
 inherit = False
 Boolean indicating whether this resource_set uses RFC 3779 inheritance.

Private Member Functions

def _comm

Detailed Description

Generic resource set, a list subclass containing resource ranges.

This is a virtual class.  You probably don't want to use it
directly.

Definition at line 286 of file resource_set.py.


Constructor & Destructor Documentation

def rpki.resource_set.resource_set.__init__ (   self,
  ini = None 
)
Initialize a resource_set.

Definition at line 304 of file resource_set.py.


Member Function Documentation

def rpki.resource_set.resource_set.__str__ (   self)
Convert a resource_set to string format.

Definition at line 353 of file resource_set.py.

def rpki.resource_set.resource_set._comm (   self,
  other 
) [private]
Like comm(1), sort of.

Returns a tuple of three resource sets: resources only in self,
resources only in other, and resources in both.  Used (not very
efficiently) as the basis for most set operations on resource
sets.

Definition at line 362 of file resource_set.py.

def rpki.resource_set.resource_set.append (   self,
  item 
)
Wrapper around list.append() (q.v.) to reset canonical flag.

Definition at line 339 of file resource_set.py.

def rpki.resource_set.resource_set.canonize (   self)
Whack this resource_set into canonical form.

Definition at line 323 of file resource_set.py.

def rpki.resource_set.resource_set.contains (   self,
  item 
)
Set membership test for resource sets.

Definition at line 447 of file resource_set.py.

def rpki.resource_set.resource_set.difference (   self,
  other 
)
Set difference for resource sets.

Definition at line 434 of file resource_set.py.

def rpki.resource_set.resource_set.extend (   self,
  item 
)
Wrapper around list.extend() (q.v.) to reset canonical flag.

Definition at line 346 of file resource_set.py.

def rpki.resource_set.resource_set.from_sql (   cls,
  sql,
  query,
  args = None 
)
Create resource 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 (min, max) pairs.

Definition at line 487 of file resource_set.py.

def rpki.resource_set.resource_set.intersection (   self,
  other 
)
Set intersection for resource sets.

Definition at line 428 of file resource_set.py.

def rpki.resource_set.resource_set.issubset (   self,
  other 
)
Test whether self is a subset (possibly improper) of other.

Definition at line 471 of file resource_set.py.

def rpki.resource_set.resource_set.issuperset (   self,
  other 
)
Test whether self is a superset (possibly improper) of other.

Definition at line 480 of file resource_set.py.

def rpki.resource_set.resource_set.parse_str (   cls,
  s 
)
Parse resource set from text string (eg, XML attributes).  This is
a backwards compatability wrapper, real functionality is now part
of the range classes.

Definition at line 503 of file resource_set.py.

def rpki.resource_set.resource_set.symmetric_difference (   self,
  other 
)
Set symmetric difference (XOR) for resource sets.

Definition at line 440 of file resource_set.py.

def rpki.resource_set.resource_set.union (   self,
  other 
)
Set union for resource sets.

Definition at line 396 of file resource_set.py.


Member Data Documentation

Whether this resource_set is currently in canonical form.

Definition at line 302 of file resource_set.py.

Boolean indicating whether this resource_set uses RFC 3779 inheritance.

Reimplemented in rpki.resource_set.resource_set_as, and rpki.resource_set.resource_set_ip.

Definition at line 297 of file resource_set.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables