mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-05-08 14:23:03 +00:00
Merge "Fail if referenced source image for a new volume does not exist"
This commit is contained in:
@@ -188,6 +188,8 @@ class VolumeModule(OpenStackModule):
|
|||||||
)
|
)
|
||||||
if self.params['image']:
|
if self.params['image']:
|
||||||
image_id = self.conn.get_image_id(self.params['image'])
|
image_id = self.conn.get_image_id(self.params['image'])
|
||||||
|
if not image_id:
|
||||||
|
self.fail_json(msg="Failed to find image '%s'" % self.params['image'])
|
||||||
volume_args['imageRef'] = image_id
|
volume_args['imageRef'] = image_id
|
||||||
|
|
||||||
if self.params['volume']:
|
if self.params['volume']:
|
||||||
|
|||||||
Reference in New Issue
Block a user