Package ClusterShell :: Module Topology :: Class TopologyGraph
[hide private]
[frames] | no frames]

Class TopologyGraph

source code


represent a complete network topology by storing every "can reach" relations between nodes.

Instance Methods [hide private]
 
__init__(self)
initialize a new TopologyGraph instance.
source code
 
add_route(self, src_ns, dst_ns)
add a new route from src nodeset to dst nodeset.
source code
 
dest(self, from_nodeset)
return the aggregation of the destinations for a given nodeset
source code
 
to_tree(self, root)
convert the routing table to a topology tree of nodegroups
source code
 
__str__(self)
printable representation of the graph
source code
 
_routes_to_tng(self)
convert the routing table into a graph of TopologyNodeGroup instances.
source code
 
_validate(self, root)
ensure that the graph is valid for conversion to tree
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

initialize a new TopologyGraph instance.

Overrides: object.__init__

add_route(self, src_ns, dst_ns)

source code 

add a new route from src nodeset to dst nodeset. The destination nodeset must not overlap with already known destination nodesets (otherwise a TopologyError is raised)

__str__(self)
(Informal representation operator)

source code 

printable representation of the graph

Overrides: object.__str__

_routes_to_tng(self)

source code 

convert the routing table into a graph of TopologyNodeGroup instances. Loops are not very expensive here as the number of routes will always be much lower than the number of nodes.