]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
DRBD: Rename a constant to a better name
authorPhilipp Marek <philipp.marek@linbit.com>
Wed, 22 Jul 2015 11:36:24 +0000 (13:36 +0200)
committerPhilipp Marek <philipp.marek@linbit.com>
Wed, 22 Jul 2015 11:37:34 +0000 (13:37 +0200)
As requested in a Icb7347d55dc5b22720269405b6d2b4053c2ad819 review
(https://review.openstack.org/#/c/178573/19..20/cinder/volume/drivers/drbdmanagedrv.py)
constants should consist of uppercase letters only.

Change-Id: I2826fa091b9b7c092c5d436e0a3888cdfa6173a2

cinder/volume/drivers/drbdmanagedrv.py

index fcac7901f16aa9c7c187ea82f321d8f564fdd879..d2790f52c05ed060c4b0c3036a37ef74e1943244 100644 (file)
@@ -63,7 +63,7 @@ CONF = cfg.CONF
 CONF.register_opts(drbd_opts)
 
 
-CINDER_AUX_PROP_id = "cinder-id"
+AUX_PROP_CINDER_VOL_ID = "cinder-id"
 DM_VN_PREFIX = 'CV_'  # sadly 2CV isn't allowed by DRBDmanage
 
 
@@ -188,7 +188,7 @@ class DrbdManageDriver(driver.VolumeDriver):
 
     def _priv_hash_from_volume(self, volume):
         return dm_utils.dict_to_aux_props({
-            CINDER_AUX_PROP_id: volume['id'],
+            AUX_PROP_CINDER_VOL_ID: volume['id'],
         })
 
     def snapshot_name_from_cinder_snapshot(self, snapshot):
@@ -216,7 +216,7 @@ class DrbdManageDriver(driver.VolumeDriver):
                                          self.empty_dict,
                                          0,
                                          dm_utils.dict_to_aux_props(
-                                             {CINDER_AUX_PROP_id: v_uuid}),
+                                             {AUX_PROP_CINDER_VOL_ID: v_uuid}),
                                          self.empty_dict)
         self._check_result(res)
 
@@ -253,7 +253,7 @@ class DrbdManageDriver(driver.VolumeDriver):
                                          self.empty_dict,
                                          0,
                                          dm_utils.dict_to_aux_props(
-                                             {CINDER_AUX_PROP_id: s_uuid}),
+                                             {AUX_PROP_CINDER_VOL_ID: s_uuid}),
                                          self.empty_dict)
         self._check_result(res)