Package ClusterShell :: Module NodeUtils :: Class GroupSource
[hide private]
[frames] | no frames]

Class GroupSource

source code


ClusterShell Group Source class.

A Group Source object defines resolv_map, resolv_list, resolv_all and optional resolv_reverse methods for node group resolution. It is constituting a group resolution namespace.

Instance Methods [hide private]
 
__init__(self, name, groups=None, allgroups=None)
Initialize GroupSource
source code
 
resolv_map(self, group)
Get nodes from group `group`
source code
 
resolv_list(self)
Return a list of all group names for this group source
source code
 
resolv_all(self)
Return the content of all groups as defined by this GroupSource
source code
 
resolv_reverse(self, node)
Return the group name matching the provided node.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, groups=None, allgroups=None)
(Constructor)

source code 

Initialize GroupSource

:param name: group source name :param groups: group to nodes dict :param allgroups: optional _all groups_ result (string)

Overrides: object.__init__