mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
vultr: new module vr_user (#34521)
* vultr: new module vr_user * add missing doc of arg force * make password less required * optimize error msg * update docs
This commit is contained in:
parent
185f28ecee
commit
adbb2f7016
2 changed files with 319 additions and 2 deletions
|
@ -126,10 +126,14 @@ class Vultr:
|
|||
|
||||
if data:
|
||||
data_encoded = dict()
|
||||
data_list = ""
|
||||
for k, v in data.items():
|
||||
if v is not None:
|
||||
if isinstance(v, list):
|
||||
for s in v:
|
||||
data_list += '&%s[]=%s' % (k, urllib.quote(s))
|
||||
elif v is not None:
|
||||
data_encoded[k] = v
|
||||
data = urllib.urlencode(data_encoded)
|
||||
data = urllib.urlencode(data_encoded) + data_list
|
||||
|
||||
for s in range(0, self.api_config['api_retries']):
|
||||
response, info = fetch_url(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue