From 1fd83e14d28e18569af63ee2882dc174eacec3ac Mon Sep 17 00:00:00 2001 From: Kendall Nelson Date: Wed, 9 Sep 2015 08:21:25 -0500 Subject: [PATCH] Making opt names consistent Wherever there are lists of options being registered, the name of the list needs to be plural to be consistent with all other opt lists being registered elsewhere. This change is necessary for the dynamic generation of cinder.sample.conf. Co-Authored-By: Jacob Gregor Change-Id: I1434a195016a2a595d0205d73a78a60cd94137f8 --- cinder/image/image_utils.py | 10 +++++----- cinder/volume/drivers/dothill/dothill_common.py | 8 ++++---- cinder/volume/drivers/huawei/huawei_driver.py | 6 +++--- cinder/volume/drivers/lenovo/lenovo_common.py | 8 ++++---- cinder/volume/drivers/san/hp/hpmsa_common.py | 8 ++++---- cinder/volume/drivers/tintri.py | 6 +++--- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/cinder/image/image_utils.py b/cinder/image/image_utils.py index 81f521d79..6d59bc743 100644 --- a/cinder/image/image_utils.py +++ b/cinder/image/image_utils.py @@ -46,13 +46,13 @@ from cinder.volume import utils as volume_utils LOG = logging.getLogger(__name__) -image_helper_opt = [cfg.StrOpt('image_conversion_dir', - default='$state_path/conversion', - help='Directory used for temporary storage ' - 'during image conversion'), ] +image_helper_opts = [cfg.StrOpt('image_conversion_dir', + default='$state_path/conversion', + help='Directory used for temporary storage ' + 'during image conversion'), ] CONF = cfg.CONF -CONF.register_opts(image_helper_opt) +CONF.register_opts(image_helper_opts) def qemu_img_info(path, run_as_root=True): diff --git a/cinder/volume/drivers/dothill/dothill_common.py b/cinder/volume/drivers/dothill/dothill_common.py index 6325f1f6f..45affb0b2 100644 --- a/cinder/volume/drivers/dothill/dothill_common.py +++ b/cinder/volume/drivers/dothill/dothill_common.py @@ -30,7 +30,7 @@ from cinder.volume.drivers.dothill import dothill_client as dothill LOG = logging.getLogger(__name__) -common_opt = [ +common_opts = [ cfg.StrOpt('dothill_backend_name', default='A', help="Pool or Vdisk name to use for volume creation."), @@ -50,15 +50,15 @@ common_opt = [ help="DotHill array SSL certificate path."), ] -iscsi_opt = [ +iscsi_opts = [ cfg.ListOpt('dothill_iscsi_ips', default=[], help="List of comma-separated target iSCSI IP addresses."), ] CONF = cfg.CONF -CONF.register_opts(common_opt) -CONF.register_opts(iscsi_opt) +CONF.register_opts(common_opts) +CONF.register_opts(iscsi_opts) class DotHillCommon(object): diff --git a/cinder/volume/drivers/huawei/huawei_driver.py b/cinder/volume/drivers/huawei/huawei_driver.py index b49db23c0..b7d08f80b 100644 --- a/cinder/volume/drivers/huawei/huawei_driver.py +++ b/cinder/volume/drivers/huawei/huawei_driver.py @@ -36,14 +36,14 @@ from cinder.zonemanager import utils as fczm_utils LOG = logging.getLogger(__name__) -huawei_opt = [ +huawei_opts = [ cfg.StrOpt('cinder_huawei_conf_file', default='/etc/cinder/cinder_huawei_conf.xml', help='The configuration file for the Cinder Huawei ' 'driver.')] CONF = cfg.CONF -CONF.register_opts(huawei_opt) +CONF.register_opts(huawei_opts) class HuaweiBaseDriver(driver.VolumeDriver): @@ -55,7 +55,7 @@ class HuaweiBaseDriver(driver.VolumeDriver): msg = _('_instantiate_driver: configuration not found.') raise exception.InvalidInput(reason=msg) - self.configuration.append_config_values(huawei_opt) + self.configuration.append_config_values(huawei_opts) self.xml_file_path = self.configuration.cinder_huawei_conf_file def do_setup(self, context): diff --git a/cinder/volume/drivers/lenovo/lenovo_common.py b/cinder/volume/drivers/lenovo/lenovo_common.py index 95cb91e9b..3bafc7f42 100644 --- a/cinder/volume/drivers/lenovo/lenovo_common.py +++ b/cinder/volume/drivers/lenovo/lenovo_common.py @@ -19,7 +19,7 @@ from oslo_config import cfg from cinder.volume.drivers.dothill import dothill_common from cinder.volume.drivers.lenovo import lenovo_client -common_opt = [ +common_opts = [ cfg.StrOpt('lenovo_backend_name', default='A', help="Pool or Vdisk name to use for volume creation."), @@ -39,15 +39,15 @@ common_opt = [ help="Lenovo array SSL certificate path.") ] -iscsi_opt = [ +iscsi_opts = [ cfg.ListOpt('lenovo_iscsi_ips', default=[], help="List of comma-separated target iSCSI IP addresses."), ] CONF = cfg.CONF -CONF.register_opts(common_opt) -CONF.register_opts(iscsi_opt) +CONF.register_opts(common_opts) +CONF.register_opts(iscsi_opts) class LenovoCommon(dothill_common.DotHillCommon): diff --git a/cinder/volume/drivers/san/hp/hpmsa_common.py b/cinder/volume/drivers/san/hp/hpmsa_common.py index 8c16bc33c..781163092 100644 --- a/cinder/volume/drivers/san/hp/hpmsa_common.py +++ b/cinder/volume/drivers/san/hp/hpmsa_common.py @@ -19,7 +19,7 @@ from oslo_config import cfg from cinder.volume.drivers.dothill import dothill_common from cinder.volume.drivers.san.hp import hpmsa_client -common_opt = [ +common_opts = [ cfg.StrOpt('hpmsa_backend_name', default='A', help="Pool or Vdisk name to use for volume creation."), @@ -40,15 +40,15 @@ common_opt = [ ] -iscsi_opt = [ +iscsi_opts = [ cfg.ListOpt('hpmsa_iscsi_ips', default=[], help="List of comma-separated target iSCSI IP addresses."), ] CONF = cfg.CONF -CONF.register_opts(common_opt) -CONF.register_opts(iscsi_opt) +CONF.register_opts(common_opts) +CONF.register_opts(iscsi_opts) class HPMSACommon(dothill_common.DotHillCommon): diff --git a/cinder/volume/drivers/tintri.py b/cinder/volume/drivers/tintri.py index 063ba9a90..2254c2c87 100644 --- a/cinder/volume/drivers/tintri.py +++ b/cinder/volume/drivers/tintri.py @@ -41,7 +41,7 @@ img_prefix = 'image-' tintri_path = '/tintri/' -tintri_options = [ +tintri_opts = [ cfg.StrOpt('tintri_server_hostname', default=None, help='The hostname (or IP address) for the storage system'), @@ -58,7 +58,7 @@ tintri_options = [ ] CONF = cfg.CONF -CONF.register_opts(tintri_options) +CONF.register_opts(tintri_opts) class TintriDriver(driver.ManageableVD, @@ -78,7 +78,7 @@ class TintriDriver(driver.ManageableVD, self._context = None super(TintriDriver, self).__init__(*args, **kwargs) self._execute_as_root = True - self.configuration.append_config_values(tintri_options) + self.configuration.append_config_values(tintri_opts) def do_setup(self, context): super(TintriDriver, self).do_setup(context) -- 2.45.2