mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add function to reload the salt functions
This commit is contained in:
parent
96b8314179
commit
8bffb05441
1 changed files with 7 additions and 0 deletions
|
@ -68,6 +68,7 @@ class Minion(object):
|
|||
functions[mod + '.' + attr] = getattr(module, attr)
|
||||
functions['sys.list_functions'] = lambda: functions.keys()
|
||||
functions['sys.doc'] = lambda: self.__get_docs()
|
||||
functions['sys.reload_functions'] = lambda: self.reload_functions()
|
||||
print functions
|
||||
return functions
|
||||
|
||||
|
@ -167,6 +168,12 @@ class Minion(object):
|
|||
socket.send_pyobj(payload)
|
||||
return socket.recv()
|
||||
|
||||
def reload_functions(self):
|
||||
'''
|
||||
Reload the functions dict for this minion, reading in any new functions
|
||||
'''
|
||||
self.functions = self.__load_functions()
|
||||
|
||||
def authenticate(self):
|
||||
'''
|
||||
Authenticate with the master, this method breaks the functional
|
||||
|
|
Loading…
Add table
Reference in a new issue