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

Class TopologyParser

source code


This class offers a way to interpret network topologies supplied under the form :

# Comment <these machines> : <can reach these ones>

Instance Methods [hide private]
 
__init__(self, filename=None)
instance wide variables initialization
source code
 
load(self, filename)
read a given topology configuration file and store the results in self._routes.
source code
 
_build_graph(self)
build a network topology graph according to the information we got from the configuration file.
source code
 
tree(self, root, force_rebuild=False)
Return a previously generated propagation tree or build it if required.
source code

Inherited from ConfigParser.ConfigParser: get, items

Inherited from ConfigParser.ConfigParser (private): _interpolate, _interpolation_replace

Inherited from ConfigParser.RawConfigParser: add_section, defaults, getboolean, getfloat, getint, has_option, has_section, options, optionxform, read, readfp, remove_option, remove_section, sections, set, write

Inherited from ConfigParser.RawConfigParser (private): _get, _read

Class Variables [hide private]

Inherited from ConfigParser.ConfigParser (private): _KEYCRE

Inherited from ConfigParser.RawConfigParser: OPTCRE, OPTCRE_NV, SECTCRE

Inherited from ConfigParser.RawConfigParser (private): _boolean_states

Method Details [hide private]

__init__(self, filename=None)
(Constructor)

source code 

instance wide variables initialization

Overrides: ConfigParser.RawConfigParser.__init__

load(self, filename)

source code 

read a given topology configuration file and store the results in self._routes. Then build a propagation tree.

tree(self, root, force_rebuild=False)

source code 

Return a previously generated propagation tree or build it if required. As rebuilding tree can be quite expensive, once built, the propagation tree is cached. you can force a re-generation using the optionnal `force_rebuild' parameter.