GroupSource class managing external calls for nodegroup support.
Upcall results are cached for a customizable amount of time. This is
controlled by `cache_time` attribute. Default is 3600 seconds.
|
__init__(self,
name,
map_upcall,
all_upcall=None,
list_upcall=None,
reverse_upcall=None,
cfgdir=None,
cache_time=None)
Initialize GroupSource |
source code
|
|
|
clear_cache(self)
Remove all previously cached upcall results whatever their lifetime
is. |
source code
|
|
|
_upcall_read(self,
cmdtpl,
args={ } )
Invoke the specified upcall command, raise an Exception if something
goes wrong and return the command output otherwise. |
source code
|
|
|
|
|
|
|
resolv_list(self)
Return a list of all group names for this group source, using the
cached value if available. |
source code
|
|
|
resolv_all(self)
Return the content of special group ALL, using the cached value if
available. |
source code
|
|
|
resolv_reverse(self,
node)
Return the group name matching the provided node, using the cached
value if available. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|