Accept runner and wheel api calls with nested kwargs

This takes care of a namespace collision issue
This commit is contained in:
Thomas S Hatch 2013-08-12 12:46:35 -06:00
parent fda11a5808
commit 1de62049a1

View File

@ -1789,7 +1789,7 @@ class ClearFuncs(object):
try:
fun = clear_load.pop('fun')
runner_client = salt.runner.RunnerClient(self.opts)
return runner_client.async(fun, clear_load)
return runner_client.async(fun, clear_load.get('kwarg', {}))
except Exception as exc:
log.error('Exception occurred while '
'introspecting {0}: {1}'.format(fun, exc))
@ -1831,7 +1831,7 @@ class ClearFuncs(object):
try:
fun = clear_load.pop('fun')
runner_client = salt.runner.RunnerClient(self.opts)
return runner_client.async(fun, clear_load)
return runner_client.async(fun, clear_load.get('kwarg', {}))
except Exception as exc:
log.error('Exception occurred while '
'introspecting {0}: {1}'.format(fun, exc))
@ -1878,7 +1878,7 @@ class ClearFuncs(object):
try:
fun = clear_load.pop('fun')
return self.wheel_.call_func(fun, **clear_load)
return self.wheel_.call_func(fun, **clear_load.get('kwarg', {}))
except Exception as exc:
log.error('Exception occurred while '
'introspecting {0}: {1}'.format(fun, exc))
@ -1919,7 +1919,7 @@ class ClearFuncs(object):
try:
fun = clear_load.pop('fun')
return self.wheel_.call_func(fun, **clear_load)
return self.wheel_.call_func(fun, **clear_load.get('kwarg', {}))
except Exception as exc:
log.error('Exception occurred while '
'introspecting {0}: {1}'.format(fun, exc))