aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--moonv4/python_moondb/Changelog (renamed from moonv4/moon_db/Changelog)0
-rw-r--r--moonv4/python_moondb/LICENSE (renamed from moonv4/moon_db/LICENSE)0
-rw-r--r--moonv4/python_moondb/MANIFEST.in (renamed from moonv4/moon_db/MANIFEST.in)0
-rw-r--r--moonv4/python_moondb/README.md (renamed from moonv4/moon_db/README.md)16
-rw-r--r--moonv4/python_moondb/bin/drop_tables.sql (renamed from moonv4/moon_db/bin/drop_tables.sql)0
-rw-r--r--moonv4/python_moondb/build.sh (renamed from moonv4/moon_db/build.sh)0
-rw-r--r--moonv4/python_moondb/python_moondb/__init__.py (renamed from moonv4/moon_db/moon_db/__init__.py)0
-rw-r--r--moonv4/python_moondb/python_moondb/api/__init__.py (renamed from moonv4/moon_db/moon_db/api/__init__.py)0
-rw-r--r--moonv4/python_moondb/python_moondb/api/keystone.py (renamed from moonv4/moon_db/moon_db/api/keystone.py)4
-rw-r--r--moonv4/python_moondb/python_moondb/api/managers.py (renamed from moonv4/moon_db/moon_db/api/managers.py)0
-rw-r--r--moonv4/python_moondb/python_moondb/api/model.py (renamed from moonv4/moon_db/moon_db/api/model.py)6
-rw-r--r--moonv4/python_moondb/python_moondb/api/pdp.py (renamed from moonv4/moon_db/moon_db/api/pdp.py)4
-rw-r--r--moonv4/python_moondb/python_moondb/api/policy.py (renamed from moonv4/moon_db/moon_db/api/policy.py)4
-rw-r--r--moonv4/python_moondb/python_moondb/backends/__init__.py (renamed from moonv4/moon_db/moon_db/backends/__init__.py)0
-rw-r--r--moonv4/python_moondb/python_moondb/backends/flat.py (renamed from moonv4/moon_db/moon_db/backends/flat.py)2
-rw-r--r--moonv4/python_moondb/python_moondb/backends/sql.py (renamed from moonv4/moon_db/moon_db/backends/sql.py)7
-rw-r--r--moonv4/python_moondb/python_moondb/core.py (renamed from moonv4/moon_db/moon_db/core.py)4
-rw-r--r--moonv4/python_moondb/python_moondb/db_manager.py (renamed from moonv4/moon_db/moon_db/db_manager.py)4
-rw-r--r--moonv4/python_moondb/python_moondb/migrate_repo/__init__.py (renamed from moonv4/moon_db/moon_db/migrate_repo/__init__.py)0
-rw-r--r--moonv4/python_moondb/python_moondb/migrate_repo/versions/001_moon.py (renamed from moonv4/moon_db/moon_db/migrate_repo/versions/001_moon.py)0
-rw-r--r--moonv4/python_moondb/python_moondb/migrate_repo/versions/__init__.py (renamed from moonv4/moon_db/moon_db/migrate_repo/versions/__init__.py)0
-rw-r--r--moonv4/python_moondb/requirements.txt (renamed from moonv4/moon_db/requirements.txt)0
-rw-r--r--moonv4/python_moondb/setup.py (renamed from moonv4/moon_db/setup.py)12
-rw-r--r--moonv4/python_moondb/tests/unit_python/conftest.py (renamed from moonv4/moon_db/tests/unit_python/conftest.py)0
-rw-r--r--moonv4/python_moondb/tests/unit_python/mock_components.py (renamed from moonv4/moon_db/tests/unit_python/mock_components.py)0
-rw-r--r--moonv4/python_moondb/tests/unit_python/mock_keystone.py (renamed from moonv4/moon_db/tests/unit_python/mock_keystone.py)0
-rw-r--r--moonv4/python_moondb/tests/unit_python/requirements.txt (renamed from moonv4/moon_db/tests/unit_python/requirements.txt)2
-rw-r--r--moonv4/python_moondb/tests/unit_python/test_policies.py (renamed from moonv4/moon_db/tests/unit_python/test_policies.py)0
-rw-r--r--moonv4/python_moondb/tests/unit_python/utilities.py (renamed from moonv4/moon_db/tests/unit_python/utilities.py)0
29 files changed, 32 insertions, 33 deletions
diff --git a/moonv4/moon_db/Changelog b/moonv4/python_moondb/Changelog
index de04eadc..de04eadc 100644
--- a/moonv4/moon_db/Changelog
+++ b/moonv4/python_moondb/Changelog
diff --git a/moonv4/moon_db/LICENSE b/moonv4/python_moondb/LICENSE
index d6456956..d6456956 100644
--- a/moonv4/moon_db/LICENSE
+++ b/moonv4/python_moondb/LICENSE
diff --git a/moonv4/moon_db/MANIFEST.in b/moonv4/python_moondb/MANIFEST.in
index 82b40140..82b40140 100644
--- a/moonv4/moon_db/MANIFEST.in
+++ b/moonv4/python_moondb/MANIFEST.in
diff --git a/moonv4/moon_db/README.md b/moonv4/python_moondb/README.md
index 5aa877fc..d36c6ae3 100644
--- a/moonv4/moon_db/README.md
+++ b/moonv4/python_moondb/README.md
@@ -1,4 +1,4 @@
-# moon_db
+# python_moondb
This package contains the database module for the Moon project
It is designed to provide a driver to access the Moon database.
@@ -10,23 +10,23 @@ For any other information, refer to the parent project:
## Build
### Build Python Package
```bash
-cd ${MOON_HOME}/moonv4/moon_db
+cd ${MOON_HOME}/python_moondb
python3 setup.py sdist bdist_wheel
```
### Push Python Package to PIP
```bash
-cd ${MOON_HOME}/moonv4/moon_db
-gpg --detach-sign -u "${GPG_ID}" -a dist/moon_db-X.Y.Z-py3-none-any.whl
-gpg --detach-sign -u "${GPG_ID}" -a dist/moon_db-X.Y.Z.tar.gz
-twine upload dist/moon_db-X.Y.Z-py3-none-any.whl dist/moon_db-X.Y.Z-py3-none-any.whl.asc
-twine upload dist/moon_db-X.Y.Z.tar.gz dist/moon_db-X.Y.Z.tar.gz.asc
+cd ${MOON_HOME}/python_moondb
+gpg --detach-sign -u "${GPG_ID}" -a dist/python_moondb-X.Y.Z-py3-none-any.whl
+gpg --detach-sign -u "${GPG_ID}" -a dist/python_moondb-X.Y.Z.tar.gz
+twine upload dist/python_moondb-X.Y.Z-py3-none-any.whl dist/python_moondb-X.Y.Z-py3-none-any.whl.asc
+twine upload dist/python_moondb-X.Y.Z.tar.gz dist/python_moondb-X.Y.Z.tar.gz.asc
```
## Test
### Python Unit Test
launch Docker for Python unit tests
```bash
-cd ${MOON_HOME}/moonv4/moon_db
+cd ${MOON_HOME}/python_moondb
docker run --rm --volume $(pwd):/data wukongsun/moon_python_unit_test:latest
``` \ No newline at end of file
diff --git a/moonv4/moon_db/bin/drop_tables.sql b/moonv4/python_moondb/bin/drop_tables.sql
index f5f65ea7..f5f65ea7 100644
--- a/moonv4/moon_db/bin/drop_tables.sql
+++ b/moonv4/python_moondb/bin/drop_tables.sql
diff --git a/moonv4/moon_db/build.sh b/moonv4/python_moondb/build.sh
index f109e9b8..f109e9b8 100644
--- a/moonv4/moon_db/build.sh
+++ b/moonv4/python_moondb/build.sh
diff --git a/moonv4/moon_db/moon_db/__init__.py b/moonv4/python_moondb/python_moondb/__init__.py
index 0be29aa0..0be29aa0 100644
--- a/moonv4/moon_db/moon_db/__init__.py
+++ b/moonv4/python_moondb/python_moondb/__init__.py
diff --git a/moonv4/moon_db/moon_db/api/__init__.py b/moonv4/python_moondb/python_moondb/api/__init__.py
index e69de29b..e69de29b 100644
--- a/moonv4/moon_db/moon_db/api/__init__.py
+++ b/moonv4/python_moondb/python_moondb/api/__init__.py
diff --git a/moonv4/moon_db/moon_db/api/keystone.py b/moonv4/python_moondb/python_moondb/api/keystone.py
index b570918c..906ab788 100644
--- a/moonv4/moon_db/moon_db/api/keystone.py
+++ b/moonv4/python_moondb/python_moondb/api/keystone.py
@@ -9,8 +9,8 @@ import json
from uuid import uuid4
from oslo_log import log as logging
from moon_utilities import exceptions, configuration
-from moon_db.api.managers import Managers
-from moon_utilities.security_functions import filter_input, login, logout
+from python_moonutilities.security_functions import filter_input, login, logout
+from python_moondb.api.managers import Managers
LOG = logging.getLogger("moon.db.api.keystone")
diff --git a/moonv4/moon_db/moon_db/api/managers.py b/moonv4/python_moondb/python_moondb/api/managers.py
index 602e0f11..602e0f11 100644
--- a/moonv4/moon_db/moon_db/api/managers.py
+++ b/moonv4/python_moondb/python_moondb/api/managers.py
diff --git a/moonv4/moon_db/moon_db/api/model.py b/moonv4/python_moondb/python_moondb/api/model.py
index f648295e..fbfbb680 100644
--- a/moonv4/moon_db/moon_db/api/model.py
+++ b/moonv4/python_moondb/python_moondb/api/model.py
@@ -5,9 +5,9 @@
from uuid import uuid4
from oslo_log import log as logging
-from moon_utilities import exceptions
-from moon_utilities.security_functions import filter_input, enforce
-from moon_db.api.managers import Managers
+from python_moonutilities import exceptions
+from python_moonutilities.security_functions import filter_input, enforce
+from python_moondb.api.managers import Managers
LOG = logging.getLogger("moon.db.api.model")
diff --git a/moonv4/moon_db/moon_db/api/pdp.py b/moonv4/python_moondb/python_moondb/api/pdp.py
index 05eb163f..5fb7aa78 100644
--- a/moonv4/moon_db/moon_db/api/pdp.py
+++ b/moonv4/python_moondb/python_moondb/api/pdp.py
@@ -5,8 +5,8 @@
from uuid import uuid4
from oslo_log import log as logging
-from moon_utilities.security_functions import filter_input, enforce
-from moon_db.api.managers import Managers
+from python_moonutilities.security_functions import filter_input, enforce
+from python_moondb.api.managers import Managers
LOG = logging.getLogger("moon.db.api.pdp")
diff --git a/moonv4/moon_db/moon_db/api/policy.py b/moonv4/python_moondb/python_moondb/api/policy.py
index 272872ad..81689826 100644
--- a/moonv4/moon_db/moon_db/api/policy.py
+++ b/moonv4/python_moondb/python_moondb/api/policy.py
@@ -5,8 +5,8 @@
from uuid import uuid4
import logging
-from moon_utilities.security_functions import enforce
-from moon_db.api.managers import Managers
+from python_moonutilities.security_functions import enforce
+from python_moondb.api.managers import Managers
LOG = logging.getLogger("moon.db.api.policy")
diff --git a/moonv4/moon_db/moon_db/backends/__init__.py b/moonv4/python_moondb/python_moondb/backends/__init__.py
index 237bdc3e..237bdc3e 100644
--- a/moonv4/moon_db/moon_db/backends/__init__.py
+++ b/moonv4/python_moondb/python_moondb/backends/__init__.py
diff --git a/moonv4/moon_db/moon_db/backends/flat.py b/moonv4/python_moondb/python_moondb/backends/flat.py
index 820a4146..0fe2f00b 100644
--- a/moonv4/moon_db/moon_db/backends/flat.py
+++ b/moonv4/python_moondb/python_moondb/backends/flat.py
@@ -5,7 +5,7 @@
import logging
import time
-from moon_db.core import LogDriver
+from python_moondb.core import LogDriver
class LogConnector(LogDriver):
diff --git a/moonv4/moon_db/moon_db/backends/sql.py b/moonv4/python_moondb/python_moondb/backends/sql.py
index 78de468f..5dba8eb2 100644
--- a/moonv4/moon_db/moon_db/backends/sql.py
+++ b/moonv4/python_moondb/python_moondb/backends/sql.py
@@ -6,8 +6,6 @@
import copy
import json
from uuid import uuid4
-from moon_utilities.exceptions import *
-from moon_db.core import PDPDriver, PolicyDriver, ModelDriver
import sqlalchemy as sql
import logging
from sqlalchemy.orm import sessionmaker
@@ -15,8 +13,9 @@ from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from contextlib import contextmanager
from sqlalchemy import types as sql_types
-from moon_utilities import configuration
-
+from python_moonutilities import configuration
+from python_moonutilities.exceptions import *
+from python_moondb.core import PDPDriver, PolicyDriver, ModelDriver
LOG = logging.getLogger("moon.db.driver.sql")
Base = declarative_base()
diff --git a/moonv4/moon_db/moon_db/core.py b/moonv4/python_moondb/python_moondb/core.py
index 069f2533..49e9f711 100644
--- a/moonv4/moon_db/moon_db/core.py
+++ b/moonv4/python_moondb/python_moondb/core.py
@@ -6,8 +6,8 @@
from oslo_log import log as logging
from oslo_config import cfg
from stevedore.driver import DriverManager
-from moon_utilities import configuration
-from moon_db.api import model, policy, pdp, keystone
+from python_moonutilities import configuration
+from python_moondb.api import model, policy, pdp, keystone
CONF = cfg.CONF
LOG = logging.getLogger("moon.db")
diff --git a/moonv4/moon_db/moon_db/db_manager.py b/moonv4/python_moondb/python_moondb/db_manager.py
index 75cbcdb0..c305284d 100644
--- a/moonv4/moon_db/moon_db/db_manager.py
+++ b/moonv4/python_moondb/python_moondb/db_manager.py
@@ -11,8 +11,8 @@ import importlib
import argparse
import logging
from sqlalchemy import create_engine
-from moon_db.migrate_repo import versions
-from moon_utilities import configuration
+from python_moonutilities import configuration
+from python_moondb.migrate_repo import versions
def init_args():
diff --git a/moonv4/moon_db/moon_db/migrate_repo/__init__.py b/moonv4/python_moondb/python_moondb/migrate_repo/__init__.py
index e69de29b..e69de29b 100644
--- a/moonv4/moon_db/moon_db/migrate_repo/__init__.py
+++ b/moonv4/python_moondb/python_moondb/migrate_repo/__init__.py
diff --git a/moonv4/moon_db/moon_db/migrate_repo/versions/001_moon.py b/moonv4/python_moondb/python_moondb/migrate_repo/versions/001_moon.py
index 2cc36140..2cc36140 100644
--- a/moonv4/moon_db/moon_db/migrate_repo/versions/001_moon.py
+++ b/moonv4/python_moondb/python_moondb/migrate_repo/versions/001_moon.py
diff --git a/moonv4/moon_db/moon_db/migrate_repo/versions/__init__.py b/moonv4/python_moondb/python_moondb/migrate_repo/versions/__init__.py
index e69de29b..e69de29b 100644
--- a/moonv4/moon_db/moon_db/migrate_repo/versions/__init__.py
+++ b/moonv4/python_moondb/python_moondb/migrate_repo/versions/__init__.py
diff --git a/moonv4/moon_db/requirements.txt b/moonv4/python_moondb/requirements.txt
index 03afc879..03afc879 100644
--- a/moonv4/moon_db/requirements.txt
+++ b/moonv4/python_moondb/requirements.txt
diff --git a/moonv4/moon_db/setup.py b/moonv4/python_moondb/setup.py
index 0cd90940..65687c3f 100644
--- a/moonv4/moon_db/setup.py
+++ b/moonv4/python_moondb/setup.py
@@ -4,7 +4,7 @@
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
from setuptools import setup, find_packages
-import moon_db
+import python_moondb
with open('requirements.txt') as f:
@@ -12,9 +12,9 @@ with open('requirements.txt') as f:
setup(
- name='moon_db',
+ name='python-moondb',
- version=moon_db.__version__,
+ version=python_moondb.__version__,
packages=find_packages(),
@@ -44,11 +44,11 @@ setup(
entry_points={
"moon_db.driver":
[
- "sql = moon_db.backends.sql:SQLConnector",
- "flat = moon_db.backends.flat:LogConnector",
+ "sql = python_moondb.backends.sql:SQLConnector",
+ "flat = python_moondb.backends.flat:LogConnector",
],
'console_scripts': [
- 'moon_db_manager = moon_db.db_manager:run',
+ 'moon_db_manager = python_moondb.db_manager:run',
],
}
diff --git a/moonv4/moon_db/tests/unit_python/conftest.py b/moonv4/python_moondb/tests/unit_python/conftest.py
index c2e5e579..c2e5e579 100644
--- a/moonv4/moon_db/tests/unit_python/conftest.py
+++ b/moonv4/python_moondb/tests/unit_python/conftest.py
diff --git a/moonv4/moon_db/tests/unit_python/mock_components.py b/moonv4/python_moondb/tests/unit_python/mock_components.py
index a0319e1a..a0319e1a 100644
--- a/moonv4/moon_db/tests/unit_python/mock_components.py
+++ b/moonv4/python_moondb/tests/unit_python/mock_components.py
diff --git a/moonv4/moon_db/tests/unit_python/mock_keystone.py b/moonv4/python_moondb/tests/unit_python/mock_keystone.py
index c0b26b88..c0b26b88 100644
--- a/moonv4/moon_db/tests/unit_python/mock_keystone.py
+++ b/moonv4/python_moondb/tests/unit_python/mock_keystone.py
diff --git a/moonv4/moon_db/tests/unit_python/requirements.txt b/moonv4/python_moondb/tests/unit_python/requirements.txt
index d6110d12..5f507ff7 100644
--- a/moonv4/moon_db/tests/unit_python/requirements.txt
+++ b/moonv4/python_moondb/tests/unit_python/requirements.txt
@@ -2,4 +2,4 @@ sqlalchemy
pymysql
pytest
requests_mock
-moon_utilities \ No newline at end of file
+python_moonutilities \ No newline at end of file
diff --git a/moonv4/moon_db/tests/unit_python/test_policies.py b/moonv4/python_moondb/tests/unit_python/test_policies.py
index 3bd1360e..3bd1360e 100644
--- a/moonv4/moon_db/tests/unit_python/test_policies.py
+++ b/moonv4/python_moondb/tests/unit_python/test_policies.py
diff --git a/moonv4/moon_db/tests/unit_python/utilities.py b/moonv4/python_moondb/tests/unit_python/utilities.py
index 1d79d890..1d79d890 100644
--- a/moonv4/moon_db/tests/unit_python/utilities.py
+++ b/moonv4/python_moondb/tests/unit_python/utilities.py