* New status constant:
    Disk.STATUS_FREE
    LSM_DISK_STATUS_FREE

 * In code document(Both in C and Python code):
    New in version 1.2, indicate the whole disk is not holding any data or
    acting as a dedicate spare disk.
    This disk could be assigned as a dedicated spare disk or used for
    creating pool.
    If any spare disk(like those on NetApp ONTAP) does not require
    any explicit action when assigning to pool, it should be treated as free
    disk and marked as STATUS_FREE|STATUS_SPARE_DISK.

 * Future design consideration for sliced RAID system(LVM RAID and EMC VMAX):
    1. Introduce Disk.STATUS_FREE_PARTIAL
    2. Introduce new class:
        DiskSlice
            properties:
                id
                owner_disk_id   # Disk.id
                block_size
                block_count
                start_block
                status          # FREE or SPARE or/and OK

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

diff --git a/c_binding/include/libstoragemgmt/libstoragemgmt_types.h 
b/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
index 562fcff..c5607c1 100644
--- a/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
+++ b/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
@@ -237,6 +237,16 @@ typedef enum {
 #define LSM_DISK_STATUS_MAINTENANCE_MODE            0x0000000000000400
 #define LSM_DISK_STATUS_SPARE_DISK                  0x0000000000000800
 #define LSM_DISK_STATUS_RECONSTRUCT                 0x0000000000001000
+#define LSM_DISK_STATUS_FREE                        0x0000000000002000
+/**^
+ * New in version 1.2, New in version 1.2, indicate the whole disk is not
+ * holding any data or acting as a dedicate spare disk.
+ * This disk could be assigned as a dedicated spare disk or used for creating
+ * pool.
+ * If any spare disk(like those on NetApp ONTAP) does not require any explicit
+ * action when assigning to pool, it should be treated as free disk and marked
+ * as LSM_DISK_STATUS_FREE|LSM_DISK_STATUS_SPARE_DISK.
+ * */
 
 #define LSM_DISK_BLOCK_SIZE_NOT_FOUND               -1
 #define LSM_DISK_BLOCK_COUNT_NOT_FOUND              -1
diff --git a/python_binding/lsm/_data.py b/python_binding/lsm/_data.py
index 6fb2325..23681dd 100644
--- a/python_binding/lsm/_data.py
+++ b/python_binding/lsm/_data.py
@@ -199,6 +199,14 @@ class Disk(IData):
     # Indicate disk is a spare disk.
     STATUS_RECONSTRUCT = 1 << 12
     # Indicate disk is reconstructing data.
+    STATUS_FREE = 1 << 13
+    # New in version 1.2, indicate the whole disk is not holding any data or
+    # acting as a dedicate spare disk.
+    # This disk could be assigned as a dedicated spare disk or used for
+    # creating pool.
+    # If any spare disk(like those on NetApp ONTAP) does not require
+    # any explicit action when assigning to pool, it should be treated as
+    # free disk and marked as STATUS_FREE|STATUS_SPARE_DISK.
 
     def __init__(self, _id, _name, _disk_type, _block_size, _num_of_blocks,
                  _status, _system_id, _plugin_data=None):
-- 
1.8.3.1


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Libstoragemgmt-devel mailing list
Libstoragemgmt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libstoragemgmt-devel

Reply via email to