removing stringification of every value in the image dict

This commit is contained in:
Aaron Bell 2015-09-01 21:59:03 -04:00
parent cdc2b4584a
commit e4a82d78d9

View File

@ -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(