Merge pull request #32005 from Ashald/bugfix/netapi-runner-client-kwargs-yamlify

Bugfix: `RunnerClient` keyword argument values processing
This commit is contained in:
Mike Place 2016-03-21 15:10:47 -06:00
commit 2f808d8762
2 changed files with 5 additions and 2 deletions

View File

@ -65,9 +65,11 @@ class RunnerClient(mixins.SyncClientMixin, mixins.AsyncClientMixin, object):
# Support old style calls where arguments could be specified in 'low' top level
if not low.get('args') and not low.get('kwargs'): # not specified or empty
verify_fun(self.functions, fun)
merged_args_kwargs = salt.utils.args.condition_input([], low)
parsed_input = salt.utils.args.parse_input(merged_args_kwargs)
args, kwargs = salt.minion.load_args_and_kwargs(
self.functions[fun],
salt.utils.args.condition_input([], low),
parsed_input,
self.opts,
ignore_invalid=True
)

View File

@ -60,7 +60,8 @@ def parse_input(args, condition=True):
# condition_input is called below, but this is the only way to
# gracefully handle both CLI and API input.
if arg.pop('__kwarg__', False) is True:
_kwargs.update(arg)
for key, val in six.iteritems(arg):
_kwargs[key] = yamlify_arg(val)
else:
_args.append(arg)
else: