diff --git a/keystone/cli.py b/keystone/cli.py index d86349cd1e..66b826b0b5 100644 --- a/keystone/cli.py +++ b/keystone/cli.py @@ -16,7 +16,7 @@ from __future__ import absolute_import import os -from oslo.config import cfg +from oslo_config import cfg import pbr.version from keystone import assignment diff --git a/keystone/common/config.py b/keystone/common/config.py index c9a5091995..0dbac1c644 100644 --- a/keystone/common/config.py +++ b/keystone/common/config.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.config import cfg +from oslo_config import cfg import oslo_messaging @@ -1010,9 +1010,9 @@ def configure(conf=None): def list_opts(): - """Return a list of oslo.config options available in Keystone. + """Return a list of oslo_config options available in Keystone. - The returned list includes all oslo.config options which are registered as + The returned list includes all oslo_config options which are registered as the "FILE_OPTIONS" in keystone.common.config. This list will not include the options from the oslo-incubator library or any options registered dynamically at run time. @@ -1022,7 +1022,7 @@ def list_opts(): second element will be registered. A group name of None corresponds to the [DEFAULT] group in config files. - This function is also discoverable via the 'oslo.config.opts' entry point + This function is also discoverable via the 'oslo_config.opts' entry point under the 'keystone.config.opts' namespace. The purpose of this is to allow tools like the Oslo sample config file diff --git a/keystone/common/sql/core.py b/keystone/common/sql/core.py index 1b9855456a..d94b302276 100644 --- a/keystone/common/sql/core.py +++ b/keystone/common/sql/core.py @@ -21,7 +21,7 @@ CONF() because it sets up configuration options. import contextlib import functools -from oslo.config import cfg +from oslo_config import cfg from oslo_db import exception as db_exception from oslo_db import options as db_options from oslo_db.sqlalchemy import models diff --git a/keystone/contrib/simple_cert/controllers.py b/keystone/contrib/simple_cert/controllers.py index 467cab4818..d34c03a6bb 100644 --- a/keystone/contrib/simple_cert/controllers.py +++ b/keystone/contrib/simple_cert/controllers.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.config import cfg +from oslo_config import cfg import webob from keystone.common import controller diff --git a/keystone/hacking/checks.py b/keystone/hacking/checks.py index e0f1d3e333..2df86d9a84 100644 --- a/keystone/hacking/checks.py +++ b/keystone/hacking/checks.py @@ -400,9 +400,9 @@ class CheckForLoggingIssues(BaseASTChecker): def check_oslo_namespace_imports(logical_line, blank_before, filename): oslo_namespace_imports = re.compile( r"(((from)|(import))\s+oslo\.(" - "(db)|(messaging)|(serialization)|(utils)))|" + "(config)|(db)|(messaging)|(serialization)|(utils)))|" "(from\s+oslo\s+import\s+(" - "(db)|(messaging)|(serialization)|(utils)))") + "(config)|(db)|(messaging)|(serialization)|(utils)))") if re.match(oslo_namespace_imports, logical_line): msg = ("K333: '%s' must be used instead of '%s'.") % ( diff --git a/keystone/identity/core.py b/keystone/identity/core.py index 78e375dfbd..31dc78135c 100644 --- a/keystone/identity/core.py +++ b/keystone/identity/core.py @@ -19,7 +19,7 @@ import functools import os import uuid -from oslo.config import cfg +from oslo_config import cfg from oslo_utils import importutils import six diff --git a/keystone/notifications.py b/keystone/notifications.py index b812d9ed72..7ffdd01eae 100644 --- a/keystone/notifications.py +++ b/keystone/notifications.py @@ -19,7 +19,7 @@ import inspect import logging import socket -from oslo.config import cfg +from oslo_config import cfg import oslo_messaging import pycadf from pycadf import cadftaxonomy as taxonomy diff --git a/keystone/tests/core.py b/keystone/tests/core.py index 4a200078ba..e0d508a812 100644 --- a/keystone/tests/core.py +++ b/keystone/tests/core.py @@ -26,7 +26,7 @@ import time import warnings import fixtures -from oslo.config import fixture as config_fixture +from oslo_config import fixture as config_fixture import oslotest.base as oslotest from oslotest import mockpatch import six diff --git a/keystone/tests/ksfixtures/hacking.py b/keystone/tests/ksfixtures/hacking.py index 8f6f2ea411..c4956b714a 100644 --- a/keystone/tests/ksfixtures/hacking.py +++ b/keystone/tests/ksfixtures/hacking.py @@ -212,6 +212,14 @@ class HackingCode(fixtures.Fixture): from oslo import db from oslo.db import api from oslo_db import api + + import oslo.config + import oslo_config + import oslo.config.cfg + import oslo_config.cfg + from oslo import config + from oslo.config import cfg + from oslo_config import cfg """, 'expected_errors': [ (1, 0, 'K333'), @@ -230,6 +238,10 @@ class HackingCode(fixtures.Fixture): (27, 0, 'K333'), (29, 0, 'K333'), (30, 0, 'K333'), + (33, 0, 'K333'), + (35, 0, 'K333'), + (37, 0, 'K333'), + (38, 0, 'K333'), ], } diff --git a/keystone/tests/test_v3_assignment.py b/keystone/tests/test_v3_assignment.py index d4cf4d5003..72bb6fe11a 100644 --- a/keystone/tests/test_v3_assignment.py +++ b/keystone/tests/test_v3_assignment.py @@ -12,7 +12,7 @@ import uuid -from oslo.config import cfg +from oslo_config import cfg from keystone.common import controller from keystone import exception diff --git a/keystone/tests/test_v3_identity.py b/keystone/tests/test_v3_identity.py index fc0707701b..1dccf2ad0c 100644 --- a/keystone/tests/test_v3_identity.py +++ b/keystone/tests/test_v3_identity.py @@ -14,7 +14,7 @@ import uuid -from oslo.config import cfg +from oslo_config import cfg from testtools import matchers from keystone.common import controller diff --git a/keystone/tests/unit/common/test_notifications.py b/keystone/tests/unit/common/test_notifications.py index 3c3b814b8e..d01b0d303b 100644 --- a/keystone/tests/unit/common/test_notifications.py +++ b/keystone/tests/unit/common/test_notifications.py @@ -16,7 +16,7 @@ import logging import uuid import mock -from oslo.config import cfg +from oslo_config import cfg from oslotest import mockpatch from pycadf import cadftaxonomy from pycadf import cadftype