Commit 320d4114 by jctanner

Merge pull request #5289 from rstrox/devel

rax: import novaclient.exceptions for cs.images.find
parents acf73bc3 038d0304
......@@ -366,12 +366,12 @@ def cloudservers(module, state, name, flavor, image, meta, key_name, files,
except ValueError:
try:
image = cs.images.find(human_id=image)
except (pyrax.exceptions.NotFound,
pyrax.exceptions.NoUniqueMatch):
except(cs.exceptions.NotFound,
cs.exceptions.NoUniqueMatch):
try:
image = cs.images.find(name=image)
except (pyrax.exceptions.NotFound,
pyrax.exceptions.NoUniqueMatch):
except (cs.exceptions.NotFound,
cs.exceptions.NoUniqueMatch):
module.fail_json(msg='No matching image found (%s)' %
image)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment