X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=nfvo.py;h=0b7e6d0d70e538971d7f9a4dc3ed20795afc6800;hb=ac1e379bcb9d68731df3b988cb622f69468d904a;hp=7230a50bcf34d5573857e94350f9b3ffc8cef6f4;hpb=ab60396beadada2a9ec9a00f3067a7df081a7e02;p=osm%2FRO.git diff --git a/nfvo.py b/nfvo.py index 7230a50b..0b7e6d0d 100644 --- a/nfvo.py +++ b/nfvo.py @@ -52,7 +52,7 @@ global default_volume_size default_volume_size = '5' #size in GB global ovim ovim = None - +global_config = None vimconn_imported = {} # dictionary with VIM type as key, loaded module as value vim_threads = {"running":{}, "deleting": {}, "names": []} # threads running for attached-VIMs @@ -184,12 +184,16 @@ def start_service(mydb): raise NfvoException(str(e) + " at nfvo.get_vim", e.http_code) def stop_service(): + global ovim, global_config if ovim: ovim.stop_service() for thread_id,thread in vim_threads["running"].items(): thread.insert_task(new_task("exit", None, store=False)) vim_threads["deleting"][thread_id] = thread vim_threads["running"] = {} + if global_config and global_config.get("console_thread"): + for thread in global_config["console_thread"]: + thread.terminate = True def get_flavorlist(mydb, vnf_id, nfvo_tenant=None):