From 0a3c9a24809866b730853825c8cc51f6c06842b0 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Wed, 29 Jun 2016 13:07:30 -0400 Subject: [PATCH] RBD: uppercase rbd_opts for consistency Since the options variable is a constant, it's more consistent with Python's style guide to make it uppercase. See: https://www.python.org/dev/peps/pep-0008/#constants Change-Id: I172dc66d4073e381e20f7aed9fdeaf81ff4fa52e --- cinder/opts.py | 2 +- cinder/volume/drivers/rbd.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cinder/opts.py b/cinder/opts.py index 64c6ca5f2db..6c175366109 100644 --- a/cinder/opts.py +++ b/cinder/opts.py @@ -293,7 +293,7 @@ def list_opts(): cinder_volume_drivers_infortrend_eonstor_ds_cli_commoncli. infortrend_esds_extra_opts, cinder_volume_drivers_hitachi_hnasiscsi.iSCSI_OPTS, - cinder_volume_drivers_rbd.rbd_opts, + cinder_volume_drivers_rbd.RBD_OPTS, cinder_volume_drivers_tintri.tintri_opts, cinder_backup_api.backup_api_opts, cinder_volume_drivers_hitachi_hbsdhorcm.volume_opts, diff --git a/cinder/volume/drivers/rbd.py b/cinder/volume/drivers/rbd.py index 6f26659a73f..44dc3777170 100644 --- a/cinder/volume/drivers/rbd.py +++ b/cinder/volume/drivers/rbd.py @@ -44,7 +44,7 @@ except ImportError: LOG = logging.getLogger(__name__) -rbd_opts = [ +RBD_OPTS = [ cfg.StrOpt('rbd_cluster_name', default='ceph', help='The name of ceph cluster'), @@ -90,7 +90,7 @@ rbd_opts = [ ] CONF = cfg.CONF -CONF.register_opts(rbd_opts) +CONF.register_opts(RBD_OPTS) class RBDImageMetadata(object): @@ -272,7 +272,7 @@ class RBDDriver(driver.TransferVD, driver.ExtendVD, def __init__(self, *args, **kwargs): super(RBDDriver, self).__init__(*args, **kwargs) - self.configuration.append_config_values(rbd_opts) + self.configuration.append_config_values(RBD_OPTS) self._stats = {} # allow overrides for testing self.rados = kwargs.get('rados', rados)