aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTommy Carpenter <tommy@research.att.com>2018-03-20 21:39:55 -0400
committerTommy Carpenter <tommy@research.att.com>2018-03-20 21:40:00 -0400
commit5a2c655866279df5547c2d8b8159afeceb285ee9 (patch)
tree9639a7ff6adbe499a37a2a65fb7e38617d2262e5
parent226719d5b23c7b82940a0e4c5b6922eead419788 (diff)
Small pythonic cleanups
Change-Id: I6be2306e8f42694e6fa8b1d37a07e48730b505ef Issue-ID: DCAEGEN2-348 Signed-off-by: Tommy Carpenter <tommy@research.att.com>
-rw-r--r--Changelog.md3
-rw-r--r--Dockerfile5
-rw-r--r--MANIFEST.in1
-rw-r--r--[-rwxr-xr-x]config_binding_service/run.py (renamed from bin/run.py)6
-rw-r--r--config_binding_service/swagger.yaml (renamed from config_binding_service/swagger/swagger.yaml)0
-rw-r--r--pom.xml2
-rw-r--r--setup.py10
7 files changed, 18 insertions, 9 deletions
diff --git a/Changelog.md b/Changelog.md
index d5078b7..eae83cc 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
+## [2.1.3]
+* Small cleanups; move swagger, remove bin, do proper install in Dockerfile
+
## [2.1.2]
* Log to a file to be picked up by ELK per DCAEGEN2-387
* Logging not totally finished w.r.t. formats, but this at least logs more and gets them into ELK
diff --git a/Dockerfile b/Dockerfile
index 35b5d52..7ca987f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,11 +3,10 @@ MAINTAINER tommy@research.att.com
ADD . /tmp
-#need pip > 8 to have internal pypi repo in requirements.txt
RUN pip install --upgrade pip
-#do the install
WORKDIR /tmp
-RUN pip install -e .
+#do the install
+RUN pip install .
EXPOSE 10000
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..ad8b807
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1 @@
+include config_binding_service/swagger.yaml
diff --git a/bin/run.py b/config_binding_service/run.py
index 99bf1c7..476dc87 100755..100644
--- a/bin/run.py
+++ b/config_binding_service/run.py
@@ -21,10 +21,12 @@
import connexion
from config_binding_service.logging import create_logger, LOGGER
-if __name__ == '__main__':
+
+def main():
+ """CBS Entrypoint"""
create_logger()
try:
- app = connexion.App(__name__, specification_dir='../config_binding_service/swagger/')
+ app = connexion.App(__name__, specification_dir='.')
app.add_api('swagger.yaml', arguments={'title': 'Config Binding Service'})
app.run(host='0.0.0.0', port=10000, debug=False)
except Exception as exc:
diff --git a/config_binding_service/swagger/swagger.yaml b/config_binding_service/swagger.yaml
index cfe0944..cfe0944 100644
--- a/config_binding_service/swagger/swagger.yaml
+++ b/config_binding_service/swagger.yaml
diff --git a/pom.xml b/pom.xml
index be2bf32..43ea442 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
<groupId>org.onap.dcaegen2.platform</groupId>
<artifactId>configbinding</artifactId>
<name>dcaegen2-platform-configbinding</name>
- <version>2.1.2</version>
+ <version>2.1.3</version>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
diff --git a/setup.py b/setup.py
index 55b684c..35aed26 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ from setuptools import setup, find_packages
setup(
name='config_binding_service',
- version='2.1.2',
+ version='2.1.3',
packages=find_packages(exclude=["tests.*", "tests"]),
author="Tommy Carpenter",
author_email="tommy@research.att.com",
@@ -29,6 +29,10 @@ setup(
keywords="",
url="https://gerrit.onap.org/r/#/admin/projects/dcaegen2/platform/configbinding",
zip_safe=False,
- scripts=["bin/run.py"],
- install_requires=["requests", "Flask", "connexion", "six"]
+ entry_points={
+ 'console_scripts': [
+ 'run.py=config_binding_service.run:main']
+ },
+ install_requires=["requests", "Flask", "connexion", "six"],
+ include_package_data=True
)