From 5de2c31e9d24f40fc7d33ddb1ce407ffdc6f366c Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Thu, 12 Mar 2015 07:02:46 -0400 Subject: [PATCH] Switch to non-namespaced module imports Looks like we missed a few Change-Id: I803c09170c9dbc9439d71259f6b632c4cbb6037f --- oslo_vmware/_i18n.py | 4 ++-- oslo_vmware/api.py | 2 +- oslo_vmware/common/loopingcall.py | 2 +- oslo_vmware/rw_handles.py | 4 ++-- oslo_vmware/service.py | 2 +- oslo_vmware/tests/objects/test_datastore.py | 2 +- oslo_vmware/tests/test_service.py | 2 +- oslo_vmware/vim_util.py | 2 +- tests/objects/test_datastore.py | 2 +- tests/test_service.py | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/oslo_vmware/_i18n.py b/oslo_vmware/_i18n.py index 5ab76c80..21aa9f13 100644 --- a/oslo_vmware/_i18n.py +++ b/oslo_vmware/_i18n.py @@ -16,10 +16,10 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html """ -from oslo import i18n +import oslo_i18n -_translators = i18n.TranslatorFactory(domain='oslo.vmware') +_translators = oslo_i18n.TranslatorFactory(domain='oslo.vmware') # The primary translation function using the well-known name "_" _ = _translators.primary diff --git a/oslo_vmware/api.py b/oslo_vmware/api.py index 8f393abd..df68bc96 100644 --- a/oslo_vmware/api.py +++ b/oslo_vmware/api.py @@ -24,9 +24,9 @@ in case of connection problems or server API call overload. import logging from oslo_concurrency import lockutils +from oslo_utils import excutils import six -from oslo.utils import excutils from oslo_vmware._i18n import _, _LE, _LI, _LW from oslo_vmware.common import loopingcall from oslo_vmware import exceptions diff --git a/oslo_vmware/common/loopingcall.py b/oslo_vmware/common/loopingcall.py index 815dbcbc..1db1f21c 100644 --- a/oslo_vmware/common/loopingcall.py +++ b/oslo_vmware/common/loopingcall.py @@ -20,8 +20,8 @@ import sys from eventlet import event from eventlet import greenthread +from oslo_utils import timeutils -from oslo.utils import timeutils from oslo_vmware._i18n import _LE, _LW LOG = logging.getLogger(__name__) diff --git a/oslo_vmware/rw_handles.py b/oslo_vmware/rw_handles.py index 478c3a50..e417e5f7 100644 --- a/oslo_vmware/rw_handles.py +++ b/oslo_vmware/rw_handles.py @@ -24,13 +24,13 @@ glance server. import logging import ssl +from oslo_utils import excutils +from oslo_utils import netutils import requests import six import six.moves.urllib.parse as urlparse from urllib3 import connection as httplib -from oslo.utils import excutils -from oslo.utils import netutils from oslo_vmware._i18n import _, _LE, _LW from oslo_vmware import exceptions from oslo_vmware import vim_util diff --git a/oslo_vmware/service.py b/oslo_vmware/service.py index e0cc414d..2712907c 100644 --- a/oslo_vmware/service.py +++ b/oslo_vmware/service.py @@ -21,6 +21,7 @@ import logging import os import netaddr +from oslo_utils import timeutils import requests import six import six.moves.http_client as httplib @@ -30,7 +31,6 @@ from suds import client from suds import plugin from suds import transport -from oslo.utils import timeutils from oslo_vmware._i18n import _ from oslo_vmware import exceptions from oslo_vmware import vim_util diff --git a/oslo_vmware/tests/objects/test_datastore.py b/oslo_vmware/tests/objects/test_datastore.py index 801f24b2..d50389d5 100644 --- a/oslo_vmware/tests/objects/test_datastore.py +++ b/oslo_vmware/tests/objects/test_datastore.py @@ -13,9 +13,9 @@ # under the License. import mock +from oslo_utils import units import six.moves.urllib.parse as urlparse -from oslo.utils import units from oslo_vmware import constants from oslo_vmware.objects import datastore from oslo_vmware.tests import base diff --git a/oslo_vmware/tests/test_service.py b/oslo_vmware/tests/test_service.py index b2f78cfd..8173128e 100644 --- a/oslo_vmware/tests/test_service.py +++ b/oslo_vmware/tests/test_service.py @@ -392,7 +392,7 @@ class MemoryCacheTest(base.TestCase): cache2 = service.Service().client.options.cache self.assertIs(cache1, cache2) - @mock.patch('oslo.utils.timeutils.utcnow_ts') + @mock.patch('oslo_utils.timeutils.utcnow_ts') def test_cache_timeout(self, mock_utcnow_ts): mock_utcnow_ts.side_effect = [100, 125, 150, 175, 195, 200, 225] diff --git a/oslo_vmware/vim_util.py b/oslo_vmware/vim_util.py index 4631d7e9..8980a511 100644 --- a/oslo_vmware/vim_util.py +++ b/oslo_vmware/vim_util.py @@ -19,9 +19,9 @@ The VMware API utility module. import logging +from oslo_utils import timeutils from suds import sudsobject -from oslo.utils import timeutils from oslo_vmware._i18n import _LW diff --git a/tests/objects/test_datastore.py b/tests/objects/test_datastore.py index 2d66ccff..157cd9af 100644 --- a/tests/objects/test_datastore.py +++ b/tests/objects/test_datastore.py @@ -13,9 +13,9 @@ # under the License. import mock +from oslo_utils import units import six.moves.urllib.parse as urlparse -from oslo.utils import units from oslo.vmware import constants from oslo.vmware.objects import datastore from oslo.vmware import vim_util diff --git a/tests/test_service.py b/tests/test_service.py index c80ceab6..43a58970 100644 --- a/tests/test_service.py +++ b/tests/test_service.py @@ -359,7 +359,7 @@ class MemoryCacheTest(base.TestCase): cache2 = service.Service().client.options.cache self.assertIs(cache1, cache2) - @mock.patch('oslo.utils.timeutils.utcnow_ts') + @mock.patch('oslo_utils.timeutils.utcnow_ts') def test_cache_timeout(self, mock_utcnow_ts): mock_utcnow_ts.side_effect = [100, 125, 150, 175, 195, 200, 225]