aboutsummaryrefslogtreecommitdiffstats
path: root/moonv4/moon_router
diff options
context:
space:
mode:
Diffstat (limited to 'moonv4/moon_router')
-rw-r--r--moonv4/moon_router/Dockerfile11
-rw-r--r--moonv4/moon_router/README.md (renamed from moonv4/moon_router/README.rst)13
-rw-r--r--moonv4/moon_router/moon_router/__init__.py (renamed from moonv4/moon_router/moon_secrouter/__init__.py)0
-rw-r--r--moonv4/moon_router/moon_router/__main__.py3
-rw-r--r--moonv4/moon_router/moon_router/api/__init__.py (renamed from moonv4/moon_router/moon_secrouter/api/__init__.py)0
-rw-r--r--moonv4/moon_router/moon_router/api/generic.py (renamed from moonv4/moon_router/moon_secrouter/api/generic.py)0
-rw-r--r--moonv4/moon_router/moon_router/api/route.py (renamed from moonv4/moon_router/moon_secrouter/api/route.py)2
-rw-r--r--moonv4/moon_router/moon_router/messenger.py (renamed from moonv4/moon_router/moon_secrouter/messenger.py)4
-rw-r--r--moonv4/moon_router/moon_router/server.py (renamed from moonv4/moon_router/moon_secrouter/server.py)4
-rw-r--r--moonv4/moon_router/moon_secrouter/__main__.py3
-rw-r--r--moonv4/moon_router/setup.py11
11 files changed, 35 insertions, 16 deletions
diff --git a/moonv4/moon_router/Dockerfile b/moonv4/moon_router/Dockerfile
new file mode 100644
index 00000000..c4b542b3
--- /dev/null
+++ b/moonv4/moon_router/Dockerfile
@@ -0,0 +1,11 @@
+FROM ubuntu:latest
+
+RUN apt update && apt install python3.5 python3-pip -y
+RUN pip3 install moon_utilities moon_db
+
+ADD . /root
+WORKDIR /root/
+RUN pip3 install -r requirements.txt
+RUN pip3 install .
+
+CMD ["python3", "-m", "moon_router"] \ No newline at end of file
diff --git a/moonv4/moon_router/README.rst b/moonv4/moon_router/README.md
index ded4e99a..91899b31 100644
--- a/moonv4/moon_router/README.rst
+++ b/moonv4/moon_router/README.md
@@ -1,5 +1,4 @@
-Core module for the Moon project
-================================
+# Router: Core module for the Moon project
This package contains the core module for the Moon project
It is designed to provide authorization features to all OpenStack components.
@@ -7,3 +6,13 @@ It is designed to provide authorization features to all OpenStack components.
For any other information, refer to the parent project:
https://git.opnfv.org/moon
+
+## Build Image
+```bash
+docker image build -t wukongsun/moon_router:v4.1 .
+```
+
+## Push Image
+```bash
+docker push wukongsun/moon_router:v4.1
+``` \ No newline at end of file
diff --git a/moonv4/moon_router/moon_secrouter/__init__.py b/moonv4/moon_router/moon_router/__init__.py
index 903c6518..903c6518 100644
--- a/moonv4/moon_router/moon_secrouter/__init__.py
+++ b/moonv4/moon_router/moon_router/__init__.py
diff --git a/moonv4/moon_router/moon_router/__main__.py b/moonv4/moon_router/moon_router/__main__.py
new file mode 100644
index 00000000..0d7a8fe6
--- /dev/null
+++ b/moonv4/moon_router/moon_router/__main__.py
@@ -0,0 +1,3 @@
+from moon_router.server import main
+
+main()
diff --git a/moonv4/moon_router/moon_secrouter/api/__init__.py b/moonv4/moon_router/moon_router/api/__init__.py
index e69de29b..e69de29b 100644
--- a/moonv4/moon_router/moon_secrouter/api/__init__.py
+++ b/moonv4/moon_router/moon_router/api/__init__.py
diff --git a/moonv4/moon_router/moon_secrouter/api/generic.py b/moonv4/moon_router/moon_router/api/generic.py
index d066f715..d066f715 100644
--- a/moonv4/moon_router/moon_secrouter/api/generic.py
+++ b/moonv4/moon_router/moon_router/api/generic.py
diff --git a/moonv4/moon_router/moon_secrouter/api/route.py b/moonv4/moon_router/moon_router/api/route.py
index 2a2c54bc..1a102abf 100644
--- a/moonv4/moon_router/moon_secrouter/api/route.py
+++ b/moonv4/moon_router/moon_router/api/route.py
@@ -10,7 +10,7 @@ from uuid import uuid4
from oslo_log import log as logging
from moon_utilities.security_functions import call, notify
from oslo_config import cfg
-from moon_secrouter.api.generic import Status, Logs
+from moon_router.api.generic import Status, Logs
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
diff --git a/moonv4/moon_router/moon_secrouter/messenger.py b/moonv4/moon_router/moon_router/messenger.py
index 52e5c341..46565c62 100644
--- a/moonv4/moon_router/moon_secrouter/messenger.py
+++ b/moonv4/moon_router/moon_router/messenger.py
@@ -7,8 +7,8 @@ from oslo_config import cfg
import oslo_messaging
import time
from oslo_log import log as logging
-from moon_secrouter.api.generic import Status, Logs
-from moon_secrouter.api.route import Router
+from moon_router.api.generic import Status, Logs
+from moon_router.api.route import Router
from moon_utilities.api import APIList
LOG = logging.getLogger(__name__)
diff --git a/moonv4/moon_router/moon_secrouter/server.py b/moonv4/moon_router/moon_router/server.py
index 16f6ea9c..40e2b945 100644
--- a/moonv4/moon_router/moon_secrouter/server.py
+++ b/moonv4/moon_router/moon_router/server.py
@@ -9,7 +9,7 @@ import signal
from oslo_config import cfg
from oslo_log import log as logging
from moon_utilities import options # noqa
-from moon_secrouter.messenger import Server
+from moon_router.messenger import Server
class AsyncServer(threading.Thread):
@@ -23,7 +23,7 @@ class AsyncServer(threading.Thread):
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
-DOMAIN = "moon_secrouter"
+DOMAIN = "moon_router"
__CWD__ = os.path.dirname(os.path.abspath(__file__))
diff --git a/moonv4/moon_router/moon_secrouter/__main__.py b/moonv4/moon_router/moon_secrouter/__main__.py
deleted file mode 100644
index 8ec695db..00000000
--- a/moonv4/moon_router/moon_secrouter/__main__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from moon_secrouter.server import main
-
-main()
diff --git a/moonv4/moon_router/setup.py b/moonv4/moon_router/setup.py
index 0c3b61ba..aabe8349 100644
--- a/moonv4/moon_router/setup.py
+++ b/moonv4/moon_router/setup.py
@@ -4,14 +4,14 @@
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
from setuptools import setup, find_packages
-import moon_secrouter
+import moon_router
setup(
- name='moon_secrouter',
+ name='moon_router',
- version=moon_secrouter.__version__,
+ version=moon_router.__version__,
packages=find_packages(),
@@ -21,7 +21,7 @@ setup(
description="",
- long_description=open('README.rst').read(),
+ long_description=open('README.md').read(),
# install_requires= ,
@@ -40,8 +40,7 @@ setup(
entry_points={
'console_scripts': [
- 'moon_secrouter = moon_secrouter.server:main',
+ 'moon_router = moon_router.server:main',
],
}
-
)