Fix: Fixes broken installation because of third party library update. 21/6821/3
authorpeusterm <manuel.peuster@uni-paderborn.de>
Wed, 31 Oct 2018 18:50:16 +0000 (19:50 +0100)
committerpeusterm <manuel.peuster@uni-paderborn.de>
Wed, 31 Oct 2018 20:28:59 +0000 (21:28 +0100)
Change-Id: If94adb111ae5bf89f977ad857807f89ee61f71d8
Signed-off-by: peusterm <manuel.peuster@uni-paderborn.de>
devops-stages/stage-test.sh
pipeline_local.sh
setup.py
src/emuvim/dcemulator/monitoring.py

index 3228a0d..0489f02 100755 (executable)
@@ -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 ..."
index e6e4018..1af9336 100755 (executable)
@@ -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."
index 090063a..7cc9d6b 100755 (executable)
--- 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',
index 6ed87cb..f8280c3 100755 (executable)
@@ -335,10 +335,10 @@ class DCNetworkMonitor():
             return 'Error stopping monitoring metric: {0} on {1}:{2}'.format(\r
                 metric, vnf_name, vnf_interface)\r
 \r
-\r
-# get all metrics defined in the list and export it to Prometheus\r
-\r
     def get_flow_metrics(self):\r
+        """\r
+        Get all metrics defined in the list and export it to Prometheus.\r
+        """\r
         while self.start_monitoring:\r
 \r
             self.monitor_flow_lock.acquire()\r