Fix rollback error of not launched nets & vms 56/2056/1
authortierno <alfonso.tiernosepulveda@telefonica.com>
Wed, 2 Aug 2017 11:53:02 +0000 (13:53 +0200)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Wed, 2 Aug 2017 11:53:02 +0000 (13:53 +0200)
Change-Id: I317ed62f4d4357855039ee4b91ba7c52dd9f3b5a
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
openmanod
osm_ro/nfvo.py

index fbd8e2e..d73edd5 100755 (executable)
--- a/openmanod
+++ b/openmanod
@@ -48,9 +48,9 @@ import osm_ro
 
 __author__ = "Alfonso Tierno, Gerardo Garcia, Pablo Montes"
 __date__ = "$26-aug-2014 11:09:29$"
-__version__ = "0.5.17-r526"
-version_date = "Jul 2017"
-database_version = 22      #expected database schema version
+__version__ = "0.5.18-r527"
+version_date = "Aug 2017"
+database_version = 22      # expected database schema version
 
 global global_config
 global logger
index 94b029a..8f105c3 100644 (file)
@@ -334,7 +334,9 @@ def rollback(mydb,  vims, rollback_list):
         if item["where"]=="vim":
             if item["vim_id"] not in vims:
                 continue
-            vim=vims[ item["vim_id"] ]
+            if is_task_id(item["uuid"]):
+                continue
+            vim = vims[item["vim_id"]]
             try:
                 if item["what"]=="image":
                     vim.delete_image(item["uuid"])
@@ -481,7 +483,7 @@ def check_vnf_descriptor(vnf_descriptor, vnf_descriptor_version=1):
                     HTTP_Bad_Request)
 
 
-def create_or_use_image(mydb, vims, image_dict, rollback_list, only_create_at_vim=False, return_on_error = None):
+def create_or_use_image(mydb, vims, image_dict, rollback_list, only_create_at_vim=False, return_on_error=None):
     #look if image exist
     if only_create_at_vim:
         image_mano_id = image_dict['uuid']