From: peusterm Date: Wed, 31 Oct 2018 18:50:16 +0000 (+0100) Subject: Fix: Fixes broken installation because of third party library update. X-Git-Tag: v5.0.0~4 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=04e5f9823454ac2cd04eff7f09a1cb433521a408;p=osm%2Fvim-emu.git Fix: Fixes broken installation because of third party library update. Change-Id: If94adb111ae5bf89f977ad857807f89ee61f71d8 Signed-off-by: peusterm --- diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh index 3228a0d..0489f02 100755 --- a/devops-stages/stage-test.sh +++ b/devops-stages/stage-test.sh @@ -41,7 +41,7 @@ echo "Tests executed by user: $(whoami)" cd /son-emu/ # trigger pep8 style check echo "Doing flake8 style check ..." -flake8 --exclude=.eggs,devops --ignore=E501 . +flake8 --exclude=.eggs,devops --ignore=E501,W605,W504 . echo "done." # trigger the tests echo "Running unit tests ..." diff --git a/pipeline_local.sh b/pipeline_local.sh index e6e4018..1af9336 100755 --- a/pipeline_local.sh +++ b/pipeline_local.sh @@ -3,9 +3,13 @@ set -e # trigger pep8 style check echo "Doing flake8 style check ..." -flake8 --exclude=.eggs,devops --ignore=E501 . +flake8 --exclude=.eggs,devops --ignore=E501,W605,W504 . echo "done." # trigger the tests echo "Running unit tests ..." sudo pytest -v +# do everything in Docker, like it is done by Jenkins +docker build -t vim-emu-loc-test . +docker run --rm --privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock vim-emu-loc-test pytest -v +docker run --rm --privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock vim-emu-loc-test flake8 --exclude=.eggs,devops --ignore=E501,W605,W504 . echo "done." diff --git a/setup.py b/setup.py index 090063a..7cc9d6b 100755 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ setup(name='emuvim', 'Flask', 'flask_restful', 'docker==2.0.2', - 'urllib3==1.21.1', + 'urllib3', 'requests', 'prometheus_client', 'ipaddress', diff --git a/src/emuvim/dcemulator/monitoring.py b/src/emuvim/dcemulator/monitoring.py index 6ed87cb..f8280c3 100755 --- a/src/emuvim/dcemulator/monitoring.py +++ b/src/emuvim/dcemulator/monitoring.py @@ -335,10 +335,10 @@ class DCNetworkMonitor(): return 'Error stopping monitoring metric: {0} on {1}:{2}'.format( metric, vnf_name, vnf_interface) - -# get all metrics defined in the list and export it to Prometheus - def get_flow_metrics(self): + """ + Get all metrics defined in the list and export it to Prometheus. + """ while self.start_monitoring: self.monitor_flow_lock.acquire()