Merge branch 'returners-functions' into returner-success

This commit is contained in:
Evan Borgstrom 2012-08-08 17:42:39 -04:00
commit f65a18ab81
2 changed files with 6 additions and 4 deletions

View File

@ -73,12 +73,14 @@ def raw_mod(opts, name, functions):
return load.gen_module(name, functions) return load.gen_module(name, functions)
def returners(opts): def returners(opts, functions):
''' '''
Returns the returner modules Returns the returner modules
''' '''
load = _create_loader(opts, 'returners', 'returner') load = _create_loader(opts, 'returners', 'returner')
return load.filter_func('returner') pack = {'name': '__salt__',
'value': functions}
return load.filter_func('returner', pack)
def pillars(opts, functions): def pillars(opts, functions):

View File

@ -109,7 +109,7 @@ class SMinion(object):
self.opts['environment'], self.opts['environment'],
).compile_pillar() ).compile_pillar()
self.functions = salt.loader.minion_mods(self.opts) self.functions = salt.loader.minion_mods(self.opts)
self.returners = salt.loader.returners(self.opts) self.returners = salt.loader.returners(self.opts, self.functions)
self.states = salt.loader.states(self.opts, self.functions) self.states = salt.loader.states(self.opts, self.functions)
self.rend = salt.loader.render(self.opts, self.functions) self.rend = salt.loader.render(self.opts, self.functions)
self.matcher = Matcher(self.opts, self.functions) self.matcher = Matcher(self.opts, self.functions)
@ -161,7 +161,7 @@ class Minion(object):
''' '''
self.opts['grains'] = salt.loader.grains(self.opts) self.opts['grains'] = salt.loader.grains(self.opts)
functions = salt.loader.minion_mods(self.opts) functions = salt.loader.minion_mods(self.opts)
returners = salt.loader.returners(self.opts) returners = salt.loader.returners(self.opts, functions)
return functions, returners return functions, returners
def _handle_payload(self, payload): def _handle_payload(self, payload):