Merge "Register EMC config options globally"

This commit is contained in:
Jenkins 2014-01-20 22:11:50 +00:00 committed by Gerrit Code Review
commit 407301e23b
2 changed files with 19 additions and 7 deletions

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

View File

@ -1052,6 +1052,15 @@
#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
#