Proper error message shown when no image could be found at VIM 71/1071/2
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 6 Feb 2017 14:38:33 +0000 (15:38 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 6 Feb 2017 16:54:02 +0000 (17:54 +0100)
Change-Id: I83d8aa32ee23cf46d2f64541f44d3ec409ad48ce
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
nfvo.py

diff --git a/nfvo.py b/nfvo.py
index 84aec64..c8ef020 100644 (file)
--- a/nfvo.py
+++ b/nfvo.py
@@ -364,7 +364,8 @@ def create_or_use_image(mydb, vims, image_dict, rollback_list, only_create_at_vi
                     rollback_list.append({"where":"vim", "vim_id": vim_id, "what":"image","uuid":image_vim_id})
                     image_created="true"
                 else:
-                    raise vimconn.vimconnException("Cannot create image without location")
+                    #If we reach this point, then the image has image name, and optionally checksum, and could not be found
+                    raise vimconn.vimconnException(str(e))
             except vimconn.vimconnException as e:
                 if return_on_error:
                     logger.error("Error creating image at VIM '%s': %s", vim["name"], str(e))