Package flumotion :: Package common :: Module netutils :: Class RoutingTable
[hide private]

Class RoutingTable

source code

object --+
         |
        RoutingTable

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
getRouteNames(self) source code
 
_parseSubnet(self, ipv4String, maskBits) source code
 
addSubnet(self, route, ipv4String, maskBits=32) source code
 
removeSubnet(self, route, ipv4String, maskBits=32) source code
 
__iter__(self) source code
 
iterHumanReadable(self) source code
 
__len__(self) source code
 
route(self, ip) source code
 
route_iter(self, ip) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Methods [hide private]
 
fromFile(klass, f, requireNames=True, defaultRouteName='*default*')
Make a new routing table, populated from entries in an open file object.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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

source code 
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*'

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)