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

Class TopologyNodeGroup

source code


Base element for in-memory representation of the propagation tree. Contains a nodeset, with parent-children relationships with other instances.

Instance Methods [hide private]
 
__init__(self, nodeset=None)
initialize a new TopologyNodeGroup instance.
source code
 
printable_subtree(self, prefix='')
recursive method that returns a printable version the subtree from the current node with a nice presentation
source code
 
add_child(self, child)
add a child to the children list and define the current instance as its parent
source code
 
clear_child(self, child, strict=False)
remove a child
source code
 
clear_children(self)
delete all children
source code
 
children(self)
get the children list
source code
 
children_ns(self)
return the children as a nodeset
source code
 
children_len(self)
returns the number of children as the sum of the size of the children's nodeset
source code
 
_is_last(self)
used to display the subtree: we won't prefix the line the same way if the current instance is the last child of the children list of its parent.
source code
 
__str__(self)
printable representation of the nodegroup
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, nodeset=None)
(Constructor)

source code 

initialize a new TopologyNodeGroup instance.

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

printable representation of the nodegroup

Overrides: object.__str__