Discussion:
[Libstoragemgmt-devel] [PATCH] Adding STATUS_PREDICTIVE_FAILURE into lsm.Pool
Gris Ge
2014-05-07 09:06:17 UTC
Permalink
Adding STATUS_PREDICTIVE_FAILURE to lsm.Pool which indicate predictive
failure:

Python:
lsm.Pool.STATUS_PREDICTIVE_FAILURE
C:
LSM_POOL_STATUS_PREDICTIVE_FAILURE


Signed-off-by: Gris Ge <***@redhat.com>
---
c_binding/include/libstoragemgmt/libstoragemgmt_types.h | 2 +-
python_binding/lsm/_data.py | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/c_binding/include/libstoragemgmt/libstoragemgmt_types.h b/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
index d3dd6f0..a197b28 100644
--- a/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
+++ b/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
@@ -229,7 +229,7 @@ typedef enum {
#define LSM_POOL_STATUS_STRESSED 0x0000000000000008
#define LSM_POOL_STATUS_DEGRADED 0x0000000000000010
#define LSM_POOL_STATUS_ERROR 0x0000000000000020
-/*#define LSM_POOL_AVAILABLE 0x0000000000000040 */
+#define LSM_POOL_STATUS_PREDICTIVE_FAILURE 0x0000000000000040
#define LSM_POOL_STATUS_STARTING 0x0000000000000080
#define LSM_POOL_STATUS_STOPPING 0x0000000000000100
#define LSM_POOL_STATUS_STOPPED 0x0000000000000200
diff --git a/python_binding/lsm/_data.py b/python_binding/lsm/_data.py
index 603bf16..3a3657e 100644
--- a/python_binding/lsm/_data.py
+++ b/python_binding/lsm/_data.py
@@ -1069,6 +1069,7 @@ class Pool(IData):
# OFFLINE:
# Pool is not accessible for internal issue.
# Should explain in Pool.status_info for reason.
+ STATUS_PREDICTIVE_FAILURE = 1 << 6
STATUS_STARTING = 1 << 7
# STARTING:
# Pool is reviving from STOPPED status. Pool is not accessible.
--
1.8.3.1
Loading...