From: peusterm Date: Tue, 19 Mar 2019 10:10:38 +0000 (+0100) Subject: Fix: Added gevent monkey patch to fix issue that blocks X-Git-Tag: v6.0.0~17 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F7330%2F1;p=osm%2Fvim-emu.git Fix: Added gevent monkey patch to fix issue that blocks the servers of the LLCM and REST APIs. Change-Id: I4d16ce4ae5e3d51892fe202ec7cf454e54096aca Signed-off-by: peusterm --- diff --git a/src/emuvim/dcemulator/net.py b/src/emuvim/dcemulator/net.py index 6be973f..58c2bff 100755 --- a/src/emuvim/dcemulator/net.py +++ b/src/emuvim/dcemulator/net.py @@ -24,24 +24,27 @@ # acknowledge the contributions of their colleagues of the SONATA # partner consortium (www.sonata-nfv.eu). import logging - import time -from subprocess import Popen import re import requests import os import json - +import networkx as nx +from subprocess import Popen +from gevent import monkey from mininet.net import Containernet from mininet.node import OVSSwitch, OVSKernelSwitch, Docker, RemoteController from mininet.cli import CLI from mininet.link import TCLink from mininet.clean import cleanup -import networkx as nx from emuvim.dcemulator.monitoring import DCNetworkMonitor from emuvim.dcemulator.node import Datacenter, EmulatorCompute from emuvim.dcemulator.resourcemodel import ResourceModelRegistrar +# ensure correct functionality of all gevent based REST servers +monkey.patch_all(sys=True) + +# setup logging LOG = logging.getLogger("dcemulator.net") LOG.setLevel(logging.DEBUG)