Move oslo libraries out of the oslo namespace

The oslo libraries have moved out of the oslo namespace.

Change-Id: I4298cd9f760b310a01cd3852793bc6fbaa11907e
Related-to: blueprint drop-namespace-packages
This commit is contained in:
Louis Taylor 2015-01-20 13:42:10 +00:00
parent 2649062d80
commit 8a3fc3a8dd
75 changed files with 105 additions and 105 deletions

View File

@ -14,7 +14,7 @@
# limitations under the License.
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from zaqar.tests.unit.transport.wsgi import base

View File

@ -14,7 +14,7 @@
# limitations under the License.
import msgpack
from oslo.config import cfg
from oslo_config import cfg
from zaqar.common import decorators
from zaqar.openstack.common.cache import cache as oslo_cache

View File

@ -19,7 +19,7 @@ import time
import uuid
import mock
from oslo.utils import timeutils
from oslo_utils import timeutils
from pymongo import cursor
import pymongo.errors
import six

View File

@ -17,7 +17,7 @@ import time
import uuid
import mock
from oslo.utils import timeutils
from oslo_utils import timeutils
import redis
from zaqar.common import errors
@ -390,7 +390,7 @@ class RedisClaimsTest(base.ClaimControllerTest):
client_uuid=str(uuid.uuid4()))
now = timeutils.utcnow_ts()
timeutils_utcnow = 'oslo.utils.timeutils.utcnow_ts'
timeutils_utcnow = 'oslo_utils.timeutils.utcnow_ts'
# Test a single claim
with mock.patch(timeutils_utcnow) as mock_utcnow:

View File

@ -14,7 +14,7 @@
import uuid
from oslo.config import cfg
from oslo_config import cfg
from zaqar.openstack.common.cache import cache as oslo_cache
from zaqar.storage import errors

View File

@ -15,7 +15,7 @@
import random
import uuid
from oslo.config import cfg
from oslo_config import cfg
import six
from zaqar.openstack.common.cache import cache as oslo_cache

View File

@ -15,7 +15,7 @@
"""Test Auth."""
from oslo.config import cfg
from oslo_config import cfg
from zaqar import tests as testing
from zaqar.transport import auth

View File

@ -15,7 +15,7 @@ import uuid
import ddt
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from zaqar.tests.unit.transport.wsgi import base
from zaqar.tests.unit.transport.wsgi import v1_1

View File

@ -15,7 +15,7 @@ import uuid
import ddt
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from zaqar.tests.unit.transport.wsgi import base
from zaqar.tests.unit.transport.wsgi import v2_0

View File

@ -12,7 +12,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
conf = cfg.CONF
_CLI_OPTIONS = (

View File

@ -13,7 +13,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 stevedore import driver
from zaqar.common import decorators

View File

@ -11,7 +11,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 zaqar import bootstrap
from zaqar.common import cli

View File

@ -14,7 +14,7 @@
# limitations under the License.
import os
from oslo.config import cfg
from oslo_config import cfg
from zaqar import bootstrap
from zaqar.common import cli

View File

@ -47,10 +47,10 @@ def memoized_getattr(meth):
def caches(keygen, ttl, cond=None):
"""Flags a getter method as being cached using oslo.cache.
"""Flags a getter method as being cached using oslo_cache.
It is assumed that the containing class defines an attribute
named `_cache` that is an instance of an oslo.cache backend.
named `_cache` that is an instance of an oslo_cache backend.
The getter should raise an exception if the value can't be
loaded, which will skip the caching step. Otherwise, the

View File

@ -15,7 +15,7 @@
"""utils: general-purpose utilities."""
from oslo.config import cfg
from oslo_config import cfg
import six
@ -52,12 +52,12 @@ _pytype_to_cfgtype = {
def dict_to_conf(options):
"""Converts a python dictionary to a list of oslo.config.cfg.Opt
"""Converts a python dictionary to a list of oslo_config.cfg.Opt
:param options: The python dictionary to convert
:type options: dict
:returns: a list of options compatible with oslo.config
:rtype: [oslo.config.cfg.Opt]
:returns: a list of options compatible with oslo_config
:rtype: [oslo_config.cfg.Opt]
"""
opts = []

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.i18n import * # noqa
from oslo_i18n import * # noqa
_translators = TranslatorFactory(domain='zaqar')

View File

@ -25,13 +25,13 @@ from stevedore import driver
def _get_olso_configs():
"""Returns the oslo.config options to register."""
"""Returns the oslo_config options to register."""
# NOTE(flaper87): Oslo config should be
# optional. Instead of doing try / except
# at the top of this file, lets import cfg
# here and assume that the caller of this
# function already took care of this dependency.
from oslo.config import cfg
from oslo_config import cfg
return [
cfg.StrOpt('cache_url', default='memory://',

View File

@ -27,7 +27,7 @@ import socket
import sys
import textwrap
from oslo.config import cfg
from oslo_config import cfg
import six
import stevedore.named
@ -108,7 +108,7 @@ def generate(argv):
# and the list of Opt instances for that group.
if parsed_args.libraries:
loader = stevedore.named.NamedExtensionManager(
'oslo.config.opts',
'oslo_config.opts',
names=list(set(parsed_args.libraries)),
invoke_on_load=False,
on_load_failure_callback=raise_extension_exception
@ -153,7 +153,7 @@ def _is_in_group(opt, group):
"""Check if opt is in group."""
for value in group._opts.values():
# NOTE(llu): Temporary workaround for bug #1262148, wait until
# newly released oslo.config support '==' operator.
# newly released oslo_config support '==' operator.
if not(value['opt'] != opt):
return True
return False

View File

@ -33,7 +33,7 @@ import six
_AVAILABLE_LANGUAGES = {}
# FIXME(dhellmann): Remove this when moving to oslo.i18n.
# FIXME(dhellmann): Remove this when moving to oslo_i18n.
USE_LAZY = False
@ -81,7 +81,7 @@ class TranslatorFactory(object):
m = t.gettext if six.PY3 else t.ugettext
def f(msg):
"""oslo.i18n.gettextutils translation function."""
"""oslo_i18n.gettextutils translation function."""
if USE_LAZY:
return Message(msg, domain=domain)
return m(msg)
@ -117,7 +117,7 @@ class TranslatorFactory(object):
# NOTE(dhellmann): When this module moves out of the incubator into
# oslo.i18n, these global variables can be moved to an integration
# oslo_i18n, these global variables can be moved to an integration
# module within each application.
# Create the global translation functions.

View File

@ -26,7 +26,7 @@ import threading
import time
import weakref
from oslo.config import cfg
from oslo_config import cfg
from zaqar.openstack.common import fileutils
from zaqar.openstack.common.gettextutils import _, _LE, _LI

View File

@ -36,8 +36,8 @@ import os
import sys
import traceback
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo_config import cfg
from oslo_serialization import jsonutils
import six
from six import moves
@ -124,7 +124,7 @@ generic_log_opts = [
DEFAULT_LOG_LEVELS = ['amqp=WARN', 'amqplib=WARN', 'boto=WARN',
'qpid=WARN', 'sqlalchemy=WARN', 'suds=INFO',
'oslo.messaging=INFO', 'iso8601=WARN',
'oslo_messaging=INFO', 'iso8601=WARN',
'requests.packages.urllib3.connectionpool=WARN',
'urllib3.connectionpool=WARN', 'websocket=WARN']
@ -517,7 +517,7 @@ def _setup_logging_from_conf(project, version):
logging.ERROR)
except ImportError:
handler = importutils.import_object(
"oslo.messaging.notify.log_handler.PublishErrorsHandler",
"oslo_messaging.notify.log_handler.PublishErrorsHandler",
logging.ERROR)
log_root.addHandler(handler)

View File

@ -22,7 +22,7 @@ import time
import uuid
import enum
from oslo.config import cfg
from oslo_config import cfg
import six
import zaqar.openstack.common.log as logging
@ -53,7 +53,7 @@ class DriverBase(object):
"""Base class for both data and control plane drivers
:param conf: Configuration containing options for this driver.
:type conf: `oslo.config.ConfigOpts`
:type conf: `oslo_config.ConfigOpts`
:param cache: Cache instance to use for reducing latency
for certain lookups.
:type cache: `zaqar.openstack.common.cache.backends.BaseCache`
@ -85,7 +85,7 @@ class DataDriverBase(DriverBase):
loaded from the config file or the pool catalog.
:param conf: Configuration containing options for this driver.
:type conf: `oslo.config.ConfigOpts`
:type conf: `oslo_config.ConfigOpts`
:param cache: Cache instance to use for reducing latency
for certain lookups.
:type cache: `zaqar.openstack.common.cache.backends.BaseCache`
@ -242,7 +242,7 @@ class ControlDriverBase(DriverBase):
pool controller.
:param conf: Configuration containing options for this driver.
:type conf: `oslo.config.ConfigOpts`
:type conf: `oslo_config.ConfigOpts`
:param cache: Cache instance to use for reducing latency
for certain lookups.
:type cache: `zaqar.openstack.common.cache.backends.BaseCache`

View File

@ -24,7 +24,7 @@ Field Mappings:
import datetime
from bson import objectid
from oslo.utils import timeutils
from oslo_utils import timeutils
import zaqar.openstack.common.log as logging
from zaqar import storage

View File

@ -25,7 +25,7 @@ import datetime
import time
from bson import objectid
from oslo.utils import timeutils
from oslo_utils import timeutils
import pymongo.errors
import pymongo.read_preferences

View File

@ -14,7 +14,7 @@
"""MongoDB storage driver configuration options."""
from oslo.config import cfg
from oslo_config import cfg
_deprecated_group = 'drivers:storage:mongodb'
@ -140,7 +140,7 @@ MESSAGE_MONGODB_GROUP = 'drivers:message_store:mongodb'
def _config_options():
"""Used by config generators.
Returns a list of (group-name, oslo.config-options) tuples
Returns a list of (group-name, oslo_config-options) tuples
for management and message storage.
"""
return [(MANAGEMENT_MONGODB_GROUP, MANAGEMENT_MONGODB_OPTIONS),

View File

@ -21,7 +21,7 @@ Field Mappings:
letter of their long name.
"""
from oslo.utils import timeutils
from oslo_utils import timeutils
import pymongo.errors
from zaqar.common import decorators

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations under
# the License.
from oslo.utils import timeutils
from oslo_utils import timeutils
import pymongo.errors
from zaqar.common import utils as common_utils

View File

@ -24,7 +24,7 @@ import time
from bson import errors as berrors
from bson import objectid
from bson import tz_util
from oslo.utils import timeutils
from oslo_utils import timeutils
from pymongo import errors
from zaqar.i18n import _

View File

@ -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
from stevedore import driver
from zaqar import common

View File

@ -16,7 +16,7 @@
import heapq
import itertools
from oslo.config import cfg
from oslo_config import cfg
from zaqar.common import decorators
from zaqar.common.storage import select

View File

@ -15,7 +15,7 @@
import functools
import msgpack
from oslo.utils import timeutils
from oslo_utils import timeutils
from zaqar.common import decorators
from zaqar.openstack.common import log as logging

View File

@ -15,8 +15,8 @@
import functools
import uuid
from oslo.utils import encodeutils
from oslo.utils import timeutils
from oslo_utils import encodeutils
from oslo_utils import timeutils
from zaqar.common import decorators
from zaqar import storage

View File

@ -16,8 +16,8 @@ import functools
import uuid
import msgpack
from oslo.utils import encodeutils
from oslo.utils import timeutils
from oslo_utils import encodeutils
from oslo_utils import timeutils
MSGENV_FIELD_KEYS = (b'id', b't', b'cr', b'e', b'u', b'c', b'c.e')

View File

@ -14,7 +14,7 @@
"""Redis storage driver configuration options."""
from oslo.config import cfg
from oslo_config import cfg
_deprecated_group = 'drivers:storage:redis'
# options common to management and message storage

View File

@ -15,7 +15,7 @@
import functools
import msgpack
from oslo.utils import timeutils
from oslo_utils import timeutils
import redis
from zaqar.common import decorators

View File

@ -17,7 +17,7 @@ import sys
import time
import uuid
from oslo.utils import encodeutils
from oslo_utils import encodeutils
import redis
import six

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from oslo.utils import timeutils
from oslo_utils import timeutils
import sqlalchemy as sa
from sqlalchemy.sql import func as sfunc

View File

@ -15,7 +15,7 @@
import calendar
from oslo.utils import timeutils
from oslo_utils import timeutils
import sqlalchemy as sa
from sqlalchemy.sql import func as sfunc

View File

@ -14,7 +14,7 @@
"""SQLAlchemy storage driver implementation."""
from oslo.config import cfg
from oslo_config import cfg
_deprecated_group = 'drivers:storage:sqlalchemy'
_COMMON_SQLALCHEMY_OPTIONS = (

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations under
# the License.
from oslo.utils import timeutils
from oslo_utils import timeutils
import sqlalchemy as sa
metadata = sa.MetaData()

View File

@ -15,8 +15,8 @@
import functools
from oslo.serialization import jsonutils
from oslo.utils import encodeutils
from oslo_serialization import jsonutils
from oslo_utils import encodeutils
import sqlalchemy as sa
from sqlalchemy import exc
from sqlalchemy.sql import func as sfunc

View File

@ -14,7 +14,7 @@
import copy
from oslo.config import cfg
from oslo_config import cfg
import six
from stevedore import driver
@ -33,10 +33,10 @@ def dynamic_conf(uri, options, conf=None):
:param options: additional pool metadata
:type options: dict
:param conf: Optional conf object to copy
:type conf: `oslo.config.cfg.ConfigOpts`
:type conf: `oslo_config.cfg.ConfigOpts`
:returns: Configuration object suitable for constructing storage
drivers
:rtype: oslo.config.cfg.ConfigOpts
:rtype: oslo_config.cfg.ConfigOpts
"""
storage_type = six.moves.urllib_parse.urlparse(uri).scheme

View File

@ -16,7 +16,7 @@
import os
import fixtures
from oslo.config import cfg
from oslo_config import cfg
import six
import testtools

View File

@ -19,7 +19,7 @@ import multiprocessing
import os
import jsonschema
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
from zaqar.api.v1 import response as response_v1

View File

@ -15,7 +15,7 @@
import os
from oslo.config import cfg
from oslo_config import cfg
_DEFAULT = (

View File

@ -17,7 +17,7 @@ import functools
import json
from falcon import testing as ftest
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import requests
import six

View File

@ -21,7 +21,7 @@ import uuid
import ddt
import mock
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
from testtools import matchers
@ -897,7 +897,7 @@ class ClaimControllerTest(ControllerBaseTest):
project=self.project)
now = timeutils.utcnow_ts()
timeutils_utcnow = 'oslo.utils.timeutils.utcnow_ts'
timeutils_utcnow = 'oslo_utils.timeutils.utcnow_ts'
with mock.patch(timeutils_utcnow) as mock_utcnow:
mock_utcnow.return_value = now + 2

View File

@ -15,7 +15,7 @@
import uuid
from falcon import testing as ftest
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from zaqar import bootstrap
from zaqar import tests as testing

View File

@ -19,8 +19,8 @@ import uuid
import ddt
import falcon
import mock
from oslo.serialization import jsonutils
from oslo.utils import timeutils
from oslo_serialization import jsonutils
from oslo_utils import timeutils
from testtools import matchers
from zaqar import tests as testing

View File

@ -17,7 +17,7 @@ import contextlib
import uuid
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from zaqar import storage
from zaqar.tests.unit.transport.wsgi import base

View File

@ -13,7 +13,7 @@
# the License.
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import six.moves.urllib.parse as urlparse
from zaqar.tests.unit.transport.wsgi import base

View File

@ -19,8 +19,8 @@ import uuid
import ddt
import falcon
import mock
from oslo.serialization import jsonutils
from oslo.utils import timeutils
from oslo_serialization import jsonutils
from oslo_utils import timeutils
import six
from testtools import matchers

View File

@ -17,7 +17,7 @@ import uuid
import ddt
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from zaqar import tests as testing
from zaqar.tests.unit.transport.wsgi import base

View File

@ -14,7 +14,7 @@
import ddt
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import six
from zaqar import tests as testing

View File

@ -20,8 +20,8 @@ import uuid
import ddt
import falcon
import mock
from oslo.serialization import jsonutils
from oslo.utils import timeutils
from oslo_serialization import jsonutils
from oslo_utils import timeutils
from testtools import matchers
from zaqar import tests as testing

View File

@ -17,7 +17,7 @@ import contextlib
import uuid
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from zaqar import storage
from zaqar.tests.unit.transport.wsgi import base

View File

@ -17,7 +17,7 @@ import uuid
import ddt
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from zaqar import tests as testing
from zaqar.tests.unit.transport.wsgi import base

View File

@ -17,7 +17,7 @@
import ddt
import falcon
import mock
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from zaqar.storage import errors
import zaqar.storage.mongodb as mongo

View File

@ -15,7 +15,7 @@
import uuid
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import six.moves.urllib.parse as urlparse
from zaqar.tests.unit.transport.wsgi import base

View File

@ -19,8 +19,8 @@ import uuid
import ddt
import falcon
import mock
from oslo.serialization import jsonutils
from oslo.utils import timeutils
from oslo_serialization import jsonutils
from oslo_utils import timeutils
import six
from testtools import matchers

View File

@ -17,7 +17,7 @@ import uuid
import ddt
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from zaqar import tests as testing
from zaqar.tests.unit.transport.wsgi import base

View File

@ -16,7 +16,7 @@ import uuid
import ddt
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import six
from zaqar import tests as testing

View File

@ -20,8 +20,8 @@ import uuid
import ddt
import falcon
import mock
from oslo.serialization import jsonutils
from oslo.utils import timeutils
from oslo_serialization import jsonutils
from oslo_utils import timeutils
from testtools import matchers
from zaqar import tests as testing

View File

@ -17,7 +17,7 @@ import contextlib
import uuid
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from zaqar import storage
from zaqar.tests.unit.transport.wsgi import base

View File

@ -17,7 +17,7 @@ import uuid
import ddt
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from zaqar import tests as testing
from zaqar.tests.unit.transport.wsgi import base

View File

@ -17,7 +17,7 @@
import ddt
import falcon
import mock
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from zaqar.storage import errors
import zaqar.storage.mongodb as mongo

View File

@ -15,7 +15,7 @@
import uuid
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import six.moves.urllib.parse as urlparse
from zaqar.tests.unit.transport.wsgi import base

View File

@ -19,8 +19,8 @@ import uuid
import ddt
import falcon
import mock
from oslo.serialization import jsonutils
from oslo.utils import timeutils
from oslo_serialization import jsonutils
from oslo_utils import timeutils
import six
from testtools import matchers

View File

@ -17,7 +17,7 @@ import uuid
import ddt
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from zaqar import tests as testing
from zaqar.tests.unit.transport.wsgi import base

View File

@ -16,7 +16,7 @@ import uuid
import ddt
import falcon
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import six
from zaqar import tests as testing

View File

@ -15,7 +15,7 @@
import abc
from oslo.config import cfg
from oslo_config import cfg
import six
@ -69,7 +69,7 @@ class DriverBase(object):
"""Base class for Transport Drivers to document the expected interface.
:param conf: configuration instance
:type conf: oslo.config.cfg.CONF
:type conf: oslo_config.cfg.CONF
:param storage: The storage driver
:type storage: zaqar.storage.base.DataDriverBase
:param cache: caching object

View File

@ -15,7 +15,7 @@
import json
from oslo.utils import encodeutils
from oslo_utils import encodeutils
class MalformedJSON(ValueError):

View File

@ -15,7 +15,7 @@
import re
from oslo.config import cfg
from oslo_config import cfg
from zaqar.i18n import _

View File

@ -26,7 +26,7 @@ no common way to specify / pass configuration files
to the WSGI app when it is called from other apps.
"""
from oslo.config import cfg
from oslo_config import cfg
from zaqar import bootstrap

View File

@ -17,7 +17,7 @@ import functools
from wsgiref import simple_server
import falcon
from oslo.config import cfg
from oslo_config import cfg
from zaqar.common import decorators
from zaqar.common.transport.wsgi import helpers