mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 10:51:24 -07:00
Added basic auth argument spec to utils (#15585)
This commit is contained in:
parent
8bf1c53b21
commit
1999e71658
1 changed files with 11 additions and 0 deletions
|
@ -60,6 +60,17 @@ def retry_argument_spec(spec=None):
|
|||
arg_spec.update(spec)
|
||||
return arg_spec
|
||||
|
||||
def basic_auth_argument_spec(spec=None):
|
||||
arg_spec = (dict(
|
||||
api_username=dict(type='str', required=False),
|
||||
api_password=dict(type='str', required=False, no_log=True),
|
||||
api_url=dict(type='str', required=False),
|
||||
validate_certs=dict(type='bool', default=True)
|
||||
))
|
||||
if spec:
|
||||
arg_spec.update(spec)
|
||||
return arg_spec
|
||||
|
||||
def rate_limit(rate=None, rate_limit=None):
|
||||
"""rate limiting decorator"""
|
||||
minrate = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue