mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
removing stringification of every value in the image dict
This commit is contained in:
parent
cdc2b4584a
commit
e4a82d78d9
@ -117,7 +117,7 @@ def avail_images(call=None):
|
||||
for image in items['images']:
|
||||
ret[image['id']] = {}
|
||||
for item in image.keys():
|
||||
ret[image['id']][item] = str(image[item])
|
||||
ret[image['id']][item] = image[item]
|
||||
|
||||
page += 1
|
||||
try:
|
||||
@ -224,12 +224,13 @@ def get_image(vm_):
|
||||
Return the image object to use
|
||||
'''
|
||||
images = avail_images()
|
||||
vm_image = str(config.get_cloud_config_value(
|
||||
vm_image = config.get_cloud_config_value(
|
||||
'image', vm_, __opts__, search_global=False
|
||||
))
|
||||
)
|
||||
for image in images:
|
||||
log.info(images[image])
|
||||
if vm_image in (images[image]['name'], images[image]['slug'], images[image]['id']):
|
||||
if images[image]['slug'] != 'None':
|
||||
if images[image]['slug'] is not None:
|
||||
return images[image]['slug']
|
||||
return int(images[image]['id'])
|
||||
raise SaltCloudNotFound(
|
||||
|
Loading…
Reference in New Issue
Block a user