]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Making opt names consistent
authorKendall Nelson <kjnelson@us.ibm.com>
Wed, 9 Sep 2015 13:21:25 +0000 (08:21 -0500)
committerKendall Nelson <kjnelson@us.ibm.com>
Wed, 9 Sep 2015 16:48:54 +0000 (11:48 -0500)
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 <jgregor@us.ibm.com>
Change-Id: I1434a195016a2a595d0205d73a78a60cd94137f8

cinder/image/image_utils.py
cinder/volume/drivers/dothill/dothill_common.py
cinder/volume/drivers/huawei/huawei_driver.py
cinder/volume/drivers/lenovo/lenovo_common.py
cinder/volume/drivers/san/hp/hpmsa_common.py
cinder/volume/drivers/tintri.py

index 81f521d79b542c0529cfff861da5652acd861b2b..6d59bc74303b982c1c80f51be8bf0273bf0cc604 100644 (file)
@@ -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):
index 6325f1f6f6922b4527030bea0b9ace8302293cb1..45affb0b2181e4f7d7aab901dc398a5adbccab52 100644 (file)
@@ -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):
index b49db23c088865d1a27ba98e97e2a6626bbe55d2..b7d08f80b791cd6983b9c0ec535732deff193d26 100644 (file)
@@ -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):
index 95cb91e9bf63946126bdc793be2e23c56ce55b36..3bafc7f42ebbc268949b02c3461cdc9aa7ed8e1b 100644 (file)
@@ -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):
index 8c16bc33cf46c250cb2bb2d4b378930ae5b5d0ce..781163092d35f0d49eb573b51c2688d9b537a5f5 100644 (file)
@@ -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):
index 063ba9a90a89ecdb11ef849a603e6a3dcc662776..2254c2c87e507022446334131288ef1fb2eedc17 100644 (file)
@@ -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)