Swith to use oslo_* instead of oslo.*

Change-Id: I264c1b646660e4f11d1d39f1acb076c3c0479d8c
This commit is contained in:
tktk8924
2015-07-21 03:19:32 +00:00
parent 2b459e0c87
commit 891f99b4f7
44 changed files with 79 additions and 79 deletions

View File

@@ -16,7 +16,7 @@ Common Auth Middleware.
""" """
from oslo.config import cfg from oslo_config import cfg
from rack.api import wsgi from rack.api import wsgi
from rack import context from rack import context
from rack.openstack.common.gettextutils import _ from rack.openstack.common.gettextutils import _

View File

@@ -17,7 +17,7 @@ import itertools
import os import os
import re import re
from oslo.config import cfg from oslo_config import cfg
import six.moves.urllib.parse as urlparse import six.moves.urllib.parse as urlparse
import webob import webob
from webob import exc from webob import exc

View File

@@ -15,7 +15,7 @@
WSGI middleware for RACK API controllers. WSGI middleware for RACK API controllers.
""" """
from oslo.config import cfg from oslo_config import cfg
import routes import routes
from rack.api.v1 import groups from rack.api.v1 import groups

View File

@@ -13,7 +13,7 @@
# limitations under the License. # limitations under the License.
import json import json
from oslo.config import cfg from oslo_config import cfg
import base64 import base64
import uuid import uuid

View File

@@ -13,7 +13,7 @@
# limitations under the License. # limitations under the License.
from lxml import etree from lxml import etree
from oslo.config import cfg from oslo_config import cfg
from rack.api.views import versions as views_versions from rack.api.views import versions as views_versions
from rack.api import wsgi from rack.api import wsgi

View File

@@ -16,7 +16,7 @@
import sys import sys
from oslo.config import cfg from oslo_config import cfg
from rack import config from rack import config
from rack.openstack.common import log as logging from rack.openstack.common import log as logging

View File

@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from oslo.config import cfg from oslo_config import cfg
from rack import debugger from rack import debugger
from rack.openstack.common.db import options from rack.openstack.common.db import options

View File

@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from oslo.config import cfg from oslo_config import cfg
from rack.openstack.common.db import api as db_api from rack.openstack.common.db import api as db_api

View File

@@ -14,7 +14,7 @@
"""Base class for classes that need modular database access.""" """Base class for classes that need modular database access."""
from oslo.config import cfg from oslo_config import cfg
from rack.openstack.common import importutils from rack.openstack.common import importutils

View File

@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from oslo.config import cfg from oslo_config import cfg
from rack.db.sqlalchemy import models from rack.db.sqlalchemy import models
from rack import exception from rack import exception

View File

@@ -22,7 +22,7 @@ def enabled():
def register_cli_opts(): def register_cli_opts():
from oslo.config import cfg from oslo_config import cfg
cli_opts = [ cli_opts = [
cfg.StrOpt('host', cfg.StrOpt('host',
@@ -45,7 +45,7 @@ def register_cli_opts():
def init(): def init():
from oslo.config import cfg from oslo_config import cfg
CONF = cfg.CONF CONF = cfg.CONF
# NOTE(markmc): gracefully handle the CLI options not being registered # NOTE(markmc): gracefully handle the CLI options not being registered

View File

@@ -14,7 +14,7 @@
import functools import functools
import sys import sys
from oslo.config import cfg from oslo_config import cfg
import webob.exc import webob.exc
from rack.openstack.common import excutils from rack.openstack.common import excutils

View File

@@ -14,7 +14,7 @@
import socket import socket
from oslo.config import cfg from oslo_config import cfg
from rack import utils from rack import utils

View File

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

View File

@@ -12,7 +12,7 @@
import copy import copy
from oslo.config import cfg from oslo_config import cfg
database_opts = [ database_opts = [
@@ -150,9 +150,9 @@ def set_defaults(sql_connection, sqlite_db, max_pool_size=None,
def list_opts(): def list_opts():
"""Returns a list of oslo.config options available in the library. """Returns a list of oslo_config options available in the library.
The returned list includes all oslo.config options which may be registered The returned list includes all oslo_config options which may be registered
at runtime by the library. at runtime by the library.
Each element of the list is a tuple. The first element is the name of the Each element of the list is a tuple. The first element is the name of the

View File

@@ -29,7 +29,7 @@ import traceback
import eventlet import eventlet
import eventlet.backdoor import eventlet.backdoor
import greenlet import greenlet
from oslo.config import cfg from oslo_config import cfg
from rack.openstack.common.gettextutils import _ from rack.openstack.common.gettextutils import _
from rack.openstack.common import log as logging from rack.openstack.common import log as logging

View File

@@ -16,7 +16,7 @@
# under the License. # under the License.
import fixtures import fixtures
from oslo.config import cfg from oslo_config import cfg
import six import six

View File

@@ -26,7 +26,7 @@ import threading
import time import time
import weakref import weakref
from oslo.config import cfg from oslo_config import cfg
from rack.openstack.common import fileutils from rack.openstack.common import fileutils
from rack.openstack.common.gettextutils import _ # noqa from rack.openstack.common.gettextutils import _ # noqa

View File

@@ -37,7 +37,7 @@ import re
import sys import sys
import traceback import traceback
from oslo.config import cfg from oslo_config import cfg
import six import six
from six import moves from six import moves
@@ -163,7 +163,7 @@ log_opts = [
'qpid=WARN', 'qpid=WARN',
'sqlalchemy=WARN', 'sqlalchemy=WARN',
'suds=INFO', 'suds=INFO',
'oslo.messaging=INFO', 'oslo_messaging=INFO',
'iso8601=WARN', 'iso8601=WARN',
], ],
help='list of logger=LEVEL pairs'), help='list of logger=LEVEL pairs'),

View File

@@ -18,7 +18,7 @@
"""Super simple fake memcache client.""" """Super simple fake memcache client."""
from oslo.config import cfg from oslo_config import cfg
from rack.openstack.common import timeutils from rack.openstack.common import timeutils

View File

@@ -16,7 +16,7 @@
import datetime import datetime
import time import time
from oslo.config import cfg from oslo_config import cfg
import six import six
from rack.openstack.common.gettextutils import _ # noqa from rack.openstack.common.gettextutils import _ # noqa

View File

@@ -19,7 +19,7 @@ generators for generating the model in
:mod:`openstack.common.report.models.conf`. :mod:`openstack.common.report.models.conf`.
""" """
from oslo.config import cfg from oslo_config import cfg
import rack.openstack.common.report.models.conf as cm import rack.openstack.common.report.models.conf as cm
@@ -30,11 +30,11 @@ class ConfigReportGenerator(object):
This generator returns This generator returns
:class:`openstack.common.report.models.conf.ConfigModel` , :class:`openstack.common.report.models.conf.ConfigModel` ,
by default using the configuration options stored by default using the configuration options stored
in :attr:`oslo.config.cfg.CONF`, which is where in :attr:`oslo_config.cfg.CONF`, which is where
Openstack stores everything. Openstack stores everything.
:param cnf: the configuration option object :param cnf: the configuration option object
:type cnf: :class:`oslo.config.cfg.ConfigOpts` :type cnf: :class:`oslo_config.cfg.ConfigOpts`
""" """
def __init__(self, cnf=cfg.CONF): def __init__(self, cnf=cfg.CONF):

View File

@@ -15,7 +15,7 @@
"""Provides Openstack Configuration Model """Provides Openstack Configuration Model
This module defines a class representing the data This module defines a class representing the data
model for :mod:`oslo.config` configuration options model for :mod:`oslo_config` configuration options
""" """
import rack.openstack.common.report.models.with_default_views as mwdv import rack.openstack.common.report.models.with_default_views as mwdv
@@ -26,11 +26,11 @@ class ConfigModel(mwdv.ModelWithDefaultViews):
"""A Configuration Options Model """A Configuration Options Model
This model holds data about a set of configuration options This model holds data about a set of configuration options
from :mod:`oslo.config`. It supports both the default group from :mod:`oslo_config`. It supports both the default group
of options and named option groups. of options and named option groups.
:param conf_obj: a configuration object :param conf_obj: a configuration object
:type conf_obj: :class:`oslo.config.cfg.ConfigOpts` :type conf_obj: :class:`oslo_config.cfg.ConfigOpts`
""" """
def __init__(self, conf_obj): def __init__(self, conf_obj):

View File

@@ -35,7 +35,7 @@ except ImportError:
import eventlet import eventlet
from eventlet import event from eventlet import event
from oslo.config import cfg from oslo_config import cfg
from rack.openstack.common import eventlet_backdoor from rack.openstack.common import eventlet_backdoor
from rack.openstack.common.gettextutils import _ # noqa from rack.openstack.common.gettextutils import _ # noqa

View File

@@ -15,7 +15,7 @@
import os import os
import ssl import ssl
from oslo.config import cfg from oslo_config import cfg
from rack.openstack.common.gettextutils import _ from rack.openstack.common.gettextutils import _

View File

@@ -15,7 +15,7 @@
import os import os
import sys import sys
from oslo.config import cfg from oslo_config import cfg
path_opts = [ path_opts = [
cfg.StrOpt('pybasedir', cfg.StrOpt('pybasedir',

View File

@@ -16,7 +16,7 @@
import os.path import os.path
from oslo.config import cfg from oslo_config import cfg
from rack import exception from rack import exception
from rack.openstack.common.gettextutils import _ from rack.openstack.common.gettextutils import _

View File

@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from oslo.config import cfg from oslo_config import cfg
from neutronclient.v2_0 import client as neutron_client from neutronclient.v2_0 import client as neutron_client
from novaclient.v1_1 import client as nova_client from novaclient.v1_1 import client as nova_client

View File

@@ -14,7 +14,7 @@
"""Generic Node base class for all workers that run on hosts.""" """Generic Node base class for all workers that run on hosts."""
from oslo.config import cfg from oslo_config import cfg
from rack import exception from rack import exception
from rack.openstack.common.gettextutils import _ from rack.openstack.common.gettextutils import _

View File

@@ -30,8 +30,8 @@ import sys
import uuid import uuid
import fixtures import fixtures
from oslo.config import cfg from oslo_config import cfg
from oslo.messaging import conffixture as messaging_conffixture from oslo_messaging import conffixture as messaging_conffixture
import testtools import testtools
from rack.db import migration from rack.db import migration

View File

@@ -13,7 +13,7 @@
# limitations under the License. # limitations under the License.
from mox import IsA from mox import IsA
from oslo.config import cfg from oslo_config import cfg
from rack.api.v1.views.processes import ViewBuilder from rack.api.v1.views.processes import ViewBuilder
from rack import context from rack import context

View File

@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from oslo.config import cfg from oslo_config import cfg
from rack import config from rack import config

View File

@@ -16,7 +16,7 @@ import json
import os import os
import fixtures import fixtures
from oslo.config import cfg from oslo_config import cfg
from rack.openstack.common import policy as common_policy from rack.openstack.common import policy as common_policy
import rack.policy import rack.policy

View File

@@ -15,7 +15,7 @@
Unit Tests for rack.resourceoperator.openstack.keypairs Unit Tests for rack.resourceoperator.openstack.keypairs
""" """
from oslo.config import cfg from oslo_config import cfg
from rack.resourceoperator import openstack as os_client from rack.resourceoperator import openstack as os_client
from rack.resourceoperator.openstack import keypairs from rack.resourceoperator.openstack import keypairs

View File

@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from neutronclient.v2_0 import client as neutron_client from neutronclient.v2_0 import client as neutron_client
from oslo.config import cfg from oslo_config import cfg
from rack import exception from rack import exception
from rack.resourceoperator import openstack as os_client from rack.resourceoperator import openstack as os_client

View File

@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from mox import IsA from mox import IsA
from oslo.config import cfg from oslo_config import cfg
from rack.resourceoperator import openstack as os_client from rack.resourceoperator import openstack as os_client
from rack import test from rack import test

View File

@@ -14,7 +14,7 @@
""" """
Unit Tests for rack.resourceoperator.openstack.securitygroups Unit Tests for rack.resourceoperator.openstack.securitygroups
""" """
from oslo.config import cfg from oslo_config import cfg
from rack import exception from rack import exception
from rack.resourceoperator import openstack as os_client from rack.resourceoperator import openstack as os_client

View File

@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from oslo.config import cfg from oslo_config import cfg
import uuid import uuid
from neutronclient.common import exceptions as neutron_exceptions from neutronclient.common import exceptions as neutron_exceptions

View File

@@ -15,7 +15,7 @@
import mox import mox
import testtools import testtools
from oslo.config import cfg from oslo_config import cfg
from rack import exception from rack import exception
from rack import service from rack import service

View File

@@ -17,7 +17,7 @@ import platform
import socket import socket
import sys import sys
from oslo.config import cfg from oslo_config import cfg
import rack.context import rack.context

View File

@@ -32,8 +32,8 @@ from xml.sax import saxutils
import eventlet import eventlet
import netaddr import netaddr
from oslo.config import cfg from oslo_config import cfg
from oslo import messaging import oslo_messaging
import six import six
from rack import exception from rack import exception
@@ -965,7 +965,7 @@ class ExceptionHelper(object):
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):
try: try:
return func(*args, **kwargs) return func(*args, **kwargs)
except messaging.ExpectedException as e: except oslo_messaging.ExpectedException as e:
raise (e.exc_info[1], None, e.exc_info[2]) raise (e.exc_info[1], None, e.exc_info[2])
return wrapper return wrapper

View File

@@ -31,7 +31,7 @@ def _load_config():
# this module # this module
import ConfigParser import ConfigParser
from oslo.config import cfg from oslo_config import cfg
from rack.openstack.common import log as logging from rack.openstack.common import log as logging

View File

@@ -23,7 +23,7 @@ import sys
import eventlet import eventlet
import eventlet.wsgi import eventlet.wsgi
import greenlet import greenlet
from oslo.config import cfg from oslo_config import cfg
from paste import deploy from paste import deploy
import routes.middleware import routes.middleware
import ssl import ssl

View File

@@ -1,23 +1,23 @@
anyjson==0.3.3 anyjson>=0.3.3
Babel==1.3 Babel>=1.3
eventlet==0.15.0 eventlet>=0.15.0
iso8601==0.1.10 iso8601>=0.1.10
Jinja2==2.7.3 Jinja2>=2.7.3
lxml==3.3.5 lxml>=3.3.5
netaddr==0.7.12 netaddr>=0.7.12
oslo.config==1.3.0 oslo.config>=1.3.0
oslo.messaging==1.3.0 oslo.messaging>=1.3.0
Paste==1.7.5.1 Paste>=1.7.5.1
pbr==0.9.0 pbr<1.0,>=0.5.21
python-keystoneclient==0.9.0 python-keystoneclient>=0.9.0
python-neutronclient==2.3.5 python-neutronclient>=2.3.5
python-novaclient==2.18.1 python-novaclient>=2.18.1
Routes==2.0 Routes>=2.0
six==1.7.3 six>=1.7.3
SQLAlchemy==0.9.6 SQLAlchemy>=0.9.6
sqlalchemy-migrate==0.9.1 sqlalchemy-migrate>=0.9.1
stevedore==0.15 stevedore>=0.15
WebOb==1.4 WebOb>=1.4
PasteDeploy==1.5.2 PasteDeploy>=1.5.2
gevent==1.0.1 gevent>=1.0.1
gevent-websocket==0.9.3 gevent-websocket>=0.9.3