mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #40572 from rallytime/fix-40278
Clean out kwargs dict in cloud.action before calling cloud driver function
This commit is contained in:
commit
b1698e830e
2 changed files with 6 additions and 1 deletions
|
@ -1527,6 +1527,11 @@ class Cloud(object):
|
|||
if driver not in ret[alias]:
|
||||
ret[alias][driver] = {}
|
||||
|
||||
# Clean kwargs of "__pub_*" data before running the cloud action call.
|
||||
# Prevents calling positional "kwarg" arg before "call" when no kwarg
|
||||
# argument is present in the cloud driver function's arg spec.
|
||||
kwargs = salt.utils.clean_kwargs(**kwargs)
|
||||
|
||||
if kwargs:
|
||||
ret[alias][driver][vm_name] = self.clouds[fun](
|
||||
vm_name, kwargs, call='action'
|
||||
|
|
|
@ -1628,7 +1628,7 @@ def clean_kwargs(**kwargs):
|
|||
Return a dict without any of the __pub* keys (or any other keys starting
|
||||
with a dunder) from the kwargs dict passed into the execution module
|
||||
functions. These keys are useful for tracking what was used to invoke
|
||||
the function call, but they may not be desierable to have if passing the
|
||||
the function call, but they may not be desirable to have if passing the
|
||||
kwargs forward wholesale.
|
||||
'''
|
||||
ret = {}
|
||||
|
|
Loading…
Add table
Reference in a new issue