From: tierno Date: Tue, 22 May 2018 10:27:48 +0000 (+0200) Subject: fix flake8 tests X-Git-Tag: v4.0.1^0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F21%2F6221%2F4;p=osm%2FLCM.git fix flake8 tests Change-Id: I2c832659c7a8527b9a0360cc0b142caec9d8157e Signed-off-by: tierno --- diff --git a/Dockerfile.local b/Dockerfile.local index 162642a..5ff0fec 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -32,7 +32,7 @@ RUN mkdir -p /app/storage/kafka && mkdir -p /app/log LABEL Maintainer="alfonso.tiernosepulveda@telefonica.com" \ - Description="This implements a north bound interface for OSM" \ + Description="This implements the Life Cicle Management module of OSM" \ Version="1.0" \ Author="Alfonso Tierno" diff --git a/osm_lcm/lcm.py b/osm_lcm/lcm.py index f95a439..8288bc0 100644 --- a/osm_lcm/lcm.py +++ b/osm_lcm/lcm.py @@ -164,7 +164,6 @@ class Lcm: db_vim = None exc = None RO_sdn_id = None - RO_sdn_port_mapping = None try: step = "Getting vim-id='{}' from db".format(vim_id) db_vim = self.db.get_one("vim_accounts", {"_id": vim_id}) diff --git a/osm_lcm/osm-lcm.service b/osm_lcm/osm-lcm.service new file mode 100644 index 0000000..9736f96 --- /dev/null +++ b/osm_lcm/osm-lcm.service @@ -0,0 +1,10 @@ +[Unit] +Description=LCM server (OSM LCM) + +[Service] +ExecStart=/usr/bin/lcm.py -c /etc/osm/lcm.cfg --log-file=/var/log/osm/lcm.log +Restart=always + +[Install] +WantedBy=multi-user.target + diff --git a/setup.py b/setup.py index e526850..0c7f055 100644 --- a/setup.py +++ b/setup.py @@ -27,6 +27,7 @@ setup( packages=[_name], include_package_data=True, data_files=[('/etc/osm/', ['osm_lcm/lcm.cfg']), + ('/etc/systemd/system/', ['osm_lcm/osm-lcm.service']), ], dependency_links=[ "git+https://osm.etsi.org/gerrit/osm/common.git@master#egg=osm-common-0.1.4" diff --git a/tox.ini b/tox.ini index dd134c1..3ed9406 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ commands=nosetests basepython = python3 deps = flake8 commands = - flake8 setup.py --max-line-length 120 --exclude .svn,CVS,.gz,.git,__pycache__,.tox,local,temp --ignore W291,W293 + flake8 osm_lcm --max-line-length 120 --exclude .svn,CVS,.gz,.git,__pycache__,.tox,local,temp --ignore W291,W293,E226 [testenv:build] basepython = python3