mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Init default args/kwargs if none are supplied in netap
This commit is contained in:
parent
cfe10ed9d6
commit
b4c5b4fc94
@ -114,6 +114,10 @@ class NetapiClient(object):
|
||||
:return: Returns the result from the runner module
|
||||
'''
|
||||
kwargs['fun'] = fun
|
||||
if 'kwargs' not in kwargs:
|
||||
kwargs['kwargs'] = {}
|
||||
if 'args' not in kwargs:
|
||||
kwargs['args'] = []
|
||||
runner = salt.runner.RunnerClient(self.opts)
|
||||
return runner.cmd_sync(kwargs, timeout=timeout)
|
||||
|
||||
@ -126,6 +130,10 @@ class NetapiClient(object):
|
||||
:return: event data and a job ID for the executed function.
|
||||
'''
|
||||
kwargs['fun'] = fun
|
||||
if 'kwargs' not in kwargs:
|
||||
kwargs['kwargs'] = {}
|
||||
if 'args' not in kwargs:
|
||||
kwargs['args'] = []
|
||||
runner = salt.runner.RunnerClient(self.opts)
|
||||
return runner.cmd_async(kwargs)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user