mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
if booted from volume, use string from image
If cloud servers in openstack are booted with a volume as their root partition, they do not have an image assigned to them, so they won't have an image id. In these cases just pass the string from node.image to the image information about that machine. Fixes #47766
This commit is contained in:
parent
71f587edd7
commit
4cb1636c4b
1 changed files with 4 additions and 1 deletions
|
@ -466,7 +466,10 @@ def show_instance(name, conn=None, call=None):
|
|||
ret['public_ips'] = _get_ips(node, 'public')
|
||||
ret['floating_ips'] = _get_ips(node, 'floating')
|
||||
ret['fixed_ips'] = _get_ips(node, 'fixed')
|
||||
ret['image'] = conn.get_image(node.image.id).name
|
||||
if isinstance(node.image, six.string_types):
|
||||
ret['image'] = node.image
|
||||
else:
|
||||
ret['image'] = conn.get_image(node.image.id).name
|
||||
return ret
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue