diff --git a/deckhand/conf/config.py b/deckhand/conf/config.py index 0b47b0ee..62086805 100644 --- a/deckhand/conf/config.py +++ b/deckhand/conf/config.py @@ -51,17 +51,6 @@ keystone_auth_opts = [ default='http://127.0.0.1/identity/v3') ] -logging_group = cfg.OptGroup( - name='logging', - title='Logging Options', - help='Logging options for Deckhand.') - -logging_opts = [ - cfg.StrOpt('global_logger_name', - default='deckhand', - help='Logger name for the top-level logger.') -] - def register_opts(conf): conf.register_group(barbican_group) @@ -70,14 +59,10 @@ def register_opts(conf): conf.register_group(keystone_auth_group) conf.register_opts(keystone_auth_opts, group=keystone_auth_group) - conf.register_group(logging_group) - conf.register_opts(logging_opts, group=logging_group) - def list_opts(): return {barbican_group: barbican_opts, - keystone_auth_group: keystone_auth_opts, - logging_group: logging_opts} + keystone_auth_group: keystone_auth_opts} def parse_args(args=None, usage=None, default_config_files=None): diff --git a/deckhand/control/api.py b/deckhand/control/api.py index 024d8f22..fc19c6b1 100644 --- a/deckhand/control/api.py +++ b/deckhand/control/api.py @@ -30,7 +30,7 @@ LOG = None def __setup_logging(): global LOG - LOGGER_NAME = CONF.logging.global_logger_name + LOGGER_NAME = 'deckhand' LOG = logging.getLogger(__name__, LOGGER_NAME) logging.register_options(CONF) @@ -58,9 +58,6 @@ def start_api(state_manager=None): Create routes for the v1.0 API and sets up logging. """ __setup_logging() - # FOR TESTING -- REMOVE - engine = db_api.get_engine() - assert engine.engine.name == 'sqlite' control_api = falcon.API(request_type=api_base.DeckhandRequest) diff --git a/deckhand/db/sqlalchemy/api.py b/deckhand/db/sqlalchemy/api.py index 71580607..635e8f65 100644 --- a/deckhand/db/sqlalchemy/api.py +++ b/deckhand/db/sqlalchemy/api.py @@ -23,8 +23,6 @@ from oslo_db import exception as db_exception from oslo_db.sqlalchemy import session from oslo_log import log as logging from oslo_utils import excutils -import osprofiler.sqlalchemy -from retrying import retry import six from six.moves import range import sqlalchemy diff --git a/deckhand/objects/documents.py b/deckhand/objects/documents.py index fbb50516..aaa74820 100644 --- a/deckhand/objects/documents.py +++ b/deckhand/objects/documents.py @@ -17,7 +17,7 @@ # from oslo_log import log as logging -import oslo_versionedobjects.fields as ovo_fields +from oslo_versionedobjects import fields as ovo_fields from deckhand.db.sqlalchemy import api as db_api from deckhand import objects diff --git a/deckhand/tests/unit/control/test_api.py b/deckhand/tests/unit/control/test_api.py index b29bdc4d..9c331a40 100644 --- a/deckhand/tests/unit/control/test_api.py +++ b/deckhand/tests/unit/control/test_api.py @@ -22,10 +22,12 @@ from deckhand.control import base as api_base class TestApi(testtools.TestCase): + @mock.patch.object(api, 'config', autospec=True) @mock.patch.object(api, 'secrets', autospec=True) @mock.patch.object(api, 'documents', autospec=True) @mock.patch.object(api, 'falcon', autospec=True) - def test_start_api(self, mock_falcon, mock_documents, mock_secrets): + def test_start_api(self, mock_falcon, mock_documents, mock_secrets, + mock_config): mock_falcon_api = mock_falcon.API.return_value result = api.start_api() @@ -37,4 +39,5 @@ class TestApi(testtools.TestCase): mock.call( '/api/v1.0/documents', mock_documents.DocumentsResource()), mock.call('/api/v1.0/secrets', mock_secrets.SecretsResource()) - ]) + ]) + mock_config.parse_args.assert_called_once_with() diff --git a/etc/deckhand/config-generator.conf b/etc/deckhand/config-generator.conf index eadbdcea..ad0f47ee 100644 --- a/etc/deckhand/config-generator.conf +++ b/etc/deckhand/config-generator.conf @@ -2,3 +2,6 @@ output_file = etc/deckhand/deckhand.conf.sample wrap_width = 80 namespace = deckhand.conf +namespace = oslo.db +namespace = oslo.db.concurrency +namespace = oslo.log diff --git a/requirements.txt b/requirements.txt index b23e0288..9f2c0bab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ falcon==1.1.0 -SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8,>=1.0.10 # MIT jsonschema!=2.5.0,<3.0.0,>=2.0.0 # MIT pbr!=2.1.0,>=2.0.0 # Apache-2.0 six>=1.9.0 # MIT +oslo.concurrency>=3.8.0 # Apache-2.0 stevedore>=1.20.0 # Apache-2.0 jsonschema!=2.5.0,<3.0.0,>=2.0.0 # MIT keystoneauth1>=2.21.0 # Apache-2.0 @@ -12,6 +12,7 @@ oslo.context>=2.14.0 # Apache-2.0 oslo.utils>=3.20.0 # Apache-2.0 oslo.db>=4.21.1 # Apache-2.0 oslo.log>=3.22.0 # Apache-2.0 +oslo.messaging!=5.25.0,>=5.24.2 # Apache-2.0 oslo.serialization>=1.10.0 # Apache-2.0 oslo.utils>=3.20.0 # Apache-2.0 oslo.versionedobjects>=1.23.0