From 066cfa3352036e4ba237eaca7f210ed64ec7ed1a Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 9 Feb 2015 17:34:09 -0500 Subject: [PATCH] Revert : Switch off oslo.* namespace check temporarily In I7033847bab82b6d3cd8f2bdb66c553fec93d7acb, we disabled N333 to allow changes in flight to still mix up oslo_ and oslo. based imports. We should revert the change and enforce every review use just the oslo_ version from now on. Change-Id: I1db83048c569bcdd62538cce9df076fc355f7b26 --- nova/api/openstack/compute/contrib/hypervisors.py | 2 +- nova/api/openstack/compute/plugins/v3/hypervisors.py | 2 +- .../openstack/compute/plugins/v3/preserve_ephemeral_rebuild.py | 2 +- nova/objects/vcpu_model.py | 2 +- nova/openstack/common/versionutils.py | 2 +- .../unit/api/openstack/compute/contrib/test_tenant_networks.py | 2 +- nova/tests/unit/virt/vmwareapi/test_network_util.py | 2 +- tox.ini | 3 +-- 8 files changed, 8 insertions(+), 9 deletions(-) diff --git a/nova/api/openstack/compute/contrib/hypervisors.py b/nova/api/openstack/compute/contrib/hypervisors.py index 1bb32da5ef..1c9ced8643 100644 --- a/nova/api/openstack/compute/contrib/hypervisors.py +++ b/nova/api/openstack/compute/contrib/hypervisors.py @@ -15,7 +15,7 @@ """The hypervisors admin extension.""" -from oslo.config import cfg +from oslo_config import cfg import webob.exc from nova.api.openstack import extensions diff --git a/nova/api/openstack/compute/plugins/v3/hypervisors.py b/nova/api/openstack/compute/plugins/v3/hypervisors.py index 04887ed503..29e65551af 100644 --- a/nova/api/openstack/compute/plugins/v3/hypervisors.py +++ b/nova/api/openstack/compute/plugins/v3/hypervisors.py @@ -15,7 +15,7 @@ """The hypervisors admin extension.""" -from oslo.config import cfg +from oslo_config import cfg import webob.exc from nova.api.openstack import extensions diff --git a/nova/api/openstack/compute/plugins/v3/preserve_ephemeral_rebuild.py b/nova/api/openstack/compute/plugins/v3/preserve_ephemeral_rebuild.py index 3b722a9d16..c23cedf3f0 100644 --- a/nova/api/openstack/compute/plugins/v3/preserve_ephemeral_rebuild.py +++ b/nova/api/openstack/compute/plugins/v3/preserve_ephemeral_rebuild.py @@ -13,7 +13,7 @@ # under the License. -from oslo.utils import strutils +from oslo_utils import strutils from nova.api.openstack.compute.schemas.v3 import preserve_ephemeral_rebuild from nova.api.openstack import extensions diff --git a/nova/objects/vcpu_model.py b/nova/objects/vcpu_model.py index fbdf6eebc4..de225bd294 100644 --- a/nova/objects/vcpu_model.py +++ b/nova/objects/vcpu_model.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.serialization import jsonutils +from oslo_serialization import jsonutils from nova.compute import arch from nova.compute import cpumodel diff --git a/nova/openstack/common/versionutils.py b/nova/openstack/common/versionutils.py index fb7d9477c2..6006f79384 100644 --- a/nova/openstack/common/versionutils.py +++ b/nova/openstack/common/versionutils.py @@ -21,7 +21,7 @@ import functools import inspect import logging -from oslo.config import cfg +from oslo_config import cfg import pkg_resources import six diff --git a/nova/tests/unit/api/openstack/compute/contrib/test_tenant_networks.py b/nova/tests/unit/api/openstack/compute/contrib/test_tenant_networks.py index c2a2201ece..d7ca0fad24 100644 --- a/nova/tests/unit/api/openstack/compute/contrib/test_tenant_networks.py +++ b/nova/tests/unit/api/openstack/compute/contrib/test_tenant_networks.py @@ -15,7 +15,7 @@ import copy import mock -from oslo.config import cfg +from oslo_config import cfg import webob from nova.api.openstack.compute.contrib import os_tenant_networks as networks diff --git a/nova/tests/unit/virt/vmwareapi/test_network_util.py b/nova/tests/unit/virt/vmwareapi/test_network_util.py index 4bb5be0fa3..31f1b7ffee 100644 --- a/nova/tests/unit/virt/vmwareapi/test_network_util.py +++ b/nova/tests/unit/virt/vmwareapi/test_network_util.py @@ -17,7 +17,7 @@ import collections import mock -from oslo.vmware import vim_util +from oslo_vmware import vim_util from nova import test from nova.tests.unit.virt.vmwareapi import fake diff --git a/tox.ini b/tox.ini index 018f2afb25..64304ef8bb 100644 --- a/tox.ini +++ b/tox.ini @@ -68,9 +68,8 @@ commands = # The rest of the ignores are TODOs # New from hacking 0.9: E129, E131, H407, H405 # E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301 -# N333 Skip the oslo.* namespace check temporarily -ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405,N333 +ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405 exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools/xenserver* # To get a list of functions that are more complex than 25, set max-complexity # to 25 and run 'tox -epep8'.