mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Use tgt_type instead of expr_form in new run_job_async func
This commit is contained in:
parent
9b2bbe77ef
commit
7693437fa0
@ -351,7 +351,7 @@ class LocalClient(object):
|
|||||||
tgt,
|
tgt,
|
||||||
fun,
|
fun,
|
||||||
arg=(),
|
arg=(),
|
||||||
expr_form='glob',
|
tgt_type='glob',
|
||||||
ret='',
|
ret='',
|
||||||
timeout=None,
|
timeout=None,
|
||||||
jid='',
|
jid='',
|
||||||
@ -373,6 +373,15 @@ class LocalClient(object):
|
|||||||
>>> local.run_job_async('*', 'test.sleep', [300])
|
>>> local.run_job_async('*', 'test.sleep', [300])
|
||||||
{'jid': '20131219215650131543', 'minions': ['jerry']}
|
{'jid': '20131219215650131543', 'minions': ['jerry']}
|
||||||
'''
|
'''
|
||||||
|
if 'expr_form' in kwargs:
|
||||||
|
salt.utils.warn_until(
|
||||||
|
'Fluorine',
|
||||||
|
'The target type should be passed using the \'tgt_type\' '
|
||||||
|
'argument instead of \'expr_form\'. Support for using '
|
||||||
|
'\'expr_form\' will be removed in Salt Fluorine.'
|
||||||
|
)
|
||||||
|
tgt_type = kwargs.pop('expr_form')
|
||||||
|
|
||||||
arg = salt.utils.args.condition_input(arg, kwarg)
|
arg = salt.utils.args.condition_input(arg, kwarg)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -380,7 +389,7 @@ class LocalClient(object):
|
|||||||
tgt,
|
tgt,
|
||||||
fun,
|
fun,
|
||||||
arg,
|
arg,
|
||||||
expr_form,
|
tgt_type,
|
||||||
ret,
|
ret,
|
||||||
jid=jid,
|
jid=jid,
|
||||||
timeout=self._get_timeout(timeout),
|
timeout=self._get_timeout(timeout),
|
||||||
|
Loading…
Reference in New Issue
Block a user