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

Class TopologyTree

source code


represent a simplified network topology as a tree of machines to use to connect to other ones

Nested Classes [hide private]
  TreeIterator
efficient tool for tree-traversal
Instance Methods [hide private]
 
__init__(self)
initialize a new TopologyTree instance.
source code
 
load(self, rootnode)
load topology tree
source code
 
__iter__(self)
provide an iterator on the tree's elements
source code
 
__str__(self)
printable representation of the tree
source code
 
find_nodegroup(self, node)
Find TopologyNodeGroup from given node (helper to find new root)
source code
 
inner_node_count(self)
helper to get inner node count (root and gateway nodes)
source code
 
leaf_node_count(self)
helper to get leaf node count
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 TopologyTree instance.

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

printable representation of the tree

Overrides: object.__str__