mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #41901 from coolstone16/httpquery_receive_opts
Allow modifiable opts for http.query in module and runner.
This commit is contained in:
commit
d1f80bab39
@ -30,7 +30,12 @@ def query(url, **kwargs):
|
||||
salt '*' http.query http://somelink.com/ method=POST \
|
||||
data='<xml>somecontent</xml>'
|
||||
'''
|
||||
return salt.utils.http.query(url=url, opts=__opts__, **kwargs)
|
||||
opts = __opts__.copy()
|
||||
if 'opts' in kwargs:
|
||||
opts.update(kwargs['opts'])
|
||||
del kwargs['opts']
|
||||
|
||||
return salt.utils.http.query(url=url, opts=opts, **kwargs)
|
||||
|
||||
|
||||
def wait_for_successful_query(url, wait_for=300, **kwargs):
|
||||
|
@ -35,8 +35,12 @@ def query(url, output=True, **kwargs):
|
||||
log.warning('Output option has been deprecated. Please use --quiet.')
|
||||
if 'node' not in kwargs:
|
||||
kwargs['node'] = 'master'
|
||||
opts = __opts__.copy()
|
||||
if 'opts' in kwargs:
|
||||
opts.update(kwargs['opts'])
|
||||
del kwargs['opts']
|
||||
|
||||
ret = salt.utils.http.query(url=url, opts=__opts__, **kwargs)
|
||||
ret = salt.utils.http.query(url=url, opts=opts, **kwargs)
|
||||
return ret
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user