Switch to using oslo_* instead of oslo.*

The oslo team is recommending everyone to switch to the
non-namespaced versions of libraries. Updating the hacking
rule to include a check to prevent oslo.* import from
creeping back in.

This commit includes:
- using oslo_utils instead of oslo.utils
- using oslo_serialization instead of oslo.serialization
- using oslo_db instead of oslo.db
- using oslo_i18n instead of oslo.i18n
- using oslo_middleware instead of oslo.middleware
- using oslo_config instead of oslo.config
- using oslo_messaging instead of "from oslo import messaging"
- using oslo_vmware instead of oslo.vmware

Change-Id: I3e2eb147b321ce3e928817b62abcb7d023c5f13f
This commit is contained in:
Davanum Srinivas authored and Davanum Srinivas committed 2015-02-06 06:03:10 -05:00
1 parent ff219370f3
commit af2d6c9576
559 files changed
+1001 -969

No files matched your search

+3 -3
View File
@@ -16,9 +16,9 @@ Common Auth Middleware.
"""
from oslo.config import cfg
from oslo.middleware import request_id
from oslo.serialization import jsonutils
from oslo_config import cfg
from oslo_middleware import request_id
from oslo_serialization import jsonutils
import webob.dec
import webob.exc
+1 -1
View File
@@ -23,7 +23,7 @@ Responses for APIv3 are taken care of by the request_id middleware provided
in oslo.
"""
from oslo.middleware import base
from oslo_middleware import base
import webob.dec
from nova.openstack.common import context
+5 -5
View File
@@ -20,11 +20,11 @@ Starting point for routing EC2 requests.
import hashlib
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo.utils import importutils
from oslo.utils import netutils
from oslo.utils import timeutils
from oslo_config import cfg
from oslo_serialization import jsonutils
from oslo_utils import importutils
from oslo_utils import netutils
from oslo_utils import timeutils
import requests
import six
import webob
+1 -1
View File
@@ -23,7 +23,7 @@ import datetime
from xml.dom import minidom
from lxml import etree
from oslo.utils import encodeutils
from oslo_utils import encodeutils
import six
from nova.api.ec2 import ec2utils
+2 -2
View File
@@ -23,8 +23,8 @@ datastore.
import base64
import time
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_config import cfg
from oslo_utils import timeutils
from nova.api.ec2 import ec2utils
from nova.api.ec2 import inst_state
+1 -1
View File
@@ -17,7 +17,7 @@
import functools
import re
from oslo.utils import timeutils
from oslo_utils import timeutils
from nova import context
from nova import exception
+1 -1
View File
@@ -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.dec
import webob.exc
+4 -4
View File
@@ -20,10 +20,10 @@ import base64
import os
import posixpath
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo.utils import importutils
from oslo.utils import timeutils
from oslo_config import cfg
from oslo_serialization import jsonutils
from oslo_utils import importutils
from oslo_utils import timeutils
from nova.api.ec2 import ec2utils
from nova.api.metadata import password
+1 -1
View File
@@ -19,7 +19,7 @@ import hashlib
import hmac
import os
from oslo.config import cfg
from oslo_config import cfg
import six
import webob.dec
import webob.exc
+2 -2
View File
@@ -17,8 +17,8 @@
import errno
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo_config import cfg
from oslo_serialization import jsonutils
from nova.api.metadata import base
from nova.i18n import _LW
+1 -1
View File
@@ -18,7 +18,7 @@
WSGI middleware for OpenStack API controllers.
"""
from oslo.config import cfg
from oslo_config import cfg
import routes
import stevedore
import webob.dec
+1 -1
View File
@@ -14,7 +14,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.dec
import webob.exc
+1 -1
View File
@@ -19,7 +19,7 @@ import itertools
import os
import re
from oslo.config import cfg
from oslo_config import cfg
import six.moves.urllib.parse as urlparse
import webob
from webob import exc
+1 -1
View File
@@ -18,7 +18,7 @@
WSGI middleware for OpenStack Compute API.
"""
from oslo.config import cfg
from oslo_config import cfg
import nova.api.openstack
from nova.api.openstack.compute import consoles
@@ -19,7 +19,7 @@ It can't be called 'extensions' because that causes namespacing problems.
"""
from oslo.config import cfg
from oslo_config import cfg
from nova.api.openstack import extensions
from nova.openstack.common import log as logging
@@ -15,7 +15,7 @@
import os.path
import traceback
from oslo.utils import strutils
from oslo_utils import strutils
import six
import webob
from webob import exc
@@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import six
import webob
@@ -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 nova.api.openstack import extensions
from nova.api.openstack import wsgi
@@ -15,8 +15,8 @@
"""The bare-metal admin extension with Ironic Proxy."""
from oslo.config import cfg
from oslo.utils import importutils
from oslo_config import cfg
from oslo_utils import importutils
import webob
from nova.api.openstack import extensions
+4 -4
View File
@@ -16,10 +16,10 @@
"""The cells extension."""
from oslo.config import cfg
from oslo import messaging
from oslo.utils import strutils
from oslo.utils import timeutils
from oslo_config import cfg
import oslo_messaging as messaging
from oslo_utils import strutils
from oslo_utils import timeutils
import six
from webob import exc
@@ -14,8 +14,8 @@
"""Connect your vlan to the world."""
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_config import cfg
from oslo_utils import timeutils
from webob import exc
from nova.api.openstack import extensions
@@ -14,7 +14,7 @@
"""Disk Config extension."""
from oslo.utils import strutils
from oslo_utils import strutils
from webob import exc
from nova.api.openstack import extensions
@@ -13,7 +13,7 @@
# under the License.
from oslo.utils import strutils
from oslo_utils import strutils
from webob import exc
from nova.api.openstack import common
@@ -14,7 +14,7 @@
import urllib
from oslo.utils import netutils
from oslo_utils import netutils
import webob
from nova.api.openstack import extensions
@@ -13,7 +13,7 @@
# under the License.
import netaddr
from oslo.config import cfg
from oslo_config import cfg
import six
import webob.exc
+1 -1
View File
@@ -17,7 +17,7 @@
import itertools
import os
from oslo.config import cfg
from oslo_config import cfg
from webob import exc
from nova.api.openstack import common
@@ -15,7 +15,7 @@
"""Extension for hiding server addresses in certain states."""
from oslo.config import cfg
from oslo_config import cfg
from nova.api.openstack import extensions
from nova.api.openstack import wsgi
@@ -16,7 +16,7 @@
import datetime
from oslo.config import cfg
from oslo_config import cfg
import webob.exc
from nova.api.openstack import extensions
@@ -16,7 +16,7 @@
import netaddr
import netaddr.core as netexc
from oslo.config import cfg
from oslo_config import cfg
import six
import webob
from webob import exc
+1 -1
View File
@@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import strutils
from oslo_utils import strutils
import six.moves.urllib.parse as urlparse
import webob
+1 -1
View File
@@ -14,7 +14,7 @@
"""The rescue mode extension."""
from oslo.config import cfg
from oslo_config import cfg
import webob
from webob import exc
@@ -19,7 +19,7 @@
import contextlib
from xml.dom import minidom
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import six
import webob
from webob import exc
@@ -16,7 +16,7 @@
import datetime
import iso8601
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
import six.moves.urllib.parse as urlparse
from webob import exc
@@ -15,7 +15,7 @@
"""The volumes extension."""
from oslo.utils import strutils
from oslo_utils import strutils
import webob
from webob import exc
+1 -1
View File
@@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
from nova.api.openstack import extensions as base_extensions
from nova.openstack.common import log as logging
+1 -1
View File
@@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import strutils
from oslo_utils import strutils
import webob
from nova.api.openstack import common
+2 -2
View File
@@ -38,8 +38,8 @@ import math
import re
import time
from oslo.serialization import jsonutils
from oslo.utils import importutils
from oslo_serialization import jsonutils
from oslo_utils import importutils
import webob.dec
import webob.exc
@@ -16,7 +16,7 @@
"""The Assisted volume snapshots extension."""
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import six
from webob import exc
@@ -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 nova.api.openstack.compute.schemas.v3 import availability_zone as schema
from nova.api.openstack import extensions
@@ -16,8 +16,8 @@
"""The bare-metal admin extension."""
from oslo.config import cfg
from oslo.utils import importutils
from oslo_config import cfg
from oslo_utils import importutils
import webob
from nova.api.openstack import extensions
@@ -15,7 +15,7 @@
"""The legacy block device mappings extension."""
from oslo.utils import strutils
from oslo_utils import strutils
from webob import exc
from nova.api.openstack.compute.schemas.v3 import block_device_mapping_v1 as \
@@ -16,9 +16,9 @@
"""The cells extension."""
from oslo.config import cfg
from oslo import messaging
from oslo.utils import strutils
from oslo_config import cfg
import oslo_messaging as messaging
from oslo_utils import strutils
import six
from webob import exc
@@ -14,8 +14,8 @@
"""Connect your vlan to the world."""
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_config import cfg
from oslo_utils import timeutils
from webob import exc
from nova.api.openstack.compute.schemas.v3 import cloudpipe
@@ -14,7 +14,7 @@
"""Disk Config extension."""
from oslo.utils import strutils
from oslo_utils import strutils
from webob import exc
from nova.api.openstack.compute.schemas.v3 import disk_config
@@ -13,8 +13,8 @@
# under the License.
from oslo.config import cfg
from oslo.utils import strutils
from oslo_config import cfg
from oslo_utils import strutils
from webob import exc
from nova.api.openstack import common
@@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import strutils
from oslo_utils import strutils
import webob
from nova.api.openstack import common
@@ -14,7 +14,7 @@
import urllib
from oslo.utils import netutils
from oslo_utils import netutils
import webob
from nova.api.openstack.compute.schemas.v3 import floating_ip_dns
@@ -13,7 +13,7 @@
# under the License.
import netaddr
from oslo.config import cfg
from oslo_config import cfg
import six
import webob.exc
@@ -17,7 +17,7 @@
import itertools
import os
from oslo.config import cfg
from oslo_config import cfg
from webob import exc
from nova.api.openstack import common
@@ -15,7 +15,7 @@
"""Extension for hiding server addresses in certain states."""
from oslo.config import cfg
from oslo_config import cfg
from nova.api.openstack import extensions
from nova.api.openstack import wsgi
@@ -16,7 +16,7 @@
import datetime
from oslo.config import cfg
from oslo_config import cfg
import webob.exc
from nova.api.openstack import extensions
@@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import strutils
from oslo_utils import strutils
from webob import exc
from nova.api.openstack import common
+1 -1
View File
@@ -14,7 +14,7 @@
# under the License.
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import webob.exc
from nova.api.openstack import extensions
@@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import strutils
from oslo_utils import strutils
import six.moves.urllib.parse as urlparse
import webob
@@ -14,7 +14,7 @@
"""The rescue mode extension."""
from oslo.config import cfg
from oslo_config import cfg
from webob import exc
from nova.api.openstack import common
@@ -15,7 +15,7 @@
# under the License.
"""The security groups extension."""
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
from webob import exc
from nova.api.openstack import common
@@ -17,10 +17,10 @@
import base64
import re
from oslo.config import cfg
from oslo import messaging
from oslo.utils import strutils
from oslo.utils import timeutils
from oslo_config import cfg
import oslo_messaging as messaging
from oslo_utils import strutils
from oslo_utils import timeutils
import six
import stevedore
import webob
@@ -16,7 +16,7 @@
import datetime
import iso8601
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
import six.moves.urllib.parse as urlparse
from webob import exc
@@ -16,7 +16,7 @@
import netaddr
import netaddr.core as netexc
from oslo.config import cfg
from oslo_config import cfg
import six
from webob import exc
@@ -15,7 +15,7 @@
"""The volumes extension."""
from oslo.utils import strutils
from oslo_utils import strutils
from webob import exc
from nova.api.openstack import common
+5 -5
View File
@@ -19,11 +19,11 @@ import os
import re
import sys
from oslo.config import cfg
from oslo import messaging
from oslo.utils import netutils
from oslo.utils import strutils
from oslo.utils import timeutils
from oslo_config import cfg
import oslo_messaging as messaging
from oslo_utils import netutils
from oslo_utils import strutils
from oslo_utils import timeutils
import six
import webob
from webob import exc
+1 -1
View File
@@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
from nova.api.openstack.compute.views import versions as views_versions
from nova.api.openstack import wsgi
+1 -1
View File
@@ -14,7 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
from oslo_utils import timeutils
from nova.api.openstack import common
from nova.image import glance
+1 -1
View File
@@ -15,7 +15,7 @@
import datetime
from oslo.utils import timeutils
from oslo_utils import timeutils
class ViewBuilder(object):
+1 -1
View File
@@ -16,7 +16,7 @@
import hashlib
from oslo.utils import timeutils
from oslo_utils import timeutils
from nova.api.openstack import common
from nova.api.openstack.compute.views import addresses as views_addresses
+1 -1
View File
@@ -18,7 +18,7 @@ import abc
import functools
import os
from oslo.utils import importutils
from oslo_utils import importutils
import six
import webob.dec
import webob.exc
+2 -2
View File
@@ -19,8 +19,8 @@ import inspect
import math
import time
from oslo.serialization import jsonutils
from oslo.utils import strutils
from oslo_serialization import jsonutils
from oslo_utils import strutils
import six
import webob
+1 -1
View File
@@ -15,7 +15,7 @@
Request Body limiting middleware.
"""
from oslo.middleware import sizelimit
from oslo_middleware import sizelimit
# TODO(ekudryashova): Remove below aliases when grenade jobs
+1 -1
View File
@@ -21,7 +21,7 @@ import re
import jsonschema
import netaddr
from oslo.utils import timeutils
from oslo_utils import timeutils
import rfc3986
import six
+1 -1
View File
@@ -17,7 +17,7 @@
import collections
from oslo.config import cfg
from oslo_config import cfg
from nova import objects
from nova.openstack.common import memorycache
+3 -3
View File
@@ -18,9 +18,9 @@
Base RPC client and server common to all services.
"""
from oslo.config import cfg
from oslo import messaging
from oslo.serialization import jsonutils
from oslo_config import cfg
import oslo_messaging as messaging
from oslo_serialization import jsonutils
from nova import rpc
+2 -2
View File
@@ -15,8 +15,8 @@
import re
from oslo.config import cfg
from oslo.utils import strutils
from oslo_config import cfg
from oslo_utils import strutils
from nova import exception
from nova.i18n import _
+4 -4
View File
@@ -19,10 +19,10 @@ Cells Service Manager
import datetime
import time
from oslo.config import cfg
from oslo import messaging as oslo_messaging
from oslo.utils import importutils
from oslo.utils import timeutils
from oslo_config import cfg
import oslo_messaging
from oslo_utils import importutils
from oslo_utils import timeutils
from nova.cells import messaging
from nova.cells import state as cells_state
+6 -6
View File
@@ -30,12 +30,12 @@ import sys
import traceback
from eventlet import queue
from oslo.config import cfg
from oslo import messaging
from oslo.serialization import jsonutils
from oslo.utils import excutils
from oslo.utils import importutils
from oslo.utils import timeutils
from oslo_config import cfg
import oslo_messaging as messaging
from oslo_serialization import jsonutils
from oslo_utils import excutils
from oslo_utils import importutils
from oslo_utils import timeutils
import six
from nova.cells import state as cells_state
+1 -1
View File
@@ -16,7 +16,7 @@
Global cells config options
"""
from oslo.config import cfg
from oslo_config import cfg
cells_opts = [
+2 -2
View File
@@ -17,8 +17,8 @@
"""
Cells RPC Communication Driver
"""
from oslo.config import cfg
from oslo import messaging
from oslo_config import cfg
import oslo_messaging as messaging
from nova.cells import driver
from nova import rpc
+3 -3
View File
@@ -23,9 +23,9 @@ services. That communication is handled by the cells driver via the
messging module.
"""
from oslo.config import cfg
from oslo import messaging
from oslo.serialization import jsonutils
from oslo_config import cfg
import oslo_messaging as messaging
from oslo_serialization import jsonutils
from nova import exception
from nova.i18n import _LE
+1 -1
View File
@@ -19,7 +19,7 @@ Cells Scheduler
import copy
import time
from oslo.config import cfg
from oslo_config import cfg
from nova.cells import filters
from nova.cells import weights
+5 -5
View File
@@ -21,11 +21,11 @@ import datetime
import functools
import time
from oslo.config import cfg
from oslo.db import exception as db_exc
from oslo.serialization import jsonutils
from oslo.utils import timeutils
from oslo.utils import units
from oslo_config import cfg
from oslo_db import exception as db_exc
from oslo_serialization import jsonutils
from oslo_utils import timeutils
from oslo_utils import units
from nova.cells import rpc_driver
from nova import context
+2 -2
View File
@@ -18,8 +18,8 @@ If a child cell hasn't sent capacity or capability updates in a while,
downgrade its likelihood of being chosen for scheduling requests.
"""
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_config import cfg
from oslo_utils import timeutils
from nova.cells import weights
from nova.i18n import _LW
+1 -1
View File
@@ -16,7 +16,7 @@
"""
Weigh cells by memory needed in a way that spreads instances.
"""
from oslo.config import cfg
from oslo_config import cfg
from nova.cells import weights
+1 -1
View File
@@ -18,7 +18,7 @@ Weigh cells by their weight_offset in the DB. Cells with higher
weight_offsets in the DB will be preferred.
"""
from oslo.config import cfg
from oslo_config import cfg
from nova.cells import weights
+1 -1
View File
@@ -24,7 +24,7 @@ Cert manager manages x509 certificates.
import base64
from oslo import messaging
import oslo_messaging as messaging
from nova import crypto
from nova import manager
+2 -2
View File
@@ -16,8 +16,8 @@
Client side of the cert manager RPC API.
"""
from oslo.config import cfg
from oslo import messaging
from oslo_config import cfg
import oslo_messaging as messaging
from nova import rpc
+1 -1
View File
@@ -24,7 +24,7 @@ import os
import string
import zipfile
from oslo.config import cfg
from oslo_config import cfg
from nova import compute
from nova.compute import flavors
+1 -1
View File
@@ -26,7 +26,7 @@ continue attempting to launch the rest of the services.
import sys
from oslo.config import cfg
from oslo_config import cfg
from nova import config
from nova.i18n import _LE
+1 -1
View File
@@ -22,7 +22,7 @@ Starts both the EC2 and OpenStack APIs in separate greenthreads.
import sys
from oslo.config import cfg
from oslo_config import cfg
from nova import config
from nova import objects
+1 -1
View File
@@ -18,7 +18,7 @@
import sys
from oslo.config import cfg
from oslo_config import cfg
from nova import config
from nova import objects
+1 -1
View File
@@ -18,7 +18,7 @@
import sys
from oslo.config import cfg
from oslo_config import cfg
from nova.conductor import rpcapi as conductor_rpcapi
from nova import config
+1 -1
View File
@@ -18,7 +18,7 @@
import sys
from oslo.config import cfg
from oslo_config import cfg
from nova import config
from nova import objects
+1 -1
View File
@@ -20,7 +20,7 @@ for Openstack Nova."""
import os
import sys
from oslo.config import cfg
from oslo_config import cfg
from nova import config
from nova.console import websocketproxy
+1 -1
View File
@@ -17,7 +17,7 @@
import sys
from oslo.config import cfg
from oslo_config import cfg
from nova import config
from nova import objects
+1 -1
View File
@@ -16,7 +16,7 @@
import sys
from oslo.config import cfg
from oslo_config import cfg
from nova import config
from nova.openstack.common import log as logging
+1 -1
View File
@@ -19,7 +19,7 @@
import sys
import traceback
from oslo.config import cfg
from oslo_config import cfg
from nova.conductor import rpcapi as conductor_rpcapi
from nova import config
+1 -1
View File
@@ -16,8 +16,8 @@
import sys
from oslo.config import cfg
from oslo_concurrency import processutils
from oslo_config import cfg
from nova import config
from nova import objects
+1 -1
View File
@@ -17,7 +17,7 @@
import sys
from oslo.config import cfg
from oslo_config import cfg
from nova import config
from nova.openstack.common import log as logging
+1 -1
View File
@@ -17,7 +17,7 @@
import sys
from oslo.config import cfg
from oslo_config import cfg
from nova import config
from nova import objects
+3 -3
View File
@@ -24,9 +24,9 @@ import os
import sys
import traceback
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo.utils import importutils
from oslo_config import cfg
from oslo_serialization import jsonutils
from oslo_utils import importutils
from nova.conductor import rpcapi as conductor_rpcapi
from nova import config
+3 -3
View File
@@ -60,9 +60,9 @@ import sys
import decorator
import netaddr
from oslo.config import cfg
from oslo import messaging
from oslo.utils import importutils
from oslo_config import cfg
import oslo_messaging as messaging
from oslo_utils import importutils
import six
from nova.api.ec2 import ec2utils
+1 -1
View File
@@ -19,7 +19,7 @@
import sys
import traceback
from oslo.config import cfg
from oslo_config import cfg
from nova.conductor import rpcapi as conductor_rpcapi
from nova import config
Loaded 100 of 559 files, more files were not shown because too many files have changed in this diff. Show more