Drop **kwargs support on salt.states.saltmod.function.

This commit is contained in:
Pedro Algarvio 2014-02-17 17:43:30 +00:00
parent af782feede
commit 2ac21e9302

View File

@ -202,9 +202,9 @@ def function(
tgt,
ssh=False,
tgt_type=None,
expr_form=None,
ret='',
arg=None,
**kwargs):
arg=None:
'''
Execute a single module function on a remote minion via salt or salt-ssh
@ -231,10 +231,18 @@ def function(
'comment': '',
'result': True}
cmd_kw = {'arg': arg or []}
if 'expr_form' in kwargs and not tgt_type:
tgt_type = kwargs['expr_form']
if not tgt_type:
if expr_form and tgt_type:
ret['warnings'] = [
'Please only use \'tgt_type\' or \'expr_form\' not both. '
'Preferring \'tgt_type\' over \'expr_form\''
]
expr_form = None
elif expr_form and not tgt_type:
tgt_type = expr_form
elif not tgt_type and not expr_form:
tgt_type = 'glob'
cmd_kw['expr_form'] = tgt_type
cmd_kw['ssh'] = ssh
fun = name