aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--moonv4/bin/moon_lib_update.sh20
-rw-r--r--moonv4/moon_authz/Dockerfile2
-rw-r--r--moonv4/moon_authz/moon_authz/api/authorization.py2
-rw-r--r--moonv4/moon_authz/moon_authz/api/generic.py2
-rw-r--r--moonv4/moon_authz/moon_authz/http_server.py4
-rw-r--r--moonv4/moon_authz/moon_authz/server.py2
-rw-r--r--moonv4/moon_authz/requirements.txt7
-rw-r--r--moonv4/moon_authz/tests/unit_python/requirements.txt4
-rw-r--r--moonv4/moon_authz/tests/unit_python/test_authz.py8
-rw-r--r--moonv4/moon_interface/Dockerfile2
-rw-r--r--moonv4/moon_interface/moon_interface/api/generic.py2
-rw-r--r--moonv4/moon_interface/moon_interface/authz_requests.py6
-rw-r--r--moonv4/moon_interface/moon_interface/containers.py2
-rw-r--r--moonv4/moon_interface/moon_interface/http_server.py2
-rw-r--r--moonv4/moon_interface/moon_interface/server.py2
-rw-r--r--moonv4/moon_interface/requirements.txt2
-rw-r--r--moonv4/moon_interface/tests/unit_python/conftest.py4
-rw-r--r--moonv4/moon_interface/tests/unit_python/requirements.txt4
-rw-r--r--moonv4/moon_interface/tools/get_keystone_token.py2
-rw-r--r--moonv4/moon_manager/moon_manager/api/assignments.py4
-rw-r--r--moonv4/moon_manager/moon_manager/api/containers.py5
-rw-r--r--moonv4/moon_manager/moon_manager/api/data.py4
-rw-r--r--moonv4/moon_manager/moon_manager/api/generic.py2
-rw-r--r--moonv4/moon_manager/moon_manager/api/meta_data.py4
-rw-r--r--moonv4/moon_manager/moon_manager/api/meta_rules.py4
-rw-r--r--moonv4/moon_manager/moon_manager/api/models.py4
-rw-r--r--moonv4/moon_manager/moon_manager/api/pdp.py10
-rw-r--r--moonv4/moon_manager/moon_manager/api/perimeter.py4
-rw-r--r--moonv4/moon_manager/moon_manager/api/policies.py4
-rw-r--r--moonv4/moon_manager/moon_manager/api/rules.py4
-rw-r--r--moonv4/moon_manager/moon_manager/http_server.py4
-rw-r--r--moonv4/moon_manager/moon_manager/server.py2
-rw-r--r--moonv4/moon_manager/requirements.txt4
-rw-r--r--moonv4/moon_manager/tests/unit_python/conftest.py2
-rw-r--r--moonv4/moon_manager/tests/unit_python/requirements.txt4
-rw-r--r--moonv4/moon_orchestrator/moon_orchestrator/api/generic.py2
-rw-r--r--moonv4/moon_orchestrator/moon_orchestrator/api/pods.py2
-rw-r--r--moonv4/moon_orchestrator/moon_orchestrator/drivers.py2
-rw-r--r--moonv4/moon_orchestrator/moon_orchestrator/http_server.py4
-rw-r--r--moonv4/moon_orchestrator/moon_orchestrator/server.py2
-rw-r--r--moonv4/moon_orchestrator/requirements.txt4
-rw-r--r--moonv4/moon_orchestrator/tests/unit_python/requirements.txt4
-rw-r--r--moonv4/moon_wrapper/moon_wrapper/api/generic.py2
-rw-r--r--moonv4/moon_wrapper/moon_wrapper/api/wrapper.py9
-rw-r--r--moonv4/moon_wrapper/moon_wrapper/http_server.py5
-rw-r--r--moonv4/moon_wrapper/moon_wrapper/server.py2
-rw-r--r--moonv4/moon_wrapper/requirements.txt2
-rw-r--r--moonv4/moon_wrapper/tests/unit_python/conftest.py4
-rw-r--r--moonv4/moon_wrapper/tests/unit_python/requirements.txt4
-rw-r--r--moonv4/python_moonclient/README.md2
-rw-r--r--moonv4/python_moondb/Changelog5
-rw-r--r--moonv4/python_moondb/python_moondb/__init__.py2
-rw-r--r--moonv4/python_moondb/python_moondb/api/keystone.py2
-rw-r--r--moonv4/python_moonutilities/Changelog4
-rw-r--r--moonv4/python_moonutilities/python_moonutilities/__init__.py2
-rw-r--r--moonv4/python_moonutilities/tests/unit_python/test_cache.py16
-rw-r--r--moonv4/python_moonutilities/tests/unit_python/test_configuration.py2
-rw-r--r--moonv4/templates/moonforming/Dockerfile2
58 files changed, 113 insertions, 116 deletions
diff --git a/moonv4/bin/moon_lib_update.sh b/moonv4/bin/moon_lib_update.sh
index 1d9d4cb3..3925e336 100644
--- a/moonv4/bin/moon_lib_update.sh
+++ b/moonv4/bin/moon_lib_update.sh
@@ -1,14 +1,14 @@
#!/usr/bin/env bash
-# usage: moon_update.sh {build,upload,copy} {db,utilities} <GPG_ID>
+# usage: moon_update.sh {build,upload,copy} {python_moondb,python_moonutilities} <GPG_ID>
CMD=$1
COMPONENT=$2
GPG_ID=$3
-VERSION=moon_${COMPONENT}-$(grep __version__ moon_${COMPONENT}/moon_${COMPONENT}/__init__.py | cut -d "\"" -f 2)
+VERSION=${COMPONENT}-$(grep __version__ ${COMPONENT}/${COMPONENT}/__init__.py | cut -d "\"" -f 2)
-cd moon_${COMPONENT}
+cd ${COMPONENT}
python3 setup.py sdist bdist_wheel
@@ -16,16 +16,16 @@ if [ "$CMD" = "upload" ]; then
# Instead of "A0A96E75", use your own GPG ID
rm dist/*.asc 2>/dev/null
gpg --detach-sign -u "${GPG_ID}" -a dist/${VERSION}-py3-none-any.whl
- gpg --detach-sign -u "${GPG_ID}" -a dist/${VERSION}.tar.gz
+ gpg --detach-sign -u "${GPG_ID}" -a dist/${VERSION/_/-}.tar.gz
twine upload dist/${VERSION}-py3-none-any.whl dist/${VERSION}-py3-none-any.whl.asc
- twine upload dist/${VERSION}.tar.gz dist/${VERSION}.tar.gz.asc
+ twine upload dist/${VERSION/_/-}.tar.gz dist/${VERSION/_/-}.tar.gz.asc
fi
-rm -f ../moon_manager/dist/moon_${COMPONENT}*
-rm -f ../moon_orchestrator/dist/moon_${COMPONENT}*
-rm -f ../moon_wrapper/dist/moon_${COMPONENT}*
-rm -f ../moon_interface/dist/moon_${COMPONENT}*
-rm -f ../moon_authz/dist/moon_${COMPONENT}*
+rm -f ../moon_manager/dist/${COMPONENT}*
+rm -f ../moon_orchestrator/dist/${COMPONENT}*
+rm -f ../moon_wrapper/dist/${COMPONENT}*
+rm -f ../moon_interface/dist/${COMPONENT}*
+rm -f ../moon_authz/dist/${COMPONENT}*
if [ "$CMD" = "copy" ]; then
diff --git a/moonv4/moon_authz/Dockerfile b/moonv4/moon_authz/Dockerfile
index 4189c333..7ab172b0 100644
--- a/moonv4/moon_authz/Dockerfile
+++ b/moonv4/moon_authz/Dockerfile
@@ -6,7 +6,7 @@ RUN pip3 install pip --upgrade
ADD . /root
WORKDIR /root/
RUN pip3 install -r requirements.txt --upgrade
-#RUN pip3 install /root/dist/* --upgrade
+RUN pip3 install /root/dist/* --upgrade
RUN pip3 install .
CMD ["python3", "-m", "moon_authz"] \ No newline at end of file
diff --git a/moonv4/moon_authz/moon_authz/api/authorization.py b/moonv4/moon_authz/moon_authz/api/authorization.py
index caa41082..4cd8de06 100644
--- a/moonv4/moon_authz/moon_authz/api/authorization.py
+++ b/moonv4/moon_authz/moon_authz/api/authorization.py
@@ -8,7 +8,7 @@ import itertools
import pickle
from uuid import uuid4
import logging
-from moon_utilities import exceptions
+from python_moonutilities import exceptions
import flask
from flask import request
from flask_restful import Resource
diff --git a/moonv4/moon_authz/moon_authz/api/generic.py b/moonv4/moon_authz/moon_authz/api/generic.py
index 66169b15..f4e13e42 100644
--- a/moonv4/moon_authz/moon_authz/api/generic.py
+++ b/moonv4/moon_authz/moon_authz/api/generic.py
@@ -9,7 +9,7 @@ Those API are helping API used to manage the Moon platform.
from flask_restful import Resource, request
from oslo_log import log as logging
import moon_authz.api
-from moon_utilities.security_functions import check_auth
+from python_moonutilities.security_functions import check_auth
__version__ = "0.1.0"
diff --git a/moonv4/moon_authz/moon_authz/http_server.py b/moonv4/moon_authz/moon_authz/http_server.py
index b6818a9f..50e878d3 100644
--- a/moonv4/moon_authz/moon_authz/http_server.py
+++ b/moonv4/moon_authz/moon_authz/http_server.py
@@ -7,10 +7,10 @@ from flask import Flask, request
# from flask_cors import CORS, cross_origin
from flask_restful import Resource, Api, reqparse
import logging
-from moon_utilities import exceptions
from moon_authz import __version__
from moon_authz.api.authorization import Authz
-from moon_utilities.cache import Cache
+from python_moonutilities.cache import Cache
+from python_moonutilities import exceptions
logger = logging.getLogger("moon." + __name__)
diff --git a/moonv4/moon_authz/moon_authz/server.py b/moonv4/moon_authz/moon_authz/server.py
index 40143ba9..974012dc 100644
--- a/moonv4/moon_authz/moon_authz/server.py
+++ b/moonv4/moon_authz/moon_authz/server.py
@@ -6,7 +6,7 @@
import os
from oslo_log import log as logging
from moon_authz.http_server import HTTPServer as Server
-from moon_utilities import configuration
+from python_moonutilities import configuration
LOG = logging.getLogger("moon.server")
DOMAIN = "moon_authz"
diff --git a/moonv4/moon_authz/requirements.txt b/moonv4/moon_authz/requirements.txt
index 344bec52..8cad7a7a 100644
--- a/moonv4/moon_authz/requirements.txt
+++ b/moonv4/moon_authz/requirements.txt
@@ -1,8 +1,5 @@
-kombu !=4.0.1,!=4.0.0
-oslo.log
flask
-oslo.config
flask_restful
flask_cors
-moon_db
-moon_utilities
+python_moondb
+python_moonutilities
diff --git a/moonv4/moon_authz/tests/unit_python/requirements.txt b/moonv4/moon_authz/tests/unit_python/requirements.txt
index 8bd8449f..21975ce3 100644
--- a/moonv4/moon_authz/tests/unit_python/requirements.txt
+++ b/moonv4/moon_authz/tests/unit_python/requirements.txt
@@ -1,5 +1,5 @@
flask
flask_cors
flask_restful
-moon_db
-moon_utilities \ No newline at end of file
+python_moondb
+python_moonutilities \ No newline at end of file
diff --git a/moonv4/moon_authz/tests/unit_python/test_authz.py b/moonv4/moon_authz/tests/unit_python/test_authz.py
index 147f7c5d..f98abebc 100644
--- a/moonv4/moon_authz/tests/unit_python/test_authz.py
+++ b/moonv4/moon_authz/tests/unit_python/test_authz.py
@@ -12,8 +12,8 @@ def get_json(data):
def test_authz_true(context):
import moon_authz.server
- from moon_utilities.security_functions import Context
- from moon_utilities.cache import Cache
+ from python_moonutilities.security_functions import Context
+ from python_moonutilities.cache import Cache
server = moon_authz.server.main()
client = server.app.test_client()
CACHE = Cache()
@@ -33,8 +33,8 @@ def test_authz_true(context):
def test_user_not_allowed(context):
import moon_authz.server
- from moon_utilities.security_functions import Context
- from moon_utilities.cache import Cache
+ from python_moonutilities.security_functions import Context
+ from python_moonutilities.cache import Cache
server = moon_authz.server.main()
client = server.app.test_client()
CACHE = Cache()
diff --git a/moonv4/moon_interface/Dockerfile b/moonv4/moon_interface/Dockerfile
index 268aba48..82160cc9 100644
--- a/moonv4/moon_interface/Dockerfile
+++ b/moonv4/moon_interface/Dockerfile
@@ -1,7 +1,7 @@
FROM ubuntu:latest
RUN apt update && apt install python3.5 python3-pip -y
-RUN pip3 install moon_utilities moon_db pip --upgrade
+RUN pip3 install python_moonutilities python_moondb pip --upgrade
ADD . /root
WORKDIR /root/
diff --git a/moonv4/moon_interface/moon_interface/api/generic.py b/moonv4/moon_interface/moon_interface/api/generic.py
index 702f33cf..51de9214 100644
--- a/moonv4/moon_interface/moon_interface/api/generic.py
+++ b/moonv4/moon_interface/moon_interface/api/generic.py
@@ -9,7 +9,7 @@ Those API are helping API used to manage the Moon platform.
from flask_restful import Resource, request
import logging
import moon_interface.api
-from moon_utilities.security_functions import check_auth
+from python_moonutilities.security_functions import check_auth
__version__ = "0.1.0"
diff --git a/moonv4/moon_interface/moon_interface/authz_requests.py b/moonv4/moon_interface/moon_interface/authz_requests.py
index c09ee957..3f99cb93 100644
--- a/moonv4/moon_interface/moon_interface/authz_requests.py
+++ b/moonv4/moon_interface/moon_interface/authz_requests.py
@@ -7,9 +7,9 @@ import logging
import itertools
import pickle
import requests
-from moon_utilities import configuration, exceptions
-from moon_utilities.security_functions import Context
-from moon_utilities.cache import Cache
+from python_moonutilities import configuration, exceptions
+from python_moonutilities.security_functions import Context
+from python_moonutilities.cache import Cache
LOG = logging.getLogger("moon.interface.authz_requests")
diff --git a/moonv4/moon_interface/moon_interface/containers.py b/moonv4/moon_interface/moon_interface/containers.py
index 1ca76a2d..4f93d742 100644
--- a/moonv4/moon_interface/moon_interface/containers.py
+++ b/moonv4/moon_interface/moon_interface/containers.py
@@ -8,7 +8,7 @@ import logging
import re
import requests
import time
-from moon_utilities import configuration, exceptions
+from python_moonutilities import configuration, exceptions
__version__ = "0.1.0"
diff --git a/moonv4/moon_interface/moon_interface/http_server.py b/moonv4/moon_interface/moon_interface/http_server.py
index 387699f8..890bb82f 100644
--- a/moonv4/moon_interface/moon_interface/http_server.py
+++ b/moonv4/moon_interface/moon_interface/http_server.py
@@ -11,7 +11,7 @@ from moon_interface import __version__
from moon_interface.api.generic import Status, Logs, API
from moon_interface.api.authz import Authz
from moon_interface.authz_requests import CACHE
-from moon_utilities import configuration, exceptions
+from python_moonutilities import configuration, exceptions
logger = logging.getLogger("moon.interface.http")
diff --git a/moonv4/moon_interface/moon_interface/server.py b/moonv4/moon_interface/moon_interface/server.py
index 7043e2f9..e53b4504 100644
--- a/moonv4/moon_interface/moon_interface/server.py
+++ b/moonv4/moon_interface/moon_interface/server.py
@@ -4,7 +4,7 @@
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
import logging
-from moon_utilities import configuration, exceptions
+from python_moonutilities import configuration, exceptions
from moon_interface.http_server import HTTPServer
LOG = logging.getLogger("moon.interface")
diff --git a/moonv4/moon_interface/requirements.txt b/moonv4/moon_interface/requirements.txt
index 36332aa4..7aa2b6df 100644
--- a/moonv4/moon_interface/requirements.txt
+++ b/moonv4/moon_interface/requirements.txt
@@ -1,4 +1,4 @@
flask
flask_restful
flask_cors
-moon_utilities \ No newline at end of file
+python_moonutilities \ No newline at end of file
diff --git a/moonv4/moon_interface/tests/unit_python/conftest.py b/moonv4/moon_interface/tests/unit_python/conftest.py
index 7edcd32d..1f4e8cfa 100644
--- a/moonv4/moon_interface/tests/unit_python/conftest.py
+++ b/moonv4/moon_interface/tests/unit_python/conftest.py
@@ -205,8 +205,8 @@ def set_env_variables():
def get_pickled_context():
- from moon_utilities.security_functions import Context
- from moon_utilities.cache import Cache
+ from python_moonutilities.security_functions import Context
+ from python_moonutilities.cache import Cache
CACHE = Cache()
CACHE.update()
_context = Context(context(), CACHE)
diff --git a/moonv4/moon_interface/tests/unit_python/requirements.txt b/moonv4/moon_interface/tests/unit_python/requirements.txt
index 8bd8449f..21975ce3 100644
--- a/moonv4/moon_interface/tests/unit_python/requirements.txt
+++ b/moonv4/moon_interface/tests/unit_python/requirements.txt
@@ -1,5 +1,5 @@
flask
flask_cors
flask_restful
-moon_db
-moon_utilities \ No newline at end of file
+python_moondb
+python_moonutilities \ No newline at end of file
diff --git a/moonv4/moon_interface/tools/get_keystone_token.py b/moonv4/moon_interface/tools/get_keystone_token.py
index a153f4db..1856aab8 100644
--- a/moonv4/moon_interface/tools/get_keystone_token.py
+++ b/moonv4/moon_interface/tools/get_keystone_token.py
@@ -1,7 +1,7 @@
import requests
from oslo_config import cfg
from oslo_log import log as logging
-from moon_utilities import exceptions
+from python_moonutilities import exceptions
CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/moonv4/moon_manager/moon_manager/api/assignments.py b/moonv4/moon_manager/moon_manager/api/assignments.py
index 3bb6ed29..c3ac45c8 100644
--- a/moonv4/moon_manager/moon_manager/api/assignments.py
+++ b/moonv4/moon_manager/moon_manager/api/assignments.py
@@ -10,8 +10,8 @@ Assignments allow to connect data with elements of perimeter
from flask import request
from flask_restful import Resource
from oslo_log import log as logging
-from moon_utilities.security_functions import check_auth
-from moon_db.core import PolicyManager
+from python_moonutilities.security_functions import check_auth
+from python_moondb.core import PolicyManager
__version__ = "0.2.0"
diff --git a/moonv4/moon_manager/moon_manager/api/containers.py b/moonv4/moon_manager/moon_manager/api/containers.py
index 44e7baac..6dc50ea5 100644
--- a/moonv4/moon_manager/moon_manager/api/containers.py
+++ b/moonv4/moon_manager/moon_manager/api/containers.py
@@ -12,9 +12,8 @@ from docker import Client
from flask import request
from flask_restful import Resource
from oslo_log import log as logging
-from moon_utilities.security_functions import check_auth
-from moon_db.core import PDPManager
-from moon_utilities import configuration, exceptions
+from python_moonutilities.security_functions import check_auth
+from python_moonutilities import configuration
docker_conf = configuration.get_configuration("docker")['docker']
docker = Client(base_url=docker_conf['url'])
diff --git a/moonv4/moon_manager/moon_manager/api/data.py b/moonv4/moon_manager/moon_manager/api/data.py
index 85faf415..61fe92bf 100644
--- a/moonv4/moon_manager/moon_manager/api/data.py
+++ b/moonv4/moon_manager/moon_manager/api/data.py
@@ -10,8 +10,8 @@ Data are elements used to create rules
from flask import request
from flask_restful import Resource
from oslo_log import log as logging
-from moon_utilities.security_functions import check_auth
-from moon_db.core import PolicyManager
+from python_moonutilities.security_functions import check_auth
+from python_moondb.core import PolicyManager
__version__ = "0.2.0"
diff --git a/moonv4/moon_manager/moon_manager/api/generic.py b/moonv4/moon_manager/moon_manager/api/generic.py
index 9ff285c8..bd7dcdac 100644
--- a/moonv4/moon_manager/moon_manager/api/generic.py
+++ b/moonv4/moon_manager/moon_manager/api/generic.py
@@ -9,7 +9,7 @@ Those API are helping API used to manage the Moon platform.
from flask_restful import Resource, request
from oslo_log import log as logging
import moon_manager.api
-from moon_utilities.security_functions import check_auth
+from python_moonutilities.security_functions import check_auth
__version__ = "0.1.0"
diff --git a/moonv4/moon_manager/moon_manager/api/meta_data.py b/moonv4/moon_manager/moon_manager/api/meta_data.py
index 95cd58cc..9dc04cc7 100644
--- a/moonv4/moon_manager/moon_manager/api/meta_data.py
+++ b/moonv4/moon_manager/moon_manager/api/meta_data.py
@@ -10,8 +10,8 @@ Meta Data are elements used to create Meta data (skeleton of security policies)
from flask import request
from flask_restful import Resource
from oslo_log import log as logging
-from moon_utilities.security_functions import check_auth
-from moon_db.core import ModelManager
+from python_moonutilities.security_functions import check_auth
+from python_moondb.core import ModelManager
__version__ = "0.2.0"
diff --git a/moonv4/moon_manager/moon_manager/api/meta_rules.py b/moonv4/moon_manager/moon_manager/api/meta_rules.py
index 45e2b5ee..ceba0ffb 100644
--- a/moonv4/moon_manager/moon_manager/api/meta_rules.py
+++ b/moonv4/moon_manager/moon_manager/api/meta_rules.py
@@ -10,8 +10,8 @@ Meta rules are skeleton for security policies
from flask import request
from flask_restful import Resource
from oslo_log import log as logging
-from moon_utilities.security_functions import check_auth
-from moon_db.core import ModelManager
+from python_moonutilities.security_functions import check_auth
+from python_moondb.core import ModelManager
__version__ = "0.1.0"
diff --git a/moonv4/moon_manager/moon_manager/api/models.py b/moonv4/moon_manager/moon_manager/api/models.py
index 0a050c7f..62866191 100644
--- a/moonv4/moon_manager/moon_manager/api/models.py
+++ b/moonv4/moon_manager/moon_manager/api/models.py
@@ -9,8 +9,8 @@ Models aggregate multiple meta rules
from flask import request
from flask_restful import Resource
from oslo_log import log as logging
-from moon_utilities.security_functions import check_auth
-from moon_db.core import ModelManager
+from python_moonutilities.security_functions import check_auth
+from python_moondb.core import ModelManager
__version__ = "0.1.0"
diff --git a/moonv4/moon_manager/moon_manager/api/pdp.py b/moonv4/moon_manager/moon_manager/api/pdp.py
index 465f4dba..9183c25d 100644
--- a/moonv4/moon_manager/moon_manager/api/pdp.py
+++ b/moonv4/moon_manager/moon_manager/api/pdp.py
@@ -12,11 +12,11 @@ from flask_restful import Resource
import logging
import requests
import time
-from moon_utilities.security_functions import check_auth
-from moon_db.core import PDPManager
-from moon_db.core import PolicyManager
-from moon_db.core import ModelManager
-from moon_utilities import configuration
+from python_moonutilities.security_functions import check_auth
+from python_moondb.core import PDPManager
+from python_moondb.core import PolicyManager
+from python_moondb.core import ModelManager
+from python_moonutilities import configuration
__version__ = "0.1.0"
diff --git a/moonv4/moon_manager/moon_manager/api/perimeter.py b/moonv4/moon_manager/moon_manager/api/perimeter.py
index 2eb80652..8196e627 100644
--- a/moonv4/moon_manager/moon_manager/api/perimeter.py
+++ b/moonv4/moon_manager/moon_manager/api/perimeter.py
@@ -13,8 +13,8 @@
from flask import request
from flask_restful import Resource
from oslo_log import log as logging
-from moon_utilities.security_functions import check_auth
-from moon_db.core import PolicyManager
+from python_moonutilities.security_functions import check_auth
+from python_moondb.core import PolicyManager
__version__ = "0.2.0"
diff --git a/moonv4/moon_manager/moon_manager/api/policies.py b/moonv4/moon_manager/moon_manager/api/policies.py
index 8ef11a0d..f34276bb 100644
--- a/moonv4/moon_manager/moon_manager/api/policies.py
+++ b/moonv4/moon_manager/moon_manager/api/policies.py
@@ -10,8 +10,8 @@ Policies are instances of security models and implement security policies
from flask import request
from flask_restful import Resource
from oslo_log import log as logging
-from moon_utilities.security_functions import check_auth
-from moon_db.core import PolicyManager
+from python_moonutilities.security_functions import check_auth
+from python_moondb.core import PolicyManager
__version__ = "0.1.0"
diff --git a/moonv4/moon_manager/moon_manager/api/rules.py b/moonv4/moon_manager/moon_manager/api/rules.py
index f7771f1a..b25365df 100644
--- a/moonv4/moon_manager/moon_manager/api/rules.py
+++ b/moonv4/moon_manager/moon_manager/api/rules.py
@@ -9,8 +9,8 @@ Rules (TODO)
from flask import request
from flask_restful import Resource
from oslo_log import log as logging
-from moon_utilities.security_functions import check_auth
-from moon_db.core import PolicyManager
+from python_moonutilities.security_functions import check_auth
+from python_moondb.core import PolicyManager
__version__ = "0.1.0"
diff --git a/moonv4/moon_manager/moon_manager/http_server.py b/moonv4/moon_manager/moon_manager/http_server.py
index c671ed6f..584e71a2 100644
--- a/moonv4/moon_manager/moon_manager/http_server.py
+++ b/moonv4/moon_manager/moon_manager/http_server.py
@@ -21,8 +21,8 @@ from moon_manager.api.data import SubjectData, ObjectData, ActionData
from moon_manager.api.assignments import SubjectAssignments, ObjectAssignments, ActionAssignments
from moon_manager.api.rules import Rules
# from moon_manager.api.containers import Container
-from moon_utilities import configuration, exceptions
-from moon_db.core import PDPManager
+from python_moonutilities import configuration, exceptions
+from python_moondb.core import PDPManager
LOG = logging.getLogger("moon.manager.http")
diff --git a/moonv4/moon_manager/moon_manager/server.py b/moonv4/moon_manager/moon_manager/server.py
index f777fac1..bcc52cb3 100644
--- a/moonv4/moon_manager/moon_manager/server.py
+++ b/moonv4/moon_manager/moon_manager/server.py
@@ -6,7 +6,7 @@
import os
from oslo_config import cfg
from oslo_log import log as logging
-from moon_utilities import configuration, exceptions
+from python_moonutilities import configuration, exceptions
from moon_manager.http_server import HTTPServer
LOG = logging.getLogger("moon.manager")
diff --git a/moonv4/moon_manager/requirements.txt b/moonv4/moon_manager/requirements.txt
index 6b2af70b..15ba715b 100644
--- a/moonv4/moon_manager/requirements.txt
+++ b/moonv4/moon_manager/requirements.txt
@@ -1,6 +1,6 @@
flask
flask_restful
flask_cors
-moon_utilities
-moon_db
+python_moonutilities
+python_moondb
docker-py
diff --git a/moonv4/moon_manager/tests/unit_python/conftest.py b/moonv4/moon_manager/tests/unit_python/conftest.py
index d6f518f7..c59fae40 100644
--- a/moonv4/moon_manager/tests/unit_python/conftest.py
+++ b/moonv4/moon_manager/tests/unit_python/conftest.py
@@ -176,7 +176,7 @@ def no_requests(monkeypatch):
}]}
)
print("Start populating the DB.")
- from moon_db.db_manager import init_engine, main
+ from python_moondb.db_manager import init_engine, main
engine = init_engine()
print("engine={}".format(engine))
main("upgrade", logging.getLogger("db_manager"), engine)
diff --git a/moonv4/moon_manager/tests/unit_python/requirements.txt b/moonv4/moon_manager/tests/unit_python/requirements.txt
index 8bd8449f..21975ce3 100644
--- a/moonv4/moon_manager/tests/unit_python/requirements.txt
+++ b/moonv4/moon_manager/tests/unit_python/requirements.txt
@@ -1,5 +1,5 @@
flask
flask_cors
flask_restful
-moon_db
-moon_utilities \ No newline at end of file
+python_moondb
+python_moonutilities \ No newline at end of file
diff --git a/moonv4/moon_orchestrator/moon_orchestrator/api/generic.py b/moonv4/moon_orchestrator/moon_orchestrator/api/generic.py
index fd43b1c5..84de4e69 100644
--- a/moonv4/moon_orchestrator/moon_orchestrator/api/generic.py
+++ b/moonv4/moon_orchestrator/moon_orchestrator/api/generic.py
@@ -9,7 +9,7 @@ Those API are helping API used to manage the Moon platform.
from flask_restful import Resource, request
import logging
import moon_orchestrator.api
-from moon_utilities.security_functions import check_auth
+from python_moonutilities.security_functions import check_auth
__version__ = "0.1.0"
diff --git a/moonv4/moon_orchestrator/moon_orchestrator/api/pods.py b/moonv4/moon_orchestrator/moon_orchestrator/api/pods.py
index 319788e5..9bca4d93 100644
--- a/moonv4/moon_orchestrator/moon_orchestrator/api/pods.py
+++ b/moonv4/moon_orchestrator/moon_orchestrator/api/pods.py
@@ -5,7 +5,7 @@
from flask import request
from flask_restful import Resource
-from moon_utilities.security_functions import check_auth
+from python_moonutilities.security_functions import check_auth
import logging
LOG = logging.getLogger("moon.orchestrator.api.pods")
diff --git a/moonv4/moon_orchestrator/moon_orchestrator/drivers.py b/moonv4/moon_orchestrator/moon_orchestrator/drivers.py
index 95000840..08c53be3 100644
--- a/moonv4/moon_orchestrator/moon_orchestrator/drivers.py
+++ b/moonv4/moon_orchestrator/moon_orchestrator/drivers.py
@@ -6,7 +6,7 @@
from kubernetes import client, config
import logging
import urllib3.exceptions
-from moon_utilities import configuration
+from python_moonutilities import configuration
LOG = logging.getLogger("moon.orchestrator.drivers")
diff --git a/moonv4/moon_orchestrator/moon_orchestrator/http_server.py b/moonv4/moon_orchestrator/moon_orchestrator/http_server.py
index 7aed18a6..e6a5ee57 100644
--- a/moonv4/moon_orchestrator/moon_orchestrator/http_server.py
+++ b/moonv4/moon_orchestrator/moon_orchestrator/http_server.py
@@ -14,8 +14,8 @@ import time
from moon_orchestrator import __version__
from moon_orchestrator.api.pods import Pods
from moon_orchestrator.api.generic import Logs, Status
-from moon_utilities import configuration, exceptions
-from moon_utilities.misc import get_random_name
+from python_moonutilities import configuration, exceptions
+from python_moonutilities.misc import get_random_name
from moon_orchestrator.drivers import get_driver
LOG = logging.getLogger("moon.orchestrator.http")
diff --git a/moonv4/moon_orchestrator/moon_orchestrator/server.py b/moonv4/moon_orchestrator/moon_orchestrator/server.py
index 5e16bfcd..0cbd535a 100644
--- a/moonv4/moon_orchestrator/moon_orchestrator/server.py
+++ b/moonv4/moon_orchestrator/moon_orchestrator/server.py
@@ -5,7 +5,7 @@
import os
import logging
-from moon_utilities import configuration, exceptions
+from python_moonutilities import configuration, exceptions
from moon_orchestrator.http_server import HTTPServer
LOG = logging.getLogger("moon.orchestrator")
diff --git a/moonv4/moon_orchestrator/requirements.txt b/moonv4/moon_orchestrator/requirements.txt
index 6197f10f..0d952e6c 100644
--- a/moonv4/moon_orchestrator/requirements.txt
+++ b/moonv4/moon_orchestrator/requirements.txt
@@ -2,7 +2,7 @@ flask
flask_restful
flask_cors
werkzeug
-moon_utilities
-moon_db
+python_moonutilities
+python_moondb
kubernetes
pyaml \ No newline at end of file
diff --git a/moonv4/moon_orchestrator/tests/unit_python/requirements.txt b/moonv4/moon_orchestrator/tests/unit_python/requirements.txt
index 8bd8449f..21975ce3 100644
--- a/moonv4/moon_orchestrator/tests/unit_python/requirements.txt
+++ b/moonv4/moon_orchestrator/tests/unit_python/requirements.txt
@@ -1,5 +1,5 @@
flask
flask_cors
flask_restful
-moon_db
-moon_utilities \ No newline at end of file
+python_moondb
+python_moonutilities \ No newline at end of file
diff --git a/moonv4/moon_wrapper/moon_wrapper/api/generic.py b/moonv4/moon_wrapper/moon_wrapper/api/generic.py
index 68687ddb..7dd44fb4 100644
--- a/moonv4/moon_wrapper/moon_wrapper/api/generic.py
+++ b/moonv4/moon_wrapper/moon_wrapper/api/generic.py
@@ -9,7 +9,7 @@ Those API are helping API used to manage the Moon platform.
from flask_restful import Resource, request
from oslo_log import log as logging
import moon_wrapper.api
-from moon_utilities.security_functions import check_auth
+from python_moonutilities.security_functions import check_auth
__version__ = "0.1.0"
diff --git a/moonv4/moon_wrapper/moon_wrapper/api/wrapper.py b/moonv4/moon_wrapper/moon_wrapper/api/wrapper.py
index 32eb4e68..e1ce783a 100644
--- a/moonv4/moon_wrapper/moon_wrapper/api/wrapper.py
+++ b/moonv4/moon_wrapper/moon_wrapper/api/wrapper.py
@@ -12,14 +12,7 @@ from flask_restful import Resource
import logging
import json
import requests
-from moon_utilities import exceptions
-import time
-from uuid import uuid4
-
-# from moon_interface.api.authz import pdp_in_cache, pdp_in_manager, container_exist, \
-# create_containers, create_authz_request
-# from moon_interface.authz_requests import AuthzRequest
-from moon_utilities import configuration
+from python_moonutilities import exceptions
__version__ = "0.1.0"
diff --git a/moonv4/moon_wrapper/moon_wrapper/http_server.py b/moonv4/moon_wrapper/moon_wrapper/http_server.py
index 39951089..1b429bc5 100644
--- a/moonv4/moon_wrapper/moon_wrapper/http_server.py
+++ b/moonv4/moon_wrapper/moon_wrapper/http_server.py
@@ -4,14 +4,13 @@
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
from flask import Flask, jsonify
-from flask_cors import CORS, cross_origin
from flask_restful import Resource, Api
import logging
from moon_wrapper import __version__
from moon_wrapper.api.generic import Status, Logs, API
from moon_wrapper.api.wrapper import Wrapper
-from moon_utilities.cache import Cache
-from moon_utilities import configuration, exceptions
+from python_moonutilities.cache import Cache
+from python_moonutilities import configuration, exceptions
logger = logging.getLogger("moon.wrapper.http")
diff --git a/moonv4/moon_wrapper/moon_wrapper/server.py b/moonv4/moon_wrapper/moon_wrapper/server.py
index a3461018..2f236c4f 100644
--- a/moonv4/moon_wrapper/moon_wrapper/server.py
+++ b/moonv4/moon_wrapper/moon_wrapper/server.py
@@ -4,7 +4,7 @@
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
import logging
-from moon_utilities import configuration, exceptions
+from python_moonutilities import configuration, exceptions
from moon_wrapper.http_server import HTTPServer
LOG = logging.getLogger("moon.wrapper")
diff --git a/moonv4/moon_wrapper/requirements.txt b/moonv4/moon_wrapper/requirements.txt
index 85ec611f..c1bd9a2f 100644
--- a/moonv4/moon_wrapper/requirements.txt
+++ b/moonv4/moon_wrapper/requirements.txt
@@ -2,4 +2,4 @@ flask
flask_restful
flask_cors
werkzeug
-moon_utilities \ No newline at end of file
+python_moonutilities \ No newline at end of file
diff --git a/moonv4/moon_wrapper/tests/unit_python/conftest.py b/moonv4/moon_wrapper/tests/unit_python/conftest.py
index 61c3da71..b160ebf6 100644
--- a/moonv4/moon_wrapper/tests/unit_python/conftest.py
+++ b/moonv4/moon_wrapper/tests/unit_python/conftest.py
@@ -206,8 +206,8 @@ def set_env_variables():
def get_pickled_context():
- from moon_utilities.security_functions import Context
- from moon_utilities.cache import Cache
+ from python_moonutilities.security_functions import Context
+ from python_moonutilities.cache import Cache
CACHE = Cache()
CACHE.update()
_context = Context(context(), CACHE)
diff --git a/moonv4/moon_wrapper/tests/unit_python/requirements.txt b/moonv4/moon_wrapper/tests/unit_python/requirements.txt
index 8bd8449f..21975ce3 100644
--- a/moonv4/moon_wrapper/tests/unit_python/requirements.txt
+++ b/moonv4/moon_wrapper/tests/unit_python/requirements.txt
@@ -1,5 +1,5 @@
flask
flask_cors
flask_restful
-moon_db
-moon_utilities \ No newline at end of file
+python_moondb
+python_moonutilities \ No newline at end of file
diff --git a/moonv4/python_moonclient/README.md b/moonv4/python_moonclient/README.md
index d091cdf5..d1ebc786 100644
--- a/moonv4/python_moonclient/README.md
+++ b/moonv4/python_moonclient/README.md
@@ -6,7 +6,7 @@ For any other information, refer to the parent project:
https://git.opnfv.org/moon
-moon_utilities is a common Python lib for other Moon Python packages
+python_moonutilities is a common Python lib for other Moon Python packages
## Build
### Build Python Package
diff --git a/moonv4/python_moondb/Changelog b/moonv4/python_moondb/Changelog
index de04eadc..ff244af5 100644
--- a/moonv4/python_moondb/Changelog
+++ b/moonv4/python_moondb/Changelog
@@ -48,3 +48,8 @@ CHANGES
1.2.3
-----
- Cleanup moon_db code
+
+1.2.4
+-----
+- Update the name of the library (from moon_db)
+
diff --git a/moonv4/python_moondb/python_moondb/__init__.py b/moonv4/python_moondb/python_moondb/__init__.py
index 0be29aa0..73faf752 100644
--- a/moonv4/python_moondb/python_moondb/__init__.py
+++ b/moonv4/python_moondb/python_moondb/__init__.py
@@ -3,5 +3,5 @@
# license which can be found in the file 'LICENSE' in this package distribution
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-__version__ = "1.2.3"
+__version__ = "1.2.4"
diff --git a/moonv4/python_moondb/python_moondb/api/keystone.py b/moonv4/python_moondb/python_moondb/api/keystone.py
index 906ab788..f5410190 100644
--- a/moonv4/python_moondb/python_moondb/api/keystone.py
+++ b/moonv4/python_moondb/python_moondb/api/keystone.py
@@ -8,7 +8,7 @@ import requests
import json
from uuid import uuid4
from oslo_log import log as logging
-from moon_utilities import exceptions, configuration
+from python_moonutilities import exceptions, configuration
from python_moonutilities.security_functions import filter_input, login, logout
from python_moondb.api.managers import Managers
diff --git a/moonv4/python_moonutilities/Changelog b/moonv4/python_moonutilities/Changelog
index 3eaf7894..aba5f7c4 100644
--- a/moonv4/python_moonutilities/Changelog
+++ b/moonv4/python_moonutilities/Changelog
@@ -62,3 +62,7 @@ CHANGES
1.4.1
-----
- Cleanup moon_utilities code
+
+1.4.2
+-----
+- Update the name of the library (from moon_utilities)
diff --git a/moonv4/python_moonutilities/python_moonutilities/__init__.py b/moonv4/python_moonutilities/python_moonutilities/__init__.py
index e3ad9307..bbd31082 100644
--- a/moonv4/python_moonutilities/python_moonutilities/__init__.py
+++ b/moonv4/python_moonutilities/python_moonutilities/__init__.py
@@ -3,4 +3,4 @@
# license which can be found in the file 'LICENSE' in this package distribution
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-__version__ = "1.4.1"
+__version__ = "1.4.2"
diff --git a/moonv4/python_moonutilities/tests/unit_python/test_cache.py b/moonv4/python_moonutilities/tests/unit_python/test_cache.py
index 3d4f7292..c479395b 100644
--- a/moonv4/python_moonutilities/tests/unit_python/test_cache.py
+++ b/moonv4/python_moonutilities/tests/unit_python/test_cache.py
@@ -2,13 +2,13 @@ import pytest
def test_authz_request():
- from moon_utilities import cache
+ from python_moonutilities import cache
c = cache.Cache()
assert isinstance(c.authz_requests, dict)
def test_get_subject_success():
- from moon_utilities import cache
+ from python_moonutilities import cache
cache_obj = cache.Cache()
policy_id = 'policy_id_1'
name = 'subject_name'
@@ -17,7 +17,7 @@ def test_get_subject_success():
def test_get_subject_failure():
- from moon_utilities import cache
+ from python_moonutilities import cache
cache_obj = cache.Cache()
policy_id = 'policy_id_1'
name = 'invalid name'
@@ -27,7 +27,7 @@ def test_get_subject_failure():
def test_get_object_success():
- from moon_utilities import cache
+ from python_moonutilities import cache
cache_obj = cache.Cache()
policy_id = 'policy_id_1'
name = 'object_name'
@@ -36,7 +36,7 @@ def test_get_object_success():
def test_get_object_failure():
- from moon_utilities import cache
+ from python_moonutilities import cache
cache_obj = cache.Cache()
policy_id = 'policy_id_1'
name = 'invalid name'
@@ -46,7 +46,7 @@ def test_get_object_failure():
def test_get_action_success():
- from moon_utilities import cache
+ from python_moonutilities import cache
cache_obj = cache.Cache()
policy_id = 'policy_id_1'
name = 'action_name'
@@ -55,7 +55,7 @@ def test_get_action_success():
def test_get_action_failure():
- from moon_utilities import cache
+ from python_moonutilities import cache
cache_obj = cache.Cache()
policy_id = 'policy_id_1'
name = 'invalid name'
@@ -65,7 +65,7 @@ def test_get_action_failure():
def test_cache_manager():
- from moon_utilities import cache
+ from python_moonutilities import cache
cache_obj = cache.Cache()
assert cache_obj.pdp is not None
assert cache_obj.meta_rules is not None
diff --git a/moonv4/python_moonutilities/tests/unit_python/test_configuration.py b/moonv4/python_moonutilities/tests/unit_python/test_configuration.py
index 0ebff995..48699062 100644
--- a/moonv4/python_moonutilities/tests/unit_python/test_configuration.py
+++ b/moonv4/python_moonutilities/tests/unit_python/test_configuration.py
@@ -1,5 +1,5 @@
def test_get_components():
- from moon_utilities import configuration
+ from python_moonutilities import configuration
assert isinstance(configuration.get_components(), dict)
diff --git a/moonv4/templates/moonforming/Dockerfile b/moonv4/templates/moonforming/Dockerfile
index 87a067f9..fe48eee0 100644
--- a/moonv4/templates/moonforming/Dockerfile
+++ b/moonv4/templates/moonforming/Dockerfile
@@ -1,6 +1,6 @@
FROM python:3
WORKDIR /usr/src/app
-RUN pip install --no-cache-dir --upgrade requests pyyaml moon_utilities moon_db
+RUN pip install --no-cache-dir --upgrade requests pyyaml python_moonutilities python_moondb
ENV POPULATE_ARGS "-v"