Merge pull request #19653 from Thingee/verify_openstack_images
Verify image exists when passed for open stack server creation
This commit is contained in:
commit
0bb7149e17
1 changed files with 3 additions and 0 deletions
|
@ -447,6 +447,9 @@ def _create_server(module, cloud):
|
|||
if not module.params['boot_volume']:
|
||||
image_id = cloud.get_image_id(
|
||||
module.params['image'], module.params['image_exclude'])
|
||||
if not image_id:
|
||||
module.fail_json(msg="Could not find image %s" %
|
||||
module.params['image'])
|
||||
|
||||
if flavor:
|
||||
flavor_dict = cloud.get_flavor(flavor)
|
||||
|
|
Loading…
Reference in a new issue