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 <jgregor@us.ibm.com>

Change-Id: I1434a195016a2a595d0205d73a78a60cd94137f8
This commit is contained in:
Kendall Nelson 2015-09-09 08:21:25 -05:00
parent de64f5ad71
commit 1fd83e14d2
6 changed files with 23 additions and 23 deletions

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

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

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

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

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

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