From 61e062dd958dd0300d1afe220668ea4554e2dc4f Mon Sep 17 00:00:00 2001
From: Michele Tartara <mtartara@google.com>
Date: Wed, 12 Dec 2012 09:45:29 +0100
Subject: [PATCH] Move the path of the DRBD status file to the Constants file

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      | 2 +-
 lib/constants.py | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/bdev.py b/lib/bdev.py
index 6c20b4bbd..9221d0c53 100644
--- a/lib/bdev.py
+++ b/lib/bdev.py
@@ -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
diff --git a/lib/constants.py b/lib/constants.py
index e629175e1..de13c9d0a 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -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
-- 
GitLab