fix flake8 tests 21/6221/4 v4.0.1
authortierno <alfonso.tiernosepulveda@telefonica.com>
Tue, 22 May 2018 10:27:48 +0000 (12:27 +0200)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Mon, 28 May 2018 14:49:13 +0000 (16:49 +0200)
Change-Id: I2c832659c7a8527b9a0360cc0b142caec9d8157e
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
Dockerfile.local
osm_lcm/lcm.py
osm_lcm/osm-lcm.service [new file with mode: 0644]
setup.py
tox.ini

index 162642a..5ff0fec 100644 (file)
@@ -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"
 
index f95a439..8288bc0 100644 (file)
@@ -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 (file)
index 0000000..9736f96
--- /dev/null
@@ -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
+
index e526850..0c7f055 100644 (file)
--- 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 (file)
--- 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