X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_ro%2Fvim_thread.py;h=733dfc248ff4fd689372aabc62d0fa8d40b10118;hb=a85c54de5c5d1f951b27082a21e5654e15712529;hp=f185db817908d615908bcdcc88cf3c7227bd9985;hpb=0fb5bd1f4d58d5dfa002238456ad66d754bc371b;p=osm%2FRO.git diff --git a/osm_ro/vim_thread.py b/osm_ro/vim_thread.py index f185db81..733dfc24 100644 --- a/osm_ro/vim_thread.py +++ b/osm_ro/vim_thread.py @@ -576,7 +576,7 @@ class vim_thread(threading.Thread): task["error_msg"] = related_tasks[0]["error_msg"] task["vim_id"] = related_tasks[0]["vim_id"] extra = yaml.load(related_tasks[0]["extra"]) - task["extra"]["vim_status"] = extra["vim_status"] + task["extra"]["vim_status"] = extra.get("vim_status") next_refresh = related_tasks[0]["modified_at"] + 0.001 database_update = {"status": task["extra"].get("vim_status", "VIM_ERROR"), "error_msg": task["error_msg"]} @@ -958,13 +958,14 @@ class vim_thread(threading.Thread): # CREATE params = task["params"] action_text = "creating VIM" - vim_net_id, created_items = self.vim.new_network(*params[0:3]) + + vim_net_id, created_items = self.vim.new_network(*params[0:5]) net_name = params[0] net_type = params[1] wim_account_name = None - if len(params) >= 4: - wim_account_name = params[3] + if len(params) >= 5: + wim_account_name = params[5] sdn_controller = self.vim.config.get('sdn-controller') if sdn_controller and (net_type == "data" or net_type == "ptp"):