Skip to content

Instantly share code, notes, and snippets.

@WaltHP
Created February 24, 2015 00:19
Show Gist options
  • Save WaltHP/4a02ce2d34627b07306b to your computer and use it in GitHub Desktop.
Save WaltHP/4a02ce2d34627b07306b to your computer and use it in GitHub Desktop.
diff --git a/cinder/zonemanager/fc_san_lookup_service.py b/cinder/zonemanager/fc_san_lookup_service.py
index 48b0df6..f61b500 100644
--- a/cinder/zonemanager/fc_san_lookup_service.py
+++ b/cinder/zonemanager/fc_san_lookup_service.py
@@ -49,8 +49,6 @@ class FCSanLookupService(fc_common.FCCommon):
def __init__(self, **kwargs):
super(FCSanLookupService, self).__init__(**kwargs)
- self.configuration = kwargs.get('configuration', None)
-
opts = fc_zone_manager.zone_manager_opts
self.configuration = config.Configuration(opts, 'fc-zone-manager')
diff --git a/cinder/zonemanager/fc_zone_manager.py b/cinder/zonemanager/fc_zone_manager.py
index f007015..c2a2ecc 100644
--- a/cinder/zonemanager/fc_zone_manager.py
+++ b/cinder/zonemanager/fc_zone_manager.py
@@ -87,9 +87,8 @@ class ZoneManager(fc_common.FCCommon):
"""Load the driver from the one specified in args, or from flags."""
super(ZoneManager, self).__init__(**kwargs)
- self.configuration = kwargs.get('configuration', None)
- if self.configuration:
- self.configuration.append_config_values(zone_manager_opts)
+ self.configuration = config.Configuration(zone_manager_opts,
+ 'fc-zone-manager')
self._build_driver()
diff --git a/cinder/zonemanager/utils.py b/cinder/zonemanager/utils.py
index dbe67ac..7cbf361 100644
--- a/cinder/zonemanager/utils.py
+++ b/cinder/zonemanager/utils.py
@@ -36,7 +36,7 @@ def create_zone_manager():
LOG.debug("zoning mode %s" % config.safe_get('zoning_mode'))
if config.safe_get('zoning_mode') == 'fabric':
LOG.debug("FC Zone Manager enabled.")
- zm = fc_zone_manager.ZoneManager(configuration=config)
+ zm = fc_zone_manager.ZoneManager()
LOG.info(_LI("Using FC Zone Manager %(zm_version)s,"
" Driver %(drv_name)s %(drv_version)s.") %
{'zm_version': zm.get_version(),
@@ -53,7 +53,7 @@ def create_lookup_service():
LOG.debug("zoning mode %s" % config.safe_get('zoning_mode'))
if config.safe_get('zoning_mode') == 'fabric':
LOG.debug("FC Lookup Service enabled.")
- lookup = fc_san_lookup_service.FCSanLookupService(configuration=config)
+ lookup = fc_san_lookup_service.FCSanLookupService()
LOG.info(_LI("Using FC lookup service %s") % lookup.lookup_service)
return lookup
else:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment