]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Register EMC config options globally
authorDirk Mueller <dirk@dmllr.de>
Wed, 15 Jan 2014 17:23:40 +0000 (18:23 +0100)
committerDirk Mueller <dirk@dmllr.de>
Thu, 16 Jan 2014 16:51:18 +0000 (17:51 +0100)
The registration allows the oslo sample config generator
to detect the config options and extract automatically
a config template.

Change-Id: Ib181d734dddbd9b6a664439286969b832d6536e7

cinder/volume/drivers/emc/emc_smis_common.py
etc/cinder/cinder.conf.sample

index 2a0de7528843fc24ba7d43f1ec4812b7bc3195f5..f5aefeb7bcea44e96e73d090c3a914d322ff1ed7 100644 (file)
@@ -42,6 +42,15 @@ except ImportError:
 
 CINDER_EMC_CONFIG_FILE = '/etc/cinder/cinder_emc_config.xml'
 
+emc_opts = [
+    cfg.StrOpt('cinder_emc_config_file',
+               default=CINDER_EMC_CONFIG_FILE,
+               help='use this file for cinder emc plugin '
+                    'config data'), ]
+
+
+CONF.register_opts(emc_opts)
+
 
 class EMCSMISCommon():
     """Common code that can be used by ISCSI and FC drivers."""
@@ -55,15 +64,9 @@ class EMCSMISCommon():
              'volume_backend_name': None}
 
     def __init__(self, prtcl, configuration=None):
-
-        opt = cfg.StrOpt('cinder_emc_config_file',
-                         default=CINDER_EMC_CONFIG_FILE,
-                         help='use this file for cinder emc plugin '
-                         'config data')
-        CONF.register_opt(opt)
         self.protocol = prtcl
         self.configuration = configuration
-        self.configuration.append_config_values([opt])
+        self.configuration.append_config_values(emc_opts)
 
         ip, port = self._get_ecom_server()
         self.user, self.passwd = self._get_ecom_cred()
index 3caf3eeaca85bb611cd005eef056bfb12560fb73..f50d1dd312c7e8671fc972dabbba22c9944d5b9c 100644 (file)
 #coraid_repository_key=coraid_repository
 
 
+#
+# Options defined in cinder.volume.drivers.emc.emc_smis_common
+#
+
+# use this file for cinder emc plugin config data (string
+# value)
+#cinder_emc_config_file=/etc/cinder/cinder_emc_config.xml
+
+
 #
 # Options defined in cinder.volume.drivers.eqlx
 #