From 630c08fbd4df5a75d393c1947013982d5b8a47d6 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 22 Oct 2014 19:53:28 +0200 Subject: [PATCH] Use oslo.utils - remove importutils usage Use importutils from olso.utils instead of the deprecated version from oslo-incubator. These four files were missed in the previous change "Use oslo.utils" with id I4f949de57e333832dcc7c1e256ce82e2db0144cb. Change-Id: I198ea24a0512c60f11caad7cf8ae8c504442026d --- manila/compute/__init__.py | 4 ++-- manila/network/__init__.py | 5 ++--- manila/share/__init__.py | 3 ++- manila/volume/__init__.py | 5 ++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/manila/compute/__init__.py b/manila/compute/__init__.py index 69f0fee5..fa569dc9 100644 --- a/manila/compute/__init__.py +++ b/manila/compute/__init__.py @@ -14,8 +14,8 @@ # under the License. import oslo.config.cfg +import oslo.utils.importutils -import manila.openstack.common.importutils _compute_opts = [ oslo.config.cfg.StrOpt('compute_api_class', @@ -28,7 +28,7 @@ oslo.config.cfg.CONF.register_opts(_compute_opts) def API(): - importutils = manila.openstack.common.importutils + importutils = oslo.utils.importutils compute_api_class = oslo.config.cfg.CONF.compute_api_class cls = importutils.import_class(compute_api_class) return cls() diff --git a/manila/network/__init__.py b/manila/network/__init__.py index fedc0a28..70644979 100644 --- a/manila/network/__init__.py +++ b/manila/network/__init__.py @@ -15,8 +15,7 @@ import abc from oslo.config import cfg - -import manila.openstack.common.importutils +import oslo.utils.importutils network_opts = [ cfg.StrOpt('network_api_class', @@ -29,7 +28,7 @@ cfg.CONF.register_opts(network_opts) def API(): - importutils = manila.openstack.common.importutils + importutils = oslo.utils.importutils network_api_class = cfg.CONF.network_api_class cls = importutils.import_class(network_api_class) return cls() diff --git a/manila/share/__init__.py b/manila/share/__init__.py index b5bc58e4..7d6bfad1 100644 --- a/manila/share/__init__.py +++ b/manila/share/__init__.py @@ -16,8 +16,9 @@ # Importing full names to not pollute the namespace and cause possible # collisions with use of 'from manila.share import ' elsewhere. +import oslo.utils.importutils as import_utils + from manila.common import config -import manila.openstack.common.importutils as import_utils CONF = config.CONF diff --git a/manila/volume/__init__.py b/manila/volume/__init__.py index bba8f4c9..7aa43eca 100644 --- a/manila/volume/__init__.py +++ b/manila/volume/__init__.py @@ -14,8 +14,7 @@ # under the License. import oslo.config.cfg - -import manila.openstack.common.importutils +import oslo.utils.importutils _volume_opts = [ oslo.config.cfg.StrOpt('volume_api_class', @@ -28,7 +27,7 @@ oslo.config.cfg.CONF.register_opts(_volume_opts) def API(): - importutils = manila.openstack.common.importutils + importutils = oslo.utils.importutils volume_api_class = oslo.config.cfg.CONF.volume_api_class cls = importutils.import_class(volume_api_class) return cls()