Package flumotion :: Package common :: Module netutils :: Class RoutingTable
[show private | hide private]
[frames | no frames]

Type RoutingTable

object --+
         |
        RoutingTable


Method Summary
  __init__(self)
  __iter__(self)
  __len__(self)
  addSubnet(self, route, ipv4String, maskBits)
  fromFile(klass, f, requireNames, defaultRouteName)
Make a new routing table, populated from entries in an open file object. (Class method)
  getRouteNames(self)
  iterHumanReadable(self)
  removeSubnet(self, route, ipv4String, maskBits)
  route(self, ip)
  route_iter(self, ip)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Method Details

fromFile(klass, f, requireNames=True, defaultRouteName='*default*')

Make a new routing table, populated from entries in an open
file object.

The entries are expected to have the form:
  IP-ADDRESS/MASK-BITS ROUTE-NAME

The `#' character denotes a comment. Empty lines are allowed.

@param f: file from whence to read a routing table
@type  f: open file object
@param requireNames: whether to require route names in the file
@type  requireNames: boolean, default to True
@param defaultRouteName: default name to give to a route if it
                         does not have a name in the file; only
                         used if requireNames is False
@type  defaultRouteName: anything, defaults to '*default*'

Generated by Epydoc 2.1 on Sat Apr 14 13:16:50 2007 http://epydoc.sf.net