X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=RO%2Fosm_ro%2Fnfvo.py;h=36109cb817c98f15e64679008c2a1bf4161a102f;hb=eaa4344e10032f059124fb4db16fe729983adbc1;hp=32d739a3bec676573cc144ea4ef8602e246691db;hpb=16894de5c4aa19e571f4d18ef9c90bf60596dc19;p=osm%2FRO.git diff --git a/RO/osm_ro/nfvo.py b/RO/osm_ro/nfvo.py index 32d739a3..36109cb8 100644 --- a/RO/osm_ro/nfvo.py +++ b/RO/osm_ro/nfvo.py @@ -4076,6 +4076,7 @@ def instantiate_vnf(mydb, sce_vnf, params, params_out, rollbackList): else: netDict['net_id'] = "TASK-{}".format(net2task_id[sce_vnf['uuid']][iface['net_id']]) instance_net_id = vnf_net2instance[sce_vnf['uuid']][iface['net_id']] + instance_wim_net_id = None task_depends_on.append(net2task_id[sce_vnf['uuid']][iface['net_id']]) # skip bridge ifaces not connected to any net if 'net_id' not in netDict or netDict['net_id'] == None: @@ -5755,15 +5756,18 @@ def vim_action_create(mydb, tenant_id, datacenter, item, descriptor): return vim_action_get(mydb, tenant_id, datacenter, item, content) def sdn_controller_create(mydb, tenant_id, sdn_controller): - wim_id = ovim.new_of_controller(sdn_controller) - - thread_name = get_non_used_vim_name(sdn_controller['name'], wim_id, wim_id, None) - new_thread = vim_thread(task_lock, plugins, thread_name, wim_id, None, db=db) - new_thread.start() - thread_id = wim_id - vim_threads["running"][thread_id] = new_thread - logger.debug('New SDN controller created with uuid {}'.format(wim_id)) - return wim_id + try: + wim_id = ovim.new_of_controller(sdn_controller) + + thread_name = get_non_used_vim_name(sdn_controller['name'], wim_id, wim_id, None) + new_thread = vim_thread(task_lock, plugins, thread_name, wim_id, None, db=db) + new_thread.start() + thread_id = wim_id + vim_threads["running"][thread_id] = new_thread + logger.debug('New SDN controller created with uuid {}'.format(wim_id)) + return wim_id + except ovimException as e: + raise NfvoException(e) from e def sdn_controller_update(mydb, tenant_id, controller_id, sdn_controller): data = ovim.edit_of_controller(controller_id, sdn_controller)