From: lloretgalleg Date: Thu, 16 Jan 2020 13:12:39 +0000 (+0100) Subject: Corrected bug appears when a sdn controller that needs a plugin is created first... X-Git-Tag: v7.0.1rc2^0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=fa45020d632839ab8d0e2f231617395541315772;p=osm%2FRO.git Corrected bug appears when a sdn controller that needs a plugin is created first time Change-Id: Ib5f414935f6a7799326c4055bef754b827d3dd6a Signed-off-by: lloretgalleg --- diff --git a/RO/osm_ro/nfvo.py b/RO/osm_ro/nfvo.py index 1e08a4fe..451b1caa 100644 --- a/RO/osm_ro/nfvo.py +++ b/RO/osm_ro/nfvo.py @@ -5758,6 +5758,12 @@ def sdn_controller_create(mydb, tenant_id, sdn_controller): try: wim_id = ovim.new_of_controller(sdn_controller) + # Load plugin if not previously loaded + controller_type = sdn_controller.get("type") + plugin_name = "rosdn_" + controller_type + if plugin_name not in plugins: + _load_plugin(plugin_name, type="sdn") + 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()