Pass the minion_opts through the FunctionWrapper

This commit is contained in:
Colton Myers 2015-05-04 15:33:39 -06:00
parent cb69cd07de
commit 8e3e8e073a
2 changed files with 6 additions and 0 deletions

View file

@ -683,6 +683,7 @@ class Single(object):
self.opts,
self.id,
fsclient=self.fsclient,
minion_opts=self.minion_opts,
**self.target)
opts_pkg = pre_wrapper['test.opts_pkg']()
opts_pkg['file_roots'] = self.opts['file_roots']
@ -739,6 +740,7 @@ class Single(object):
opts,
self.id,
fsclient=self.fsclient,
minion_opts=self.minion_opts,
**self.target)
self.wfuncs = salt.loader.ssh_wrapper(opts, wrapper, self.context)
wrapper.wfuncs = self.wfuncs

View file

@ -29,6 +29,7 @@ class FunctionWrapper(object):
mods=None,
fsclient=None,
cmd_prefix=None,
minion_opts=None,
**kwargs):
super(FunctionWrapper, self).__init__()
self.cmd_prefix = cmd_prefix
@ -39,6 +40,7 @@ class FunctionWrapper(object):
'host': host}
self.fsclient = fsclient
self.kwargs.update(kwargs)
self.minion_opts = minion_opts
def __getitem__(self, cmd):
'''
@ -59,6 +61,7 @@ class FunctionWrapper(object):
mods=self.mods,
fsclient=self.fsclient,
cmd_prefix=cmd,
minion_opts=self.minion_opts
**kwargs)
if self.cmd_prefix:
@ -83,6 +86,7 @@ class FunctionWrapper(object):
mods=self.mods,
wipe=True,
fsclient=self.fsclient,
minion_opts = self.minion_opts
**self.kwargs
)
stdout, stderr, _ = single.cmd_block()