Move the path of the DRBD status file to the Constants file
authorMichele Tartara <mtartara@google.com>
Wed, 12 Dec 2012 08:45:29 +0000 (09:45 +0100)
committerMichele Tartara <mtartara@google.com>
Wed, 12 Dec 2012 12:08:38 +0000 (13:08 +0100)
It will be needed by the DRBD data collector, that will be added shortly.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

lib/bdev.py
lib/constants.py

index 6c20b4b..9221d0c 100644 (file)
@@ -1054,7 +1054,7 @@ class BaseDRBD(BlockDev): # pylint: disable=W0223
   _ST_WFCONNECTION = "WFConnection"
   _ST_CONNECTED = "Connected"
 
-  _STATUS_FILE = "/proc/drbd"
+  _STATUS_FILE = constants.DRBD_STATUS_FILE
   _USERMODE_HELPER_FILE = "/sys/module/drbd/parameters/usermode_helper"
 
   @staticmethod
index e629175..de13c9d 100644 (file)
@@ -406,6 +406,7 @@ LDS_BLOCK = frozenset([LD_LV, LD_DRBD8, LD_BLOCKDEV, LD_RBD])
 # drbd constants
 DRBD_HMAC_ALG = "md5"
 DRBD_NET_PROTOCOL = "C"
+DRBD_STATUS_FILE = "/proc/drbd"
 
 #: Size of DRBD meta block device
 DRBD_META_SIZE = 128