Merge "Use oslo.utils - remove importutils usage"

This commit is contained in:
Jenkins 2014-10-26 02:00:03 +00:00 committed by Gerrit Code Review
commit 63ba5fb5d4
4 changed files with 8 additions and 9 deletions

View File

@ -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()

View File

@ -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()

View File

@ -16,8 +16,9 @@
# Importing full names to not pollute the namespace and cause possible
# collisions with use of 'from manila.share import <foo>' elsewhere.
import oslo.utils.importutils as import_utils
from manila.common import config
import manila.openstack.common.importutils as import_utils
CONF = config.CONF

View File

@ -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()