From 74c631c6dae08d463f0d4c3953a1addcb187d090 Mon Sep 17 00:00:00 2001 From: kong wei Date: Fri, 3 Mar 2017 16:55:59 +0000 Subject: Revert "escalator should use oslo.xxx instead of oslo-xxx" This reverts commit 71d4f906c1a52f5dcba114ff8aa70148dafffd24. Change-Id: I18a853c887b380b862554ff35ef8a8ddd76b5a58 Signed-off-by: Kong Wei --- api/escalator/api/middleware/context.py | 6 +++--- api/escalator/api/policy.py | 6 +++--- api/escalator/api/v1/versions.py | 2 +- api/escalator/api/versions.py | 4 ++-- api/escalator/cmd/api.py | 6 +++--- api/escalator/common/auth.py | 4 ++-- api/escalator/common/client.py | 4 ++-- api/escalator/common/config.py | 6 +++--- api/escalator/common/rpc.py | 8 ++++---- api/escalator/common/utils.py | 8 ++++---- api/escalator/common/wsgi.py | 10 +++++----- api/escalator/context.py | 2 +- api/escalator/i18n.py | 2 +- api/escalator/notifier.py | 10 +++++----- api/escalator/opts.py | 4 ++-- client/escalatorclient/common/http.py | 6 +++--- client/escalatorclient/common/https.py | 2 +- client/escalatorclient/common/utils.py | 6 +++--- client/escalatorclient/openstack/common/apiclient/base.py | 2 +- client/escalatorclient/openstack/common/apiclient/client.py | 4 ++-- client/escalatorclient/openstack/common/apiclient/utils.py | 4 ++-- client/escalatorclient/shell.py | 4 ++-- client/escalatorclient/v1/shell.py | 2 +- client/escalatorclient/v1/versions.py | 4 ++-- 24 files changed, 58 insertions(+), 58 deletions(-) diff --git a/api/escalator/api/middleware/context.py b/api/escalator/api/middleware/context.py index a35a4de..b921289 100644 --- a/api/escalator/api/middleware/context.py +++ b/api/escalator/api/middleware/context.py @@ -13,9 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.serialization import jsonutils -from oslo.config import cfg -from oslo.log import log as logging +from oslo_serialization import jsonutils +from oslo_config import cfg +from oslo_log import log as logging import webob.exc from escalator.api import policy diff --git a/api/escalator/api/policy.py b/api/escalator/api/policy.py index ab74e38..4d94f51 100644 --- a/api/escalator/api/policy.py +++ b/api/escalator/api/policy.py @@ -17,9 +17,9 @@ """Policy Engine For Escalator""" -from oslo.config import cfg -from oslo.log import log as logging -from oslo.policy import policy +from oslo_config import cfg +from oslo_log import log as logging +from oslo_policy import policy from escalator.common import exception from escalator import i18n diff --git a/api/escalator/api/v1/versions.py b/api/escalator/api/v1/versions.py index 268f0a9..a026dc1 100644 --- a/api/escalator/api/v1/versions.py +++ b/api/escalator/api/v1/versions.py @@ -16,7 +16,7 @@ """ /hosts endpoint for Escalator v1 API """ -from oslo.log import log as logging +from oslo_log import log as logging from escalator import i18n from escalator import notifier from escalator.common import utils diff --git a/api/escalator/api/versions.py b/api/escalator/api/versions.py index 6a3dd0a..751fc76 100644 --- a/api/escalator/api/versions.py +++ b/api/escalator/api/versions.py @@ -15,8 +15,8 @@ import httplib -from oslo.serialization import jsonutils -from oslo.config import cfg +from oslo_serialization import jsonutils +from oslo_config import cfg import webob.dec from escalator.common import wsgi diff --git a/api/escalator/cmd/api.py b/api/escalator/cmd/api.py index c0bea85..a0f63dc 100644 --- a/api/escalator/cmd/api.py +++ b/api/escalator/cmd/api.py @@ -26,9 +26,9 @@ import sys import eventlet -from oslo.service import systemd -from oslo.config import cfg -from oslo.log import log as logging +from oslo_service import systemd +from oslo_config import cfg +from oslo_log import log as logging import osprofiler.notifier import osprofiler.web diff --git a/api/escalator/common/auth.py b/api/escalator/common/auth.py index cc65935..d3e2893 100644 --- a/api/escalator/common/auth.py +++ b/api/escalator/common/auth.py @@ -29,8 +29,8 @@ Keystone (an identity management system). http://service_endpoint/ """ import httplib2 -from oslo.serialization import jsonutils -from oslo.log import log as logging +from oslo_serialization import jsonutils +from oslo_log import log as logging # NOTE(jokke): simplified transition to py3, behaves like py2 xrange from six.moves import range import six.moves.urllib.parse as urlparse diff --git a/api/escalator/common/client.py b/api/escalator/common/client.py index 7eb2a9c..586d638 100644 --- a/api/escalator/common/client.py +++ b/api/escalator/common/client.py @@ -40,8 +40,8 @@ try: except ImportError: SENDFILE_SUPPORTED = False -from oslo.log import log as logging -from oslo.utils import encodeutils +from oslo_log import log as logging +from oslo_utils import encodeutils import six # NOTE(jokke): simplified transition to py3, behaves like py2 xrange from six.moves import range diff --git a/api/escalator/common/config.py b/api/escalator/common/config.py index a381711..66a59f1 100644 --- a/api/escalator/common/config.py +++ b/api/escalator/common/config.py @@ -24,9 +24,9 @@ import logging.handlers import os import tempfile -from oslo.concurrency import lockutils -from oslo.config import cfg -from oslo.policy import policy +from oslo_concurrency import lockutils +from oslo_config import cfg +from oslo_policy import policy from paste import deploy from escalator import i18n diff --git a/api/escalator/common/rpc.py b/api/escalator/common/rpc.py index 9825bd6..4d50461 100644 --- a/api/escalator/common/rpc.py +++ b/api/escalator/common/rpc.py @@ -19,10 +19,10 @@ RPC Controller import datetime import traceback -from oslo.config import cfg -from oslo.log import log as logging -import oslo.utils.importutils as imp -from oslo.utils import timeutils +from oslo_config import cfg +from oslo_log import log as logging +import oslo_utils.importutils as imp +from oslo_utils import timeutils import six from webob import exc diff --git a/api/escalator/common/utils.py b/api/escalator/common/utils.py index df97e29..6cb1784 100644 --- a/api/escalator/common/utils.py +++ b/api/escalator/common/utils.py @@ -39,10 +39,10 @@ import uuid import copy from OpenSSL import crypto -from oslo.config import cfg -from oslo.log import log as logging -from oslo.utils import encodeutils -from oslo.utils import excutils +from oslo_config import cfg +from oslo_log import log as logging +from oslo_utils import encodeutils +from oslo_utils import excutils import six from webob import exc from escalator.common import exception diff --git a/api/escalator/common/wsgi.py b/api/escalator/common/wsgi.py index 453eb67..8884ea4 100644 --- a/api/escalator/common/wsgi.py +++ b/api/escalator/common/wsgi.py @@ -33,11 +33,11 @@ from eventlet.green import socket from eventlet.green import ssl import eventlet.greenio import eventlet.wsgi -from oslo.serialization import jsonutils -from oslo.concurrency import processutils -from oslo.config import cfg -from oslo.log import log as logging -from oslo.log import loggers +from oslo_serialization import jsonutils +from oslo_concurrency import processutils +from oslo_config import cfg +from oslo_log import log as logging +from oslo_log import loggers import routes import routes.middleware import six diff --git a/api/escalator/context.py b/api/escalator/context.py index b8060a3..0fc8e3d 100644 --- a/api/escalator/context.py +++ b/api/escalator/context.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.context import context +from oslo_context import context from escalator.api import policy diff --git a/api/escalator/i18n.py b/api/escalator/i18n.py index 9a1c472..56bfde3 100644 --- a/api/escalator/i18n.py +++ b/api/escalator/i18n.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.i18n import TranslatorFactory # noqa +from oslo_i18n import TranslatorFactory # noqa _translators = TranslatorFactory(domain='escalator') diff --git a/api/escalator/notifier.py b/api/escalator/notifier.py index 60a39ea..1e6ea02 100644 --- a/api/escalator/notifier.py +++ b/api/escalator/notifier.py @@ -14,9 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.config import cfg -from oslo.log import log as logging -import oslo.messaging +from oslo_config import cfg +from oslo_log import log as logging +import oslo_messaging from escalator import i18n @@ -44,7 +44,7 @@ LOG = logging.getLogger(__name__) def get_transport(): - return oslo.messaging.get_transport(CONF) + return oslo_messaging.get_transport(CONF) class Notifier(object): @@ -53,7 +53,7 @@ class Notifier(object): def __init__(self): publisher_id = CONF.default_publisher_id self._transport = get_transport() - self._notifier = oslo.messaging.Notifier(self._transport, + self._notifier = oslo_messaging.Notifier(self._transport, publisher_id=publisher_id) def warn(self, event_type, payload): diff --git a/api/escalator/opts.py b/api/escalator/opts.py index f317b90..21639e6 100644 --- a/api/escalator/opts.py +++ b/api/escalator/opts.py @@ -43,7 +43,7 @@ _api_opts = [ def list_api_opts(): - """Return a list of oslo.config options available in Escalator API service. + """Return a list of oslo_config options available in Escalator API service. Each element of the list is a tuple. The first element is the name of the group under which the list of elements in the second element will be @@ -51,7 +51,7 @@ def list_api_opts(): config files. This function is also discoverable via the 'escalator.api' entry point - under the 'oslo.config.opts' namespace. + under the 'oslo_config.opts' namespace. The purpose of this is to allow tools like the Oslo sample config file generator to discover the options exposed to users by escalator. diff --git a/client/escalatorclient/common/http.py b/client/escalatorclient/common/http.py index e3e4b88..301eedb 100644 --- a/client/escalatorclient/common/http.py +++ b/client/escalatorclient/common/http.py @@ -16,12 +16,12 @@ import copy import logging import socket -from oslo.utils import encodeutils +from oslo_utils import encodeutils from escalatorclient.common import https from escalatorclient.common.utils import safe_header from escalatorclient import exc -from oslo.utils import importutils -from oslo.utils import netutils +from oslo_utils import importutils +from oslo_utils import netutils from simplejson import decoder import requests try: diff --git a/client/escalatorclient/common/https.py b/client/escalatorclient/common/https.py index 0008a84..55769a0 100644 --- a/client/escalatorclient/common/https.py +++ b/client/escalatorclient/common/https.py @@ -25,7 +25,7 @@ try: except ImportError: from urllib3 import connectionpool -from oslo.utils import encodeutils +from oslo_utils import encodeutils import six # NOTE(jokke): simplified transition to py3, behaves like py2 xrange from six.moves import range diff --git a/client/escalatorclient/common/utils.py b/client/escalatorclient/common/utils.py index 6ebffe0..0156d31 100644 --- a/client/escalatorclient/common/utils.py +++ b/client/escalatorclient/common/utils.py @@ -23,13 +23,13 @@ import re import sys import threading import uuid -from oslo.utils import encodeutils -from oslo.utils import strutils +from oslo_utils import encodeutils +from oslo_utils import strutils import prettytable import six from escalatorclient import exc -from oslo.utils import importutils +from oslo_utils import importutils if os.name == 'nt': import msvcrt diff --git a/client/escalatorclient/openstack/common/apiclient/base.py b/client/escalatorclient/openstack/common/apiclient/base.py index 128e964..eb7218b 100644 --- a/client/escalatorclient/openstack/common/apiclient/base.py +++ b/client/escalatorclient/openstack/common/apiclient/base.py @@ -40,7 +40,7 @@ Base utilities to build API operation managers and objects on top of. import abc import copy -from oslo.utils import strutils +from oslo_utils import strutils import six from six.moves.urllib import parse diff --git a/client/escalatorclient/openstack/common/apiclient/client.py b/client/escalatorclient/openstack/common/apiclient/client.py index 6d80e3c..d478989 100644 --- a/client/escalatorclient/openstack/common/apiclient/client.py +++ b/client/escalatorclient/openstack/common/apiclient/client.py @@ -34,8 +34,8 @@ try: except ImportError: import json -from oslo.utils import encodeutils -from oslo.utils import importutils +from oslo_utils import encodeutils +from oslo_utils import importutils import requests from escalatorclient.openstack.common._i18n import _ diff --git a/client/escalatorclient/openstack/common/apiclient/utils.py b/client/escalatorclient/openstack/common/apiclient/utils.py index b37e73b..c0f612a 100644 --- a/client/escalatorclient/openstack/common/apiclient/utils.py +++ b/client/escalatorclient/openstack/common/apiclient/utils.py @@ -24,8 +24,8 @@ # ######################################################################## -from oslo.utils import encodeutils -from oslo.utils import uuidutils +from oslo_utils import encodeutils +from oslo_utils import uuidutils import six from escalatorclient.openstack.common._i18n import _ diff --git a/client/escalatorclient/shell.py b/client/escalatorclient/shell.py index 6aa17f8..782106c 100644 --- a/client/escalatorclient/shell.py +++ b/client/escalatorclient/shell.py @@ -29,8 +29,8 @@ from os.path import expanduser import sys import traceback -from oslo.utils import encodeutils -from oslo.utils import importutils +from oslo_utils import encodeutils +from oslo_utils import importutils import six.moves.urllib.parse as urlparse import escalatorclient diff --git a/client/escalatorclient/v1/shell.py b/client/escalatorclient/v1/shell.py index ab02c9a..401ad76 100644 --- a/client/escalatorclient/v1/shell.py +++ b/client/escalatorclient/v1/shell.py @@ -17,7 +17,7 @@ from __future__ import print_function import copy import functools -from oslo.utils import strutils +from oslo_utils import strutils import escalatorclient.v1.versions from escalatorclient.common import utils diff --git a/client/escalatorclient/v1/versions.py b/client/escalatorclient/v1/versions.py index 6fe2f74..143c4c6 100644 --- a/client/escalatorclient/v1/versions.py +++ b/client/escalatorclient/v1/versions.py @@ -15,8 +15,8 @@ import copy -from oslo.utils import encodeutils -from oslo.utils import strutils +from oslo_utils import encodeutils +from oslo_utils import strutils import six import six.moves.urllib.parse as urlparse -- cgit 1.2.3-korg