Drop old namespace for some oslo libraries
The oslo team has decided to drop the "oslo." namespacing as it was causing a lot of trouble. So, as described [1], the namespace was dropped in favor of the "oslo_" imports that will be used. Note that oslo.messaging still doesn't have a release supporting their switch to oslo_messaging, but it will come in their next release. So I will do the switch when they have it ready. [1] http://blog.nemebean.com/content/whys-and-hows-oslo-namespace-change Change-Id: I4743598668d9dde540275911467b94386bad0983
This commit is contained in:
parent
c3a867c433
commit
cb17fa6ad6
@ -18,7 +18,7 @@ API handler for Cloudkeep's Barbican
|
||||
"""
|
||||
import pkgutil
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import pecan
|
||||
|
||||
from barbican.common import exception
|
||||
|
@ -25,7 +25,7 @@ try:
|
||||
except ImportError:
|
||||
newrelic_loaded = False
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from barbican.api.controllers import containers
|
||||
from barbican.api.controllers import orders
|
||||
|
@ -12,7 +12,7 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import webob.exc
|
||||
|
||||
from barbican.api import middleware as mw
|
||||
|
@ -18,7 +18,7 @@ A filter middleware that just outputs to logs, for instructive/sample
|
||||
purposes only.
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from barbican.api import middleware
|
||||
from barbican.common import utils
|
||||
|
@ -20,7 +20,7 @@ Configuration setup for Barbican.
|
||||
import logging
|
||||
import os
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
import barbican.version
|
||||
|
||||
|
@ -20,7 +20,7 @@ Common utilities for Barbican.
|
||||
import time
|
||||
import uuid
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from barbican import i18n as u
|
||||
import barbican.openstack.common.log as logging
|
||||
|
@ -16,7 +16,7 @@ API JSON validators.
|
||||
import abc
|
||||
|
||||
import jsonschema as schema
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import six
|
||||
|
||||
from barbican.common import exception
|
||||
|
@ -12,7 +12,7 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from oslo import i18n
|
||||
import oslo_i18n as i18n
|
||||
|
||||
_translators = i18n.TranslatorFactory(domain='barbican')
|
||||
|
||||
|
@ -25,7 +25,7 @@ import os
|
||||
|
||||
from alembic import command as alembic_command
|
||||
from alembic import config as alembic_config
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from barbican.common import utils
|
||||
|
||||
|
@ -24,7 +24,7 @@ import logging
|
||||
import time
|
||||
import uuid
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import sqlalchemy
|
||||
from sqlalchemy import or_
|
||||
import sqlalchemy.orm as sa_orm
|
||||
|
@ -11,8 +11,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from oslo.concurrency import lockutils
|
||||
from oslo.config import cfg
|
||||
from oslo_concurrency import lockutils
|
||||
from oslo_config import cfg
|
||||
from stevedore import named
|
||||
|
||||
from barbican.common import utils
|
||||
|
@ -17,7 +17,7 @@ import textwrap
|
||||
import cffi
|
||||
from cryptography.hazmat.primitives import padding
|
||||
from eventlet import semaphore
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from barbican.common import exception
|
||||
from barbican.common import utils
|
||||
|
@ -16,7 +16,7 @@ from Crypto.PublicKey import DSA
|
||||
from Crypto.PublicKey import RSA
|
||||
from Crypto.Util import asn1
|
||||
from cryptography import fernet
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import six
|
||||
|
||||
from barbican import i18n as u
|
||||
|
@ -18,7 +18,7 @@ import uuid
|
||||
|
||||
from Crypto.PublicKey import RSA
|
||||
from Crypto.Util import asn1
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import pki
|
||||
import pki.cert
|
||||
import pki.client
|
||||
|
@ -22,7 +22,7 @@ implementations. Hence do not place vendor-specific content in this module.
|
||||
|
||||
import abc
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import six
|
||||
from stevedore import named
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
import abc
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import six
|
||||
from stevedore import named
|
||||
|
||||
|
@ -36,7 +36,7 @@ from barbican.plugin.interface import secret_store as ss
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
import base64
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from barbican.common import utils
|
||||
from barbican.model import models
|
||||
|
@ -16,7 +16,7 @@
|
||||
"""
|
||||
Barbican certificate processing plugins and support.
|
||||
"""
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
from requests import exceptions as request_exceptions
|
||||
from symantecssl.core import Symantec
|
||||
from symantecssl import exceptions as symantec_exceptions
|
||||
|
@ -16,10 +16,10 @@
|
||||
"""
|
||||
Queue objects for Cloudkeep's Barbican
|
||||
"""
|
||||
from oslo.config import cfg
|
||||
from oslo import messaging
|
||||
from oslo.messaging.notify import dispatcher as notfiy_dispatcher
|
||||
from oslo.messaging import server as msg_server
|
||||
from oslo_config import cfg
|
||||
import oslo_messaging as messaging
|
||||
from oslo_messaging.notify import dispatcher as notfiy_dispatcher
|
||||
from oslo_messaging import server as msg_server
|
||||
|
||||
from barbican.common import exception
|
||||
from barbican.common import utils
|
||||
|
@ -26,7 +26,7 @@ LOG = utils.getLogger(__name__)
|
||||
class TaskClient(object):
|
||||
"""API-side client interface to asynchronous queuing services.
|
||||
|
||||
The class delegates calls to the oslo.messaging RPC framework.
|
||||
The class delegates calls to the oslo_messaging RPC framework.
|
||||
"""
|
||||
def __init__(self):
|
||||
super(TaskClient, self).__init__()
|
||||
|
@ -18,7 +18,7 @@ Server-side (i.e. worker side) classes and logic.
|
||||
"""
|
||||
import functools
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from barbican.common import utils
|
||||
from barbican.model import repositories
|
||||
@ -108,7 +108,7 @@ class TaskServer(Tasks, service.Service):
|
||||
super(TaskServer, self).__init__()
|
||||
|
||||
# This property must be defined for the 'endpoints' specified below,
|
||||
# as the oslo.messaging RPC server will ask for it.
|
||||
# as the oslo_messaging RPC server will ask for it.
|
||||
self.target = queue.get_target()
|
||||
|
||||
# Create an oslo RPC server, that calls back on to this class
|
||||
|
@ -22,7 +22,7 @@ For typical-flow business logic tests of these classes, see the
|
||||
import os
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
from webob import exc
|
||||
|
||||
from barbican.api.controllers import consumers
|
||||
|
@ -11,7 +11,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import sqlalchemy
|
||||
|
||||
from barbican.common import exception
|
||||
|
@ -10,7 +10,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from barbican.common import exception
|
||||
from barbican.model import models
|
||||
|
@ -28,7 +28,7 @@ from kmip.core.messages import contents
|
||||
from kmip.core import objects
|
||||
from kmip.services import kmip_client as proxy
|
||||
from kmip.services import results
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from barbican.plugin import kmip_secret_store as kss
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
import uuid
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo import messaging
|
||||
from oslo_config import cfg
|
||||
import six
|
||||
|
||||
from barbican.openstack.common import service
|
||||
@ -273,7 +273,7 @@ class WhenUsingMessageServer(UtilMixin, utils.BaseTestCase):
|
||||
super(WhenUsingMessageServer, self).setUp()
|
||||
queue.init(self.conf)
|
||||
|
||||
patcher = mock.patch('oslo.messaging.server.MessageHandlingServer')
|
||||
patcher = mock.patch('oslo_messaging.server.MessageHandlingServer')
|
||||
mock_server_class = patcher.start()
|
||||
self.addCleanup(patcher.stop)
|
||||
|
||||
|
@ -45,7 +45,7 @@ from barbican.openstack.common import log
|
||||
from barbican.openstack.common import service
|
||||
from barbican import queue
|
||||
from barbican.queue import keystone_listener
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
|
||||
def fail(returncode, e):
|
||||
|
@ -41,7 +41,7 @@ from barbican.openstack.common import log
|
||||
from barbican.openstack.common import service
|
||||
from barbican import queue
|
||||
from barbican.queue import server
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
|
||||
def fail(returncode, e):
|
||||
|
Loading…
Reference in New Issue
Block a user