mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
update for problems with scaleway api
This commit is contained in:
parent
83e0c6e929
commit
1e31d7cd48
1 changed files with 3 additions and 5 deletions
|
@ -78,7 +78,7 @@ def avail_images(call=None):
|
|||
"-f or --function, or with the --list-images option"
|
||||
)
|
||||
|
||||
items = query(method="images")
|
||||
items = query(method="images", root="marketplace_root")
|
||||
ret = {}
|
||||
for image in items["images"]:
|
||||
ret[image["id"]] = {}
|
||||
|
@ -371,13 +371,11 @@ def query(method="servers", server_id=None, command=None, args=None, http_method
|
|||
"Error: '{1}'".format(request.status_code, request.text)
|
||||
)
|
||||
|
||||
log.debug(request.url)
|
||||
|
||||
# success without data
|
||||
if request.status_code == 204:
|
||||
if request["status"] == 204:
|
||||
return True
|
||||
|
||||
return request.json()
|
||||
return salt.utils.json.loads(request["body"])
|
||||
|
||||
|
||||
def script(server_):
|
||||
|
|
Loading…
Add table
Reference in a new issue