Discussion:
[Libstoragemgmt-devel] [PATCH] C and Python library: Changes on lsm.Disk
Gris Ge
2014-06-09 15:13:04 UTC
Permalink
* Added constants:
* Python
* lsm.Disk.DISK_TYPE_LUN
* lsm.Pool.MEMBER_TYPE_DISK_LUN
# Using remote LUN to create pool is not "Volume Pool" of LSM.
# The "Volume Pool" is defined as "Pool created from local volumes"
* C
* LSM_DISK_TYPE_LUN
* LSM_DISK_TYPE_NL_SAS
* LSM_DISK_TYPE_HDD
* LSM_DISK_TYPE_SSD
* LSM_DISK_TYPE_HYBRID
* LSM_DISK_BLOCK_SIZE_NOT_FOUND
* LSM_DISK_BLOCK_COUNT_NOT_FOUND
* LSM_POOL_MEMBER_TYPE_DISK_LUN
* Removed constants:
* lsm.Disk.STATUS_RECONSTRUCTING (Python)
* LSM_DISK_STATUS_RECONSTRUCTING (C)
# Disk should not holding status of a pool. The lsm.Disk.status should
# only containing physical health of itself.

* Synced ONTAP plugin for these changes.
* Synced lsmcli for these changes.
* "make check" passed.

Signed-off-by: Gris Ge <***@redhat.com>
---
.../include/libstoragemgmt/libstoragemgmt_types.h | 13 +++-
c_binding/lsm_mgmt.cpp | 1 +
plugin/ontap/ontap.py | 6 +-
python_binding/lsm/_data.py | 86 +++++-----------------
tools/lsmcli/data_display.py | 4 +-
5 files changed, 35 insertions(+), 75 deletions(-)

diff --git a/c_binding/include/libstoragemgmt/libstoragemgmt_types.h b/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
index 8484a13..3899dba 100644
--- a/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
+++ b/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
@@ -230,7 +230,12 @@ typedef enum {
LSM_DISK_TYPE_SAS = 5,
LSM_DISK_TYPE_FC = 6,
LSM_DISK_TYPE_SOP = 7,
- LSM_DISK_TYPE_SCSI = 8
+ LSM_DISK_TYPE_SCSI = 8,
+ LSM_DISK_TYPE_LUN = 9,
+ LSM_DISK_TYPE_NL_SAS = 51,
+ LSM_DISK_TYPE_HDD = 52,
+ LSM_DISK_TYPE_SSD = 53,
+ LSM_DISK_TYPE_HYBRID = 54,
} lsm_disk_type;

/**
@@ -248,8 +253,9 @@ typedef enum {
#define LSM_DISK_STATUS_STOPPING 0x0000000000000040
#define LSM_DISK_STATUS_STOPPED 0x0000000000000080
#define LSM_DISK_STATUS_INITIALIZING 0x0000000000000100
-#define LSM_DISK_STATUS_RECONSTRUCTING 0x0000000000000200

+#define LSM_DISK_BLOCK_SIZE_NOT_FOUND -1
+#define LSM_DISK_BLOCK_COUNT_NOT_FOUND -1

#define LSM_POOL_STATUS_UNKNOWN 0x0000000000000001
#define LSM_POOL_STATUS_OK 0x0000000000000002
@@ -291,7 +297,8 @@ typedef enum {
LSM_POOL_MEMBER_TYPE_DISK_NL_SAS = 17,
LSM_POOL_MEMBER_TYPE_DISK_HDD = 18,
LSM_POOL_MEMBER_TYPE_DISK_SSD = 19,
- LSM_POOL_MEMBER_TYPE_DISK_HYBRID = 110
+ LSM_POOL_MEMBER_TYPE_DISK_HYBRID = 110,
+ LSM_POOL_MEMBER_TYPE_DISK_LUN = 111
} lsm_pool_member_type;

typedef enum {
diff --git a/c_binding/lsm_mgmt.cpp b/c_binding/lsm_mgmt.cpp
index 54bdc33..226ceeb 100644
--- a/c_binding/lsm_mgmt.cpp
+++ b/c_binding/lsm_mgmt.cpp
@@ -940,6 +940,7 @@ static int valid_pool_member_type(lsm_pool_member_type validate)
case (LSM_POOL_MEMBER_TYPE_DISK_HDD):
case (LSM_POOL_MEMBER_TYPE_DISK_SSD):
case (LSM_POOL_MEMBER_TYPE_DISK_HYBRID):
+ case (LSM_POOL_MEMBER_TYPE_DISK_LUN):
break;
default:
return 0;
diff --git a/plugin/ontap/ontap.py b/plugin/ontap/ontap.py
index a242668..ca3aed2 100644
--- a/plugin/ontap/ontap.py
+++ b/plugin/ontap/ontap.py
@@ -226,7 +226,7 @@ class Ontap(IStorageAreaNetwork, INfs):
def _disk_type(netapp_disk_type):
conv = {'ATA': Disk.DISK_TYPE_ATA, 'BSAS': Disk.DISK_TYPE_SAS,
'EATA': Disk.DISK_TYPE_ATA, 'FCAL': Disk.DISK_TYPE_FC,
- 'FSAS': Disk.DISK_TYPE_SAS, 'LUN': Disk.DISK_TYPE_OTHER,
+ 'FSAS': Disk.DISK_TYPE_SAS, 'LUN': Disk.DISK_TYPE_LUN,
'SAS': Disk.DISK_TYPE_SAS, 'SATA': Disk.DISK_TYPE_SATA,
'SCSI': Disk.DISK_TYPE_SCSI, 'SSD': Disk.DISK_TYPE_SSD,
'XATA': Disk.DISK_TYPE_ATA, 'XSAS': Disk.DISK_TYPE_SAS,
@@ -261,7 +261,9 @@ class Ontap(IStorageAreaNetwork, INfs):
elif rs == 'zeroing':
status = Disk.STATUS_INITIALIZING
elif rs == 'reconstructing':
- status = Disk.STATUS_RECONSTRUCTING
+ # "reconstructing' should be a pool status, not disk status.
+ # disk under reconstructing should be considered as OK.
+ status = Disk.STATUS_OK

if 'is-prefailed' in na_disk and na_disk['is-prefailed'] == 'true':
status = Disk.STATUS_PREDICTIVE_FAILURE
diff --git a/python_binding/lsm/_data.py b/python_binding/lsm/_data.py
index dbb293d..4cc52cc 100644
--- a/python_binding/lsm/_data.py
+++ b/python_binding/lsm/_data.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2013 Red Hat, Inc.
+# Copyright (C) 2011-2014 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
@@ -14,6 +14,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# Author: tasleson
+# Gris Ge <***@redhat.com>

from abc import ABCMeta as _ABCMeta

@@ -203,6 +204,7 @@ class Initiator(IData):
@default_property('status', doc="Enumerated status")
@default_property('system_id', doc="System identifier")
@default_property("optional_data", doc="Optional data")
+@default_property("plugin_data", doc="Private plugin data")
class Disk(IData):
"""
Represents a disk.
@@ -216,16 +218,16 @@ class Disk(IData):
BLOCK_COUNT_NOT_FOUND = -1
BLOCK_SIZE_NOT_FOUND = -1

- # Disk Type, using DMTF 2.31.0+ CIM_DiskDrive['InterconnectType']
DISK_TYPE_UNKNOWN = 0
DISK_TYPE_OTHER = 1
DISK_TYPE_NOT_APPLICABLE = 2
- DISK_TYPE_ATA = 3 # IDE disk is seldomly used.
+ DISK_TYPE_ATA = 3 # IDE disk which is seldomly used.
DISK_TYPE_SATA = 4
DISK_TYPE_SAS = 5
DISK_TYPE_FC = 6
- DISK_TYPE_SOP = 7 # SCSI over PCIe, often holding SSD
+ DISK_TYPE_SOP = 7 # SCSI over PCIe(SSD)
DISK_TYPE_SCSI = 8
+ DISK_TYPE_LUN = 9 # Remote LUN was treated as a disk.

# Due to complesity of disk types, we are defining these beside DMTF
# standards:
@@ -237,64 +239,21 @@ class Disk(IData):
DISK_TYPE_SSD = 53 # Solid State Drive
DISK_TYPE_HYBRID = 54 # uses a combination of HDD and SSD

- MAX_DISK_STATUS_BITS = 64
- # Disk status could be any combination of these status.
STATUS_UNKNOWN = 1 << 0
- # UNKNOWN:
- # Failed to query out the status of Disk.
STATUS_OK = 1 << 1
- # OK:
- # Disk is accessible with no issue.
STATUS_OTHER = 1 << 2
- # OTHER:
- # Should explain in Disk.status_info for detail.
STATUS_PREDICTIVE_FAILURE = 1 << 3
- # PREDICTIVE_FAILURE:
- # Disk is in unstable state and will predictive fail.
STATUS_ERROR = 1 << 4
- # ERROR:
- # Disk data is not accessible due to hardware issue or connection error.
STATUS_OFFLINE = 1 << 5
- # OFFLINE:
- # Disk is connected but disabled by array for internal issue
- # Should explain in Disk.status_info for reason.
STATUS_STARTING = 1 << 6
- # STARTING:
- # Disk is reviving from STOPPED status. Disk is not accessible.
STATUS_STOPPING = 1 << 7
- # STOPPING:
- # Disk is stopping by administrator. Disk is not accessible.
STATUS_STOPPED = 1 << 8
- # STOPPING:
- # Disk is stopped by administrator. Disk is not accessible.
STATUS_INITIALIZING = 1 << 9
- # INITIALIZING:
- # Disk is in initialing state.
- # Mostly shown when new disk inserted or creating spare disk.
- STATUS_RECONSTRUCTING = 1 << 10
- # RECONSTRUCTING:
- # Disk is in reconstructing date from other RAID member.
- # Should explain progress in Disk.status_info
-
- OPT_PROPERTIES = ['sn', 'part_num', 'vendor', 'model', 'status_info',
- 'owner_ctrler_id']
-
- def _value_convert(self, key_name, value, human, enum_as_number,
- list_convert):
- if enum_as_number is False:
- if key_name == 'status':
- value = self.status_to_str(value)
- elif key_name == 'disk_type':
- value = self.disk_type_to_str(value)
- if human:
- if key_name == 'size_bytes':
- value = sh(value, human)
- elif key_name == 'block_size':
- value = sh(value, human)
- return value
+
+ OPT_PROPERTIES = ['sn', 'part_num', 'vendor', 'model']

def __init__(self, _id, _name, _disk_type, _block_size, _num_of_blocks,
- _status, _system_id, _optional_data=None):
+ _status, _system_id, _optional_data=None, _plugin_data=None):
self._id = _id
self._name = _name
self._disk_type = _disk_type
@@ -302,20 +261,9 @@ class Disk(IData):
self._num_of_blocks = _num_of_blocks
self._status = _status
self._system_id = _system_id
-
- if _optional_data is None:
- self._optional_data = OptionalData()
- else:
- #Make sure the properties only contain ones we permit
- allowed = set(Disk.OPT_PROPERTIES)
- actual = set(_optional_data.list())
-
- if actual <= allowed:
- self._optional_data = _optional_data
- else:
- raise LsmError(ErrorNumber.INVALID_ARGUMENT,
- "Property keys are invalid: %s" %
- "".join(actual - allowed))
+ self._optional_data = _check_opt_data(_optional_data,
+ Disk.OPT_PROPERTIES)
+ self._plugin_data = _plugin_data

@property
def size_bytes(self):
@@ -334,10 +282,10 @@ class Disk(IData):
@default_property('block_size', doc="Volume block size")
@default_property('num_of_blocks', doc="Number of blocks")
@default_property('status', doc="Enumerated volume status")
-@default_property('system_id', "System identifier")
-@default_property('pool_id', "Pool identifier")
-@default_property("optional_data", "Optional data")
-@default_property("plugin_data", "Private plugin data")
+@default_property('system_id', doc="System identifier")
+@default_property('pool_id', doc="Pool identifier")
+@default_property("optional_data", doc="Optional data")
+@default_property("plugin_data", doc="Private plugin data")
class Volume(IData):
"""
Represents a volume.
@@ -548,6 +496,7 @@ class Pool(IData):
MEMBER_TYPE_DISK_HDD = 18
MEMBER_TYPE_DISK_SSD = 19
MEMBER_TYPE_DISK_HYBRID = 110
+ MEMBER_TYPE_DISK_LUN = 111

MEMBER_TYPE_POOL = 2
MEMBER_TYPE_VOLUME = 3
@@ -565,6 +514,7 @@ class Pool(IData):
MEMBER_TYPE_DISK_HDD: Disk.DISK_TYPE_HDD,
MEMBER_TYPE_DISK_SSD: Disk.DISK_TYPE_SSD,
MEMBER_TYPE_DISK_HYBRID: Disk.DISK_TYPE_HYBRID,
+ MEMBER_TYPE_DISK_LUN: Disk.DISK_TYPE_LUN,
}

@staticmethod
diff --git a/tools/lsmcli/data_display.py b/tools/lsmcli/data_display.py
index 10f569b..05eda29 100644
--- a/tools/lsmcli/data_display.py
+++ b/tools/lsmcli/data_display.py
@@ -265,11 +265,12 @@ _DISK_TYPE_CONV = {
Disk.DISK_TYPE_SATA: 'SATA',
Disk.DISK_TYPE_SAS: 'SAS',
Disk.DISK_TYPE_FC: 'FC',
- Disk.DISK_TYPE_SOP: 'SOP',
+ Disk.DISK_TYPE_SOP: 'SCSI Over PCI-E(SSD)',
Disk.DISK_TYPE_NL_SAS: 'NL_SAS',
Disk.DISK_TYPE_HDD: 'HDD',
Disk.DISK_TYPE_SSD: 'SSD',
Disk.DISK_TYPE_HYBRID: 'HYBRID',
+ Disk.DISK_TYPE_LUN: 'Remote LUN',
}


@@ -288,7 +289,6 @@ _DISK_STATUS_CONV = {
Disk.STATUS_STOPPING: 'STOPPING',
Disk.STATUS_STOPPED: 'STOPPED',
Disk.STATUS_INITIALIZING: 'INITIALIZING',
- Disk.STATUS_RECONSTRUCTING: 'RECONSTRUCTING',
}
--
1.8.3.1
Tony Asleson
2014-06-09 15:51:01 UTC
Permalink
Patch looks good, when will commit after we get other patches committed.

Thanks,
Tony
Post by Gris Ge
* Python
* lsm.Disk.DISK_TYPE_LUN
* lsm.Pool.MEMBER_TYPE_DISK_LUN
# Using remote LUN to create pool is not "Volume Pool" of LSM.
# The "Volume Pool" is defined as "Pool created from local volumes"
* C
* LSM_DISK_TYPE_LUN
* LSM_DISK_TYPE_NL_SAS
* LSM_DISK_TYPE_HDD
* LSM_DISK_TYPE_SSD
* LSM_DISK_TYPE_HYBRID
* LSM_DISK_BLOCK_SIZE_NOT_FOUND
* LSM_DISK_BLOCK_COUNT_NOT_FOUND
* LSM_POOL_MEMBER_TYPE_DISK_LUN
* lsm.Disk.STATUS_RECONSTRUCTING (Python)
* LSM_DISK_STATUS_RECONSTRUCTING (C)
# Disk should not holding status of a pool. The lsm.Disk.status should
# only containing physical health of itself.
* Synced ONTAP plugin for these changes.
* Synced lsmcli for these changes.
* "make check" passed.
---
.../include/libstoragemgmt/libstoragemgmt_types.h | 13 +++-
c_binding/lsm_mgmt.cpp | 1 +
plugin/ontap/ontap.py | 6 +-
python_binding/lsm/_data.py | 86 +++++-----------------
tools/lsmcli/data_display.py | 4 +-
5 files changed, 35 insertions(+), 75 deletions(-)
diff --git a/c_binding/include/libstoragemgmt/libstoragemgmt_types.h b/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
index 8484a13..3899dba 100644
--- a/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
+++ b/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
@@ -230,7 +230,12 @@ typedef enum {
LSM_DISK_TYPE_SAS = 5,
LSM_DISK_TYPE_FC = 6,
LSM_DISK_TYPE_SOP = 7,
- LSM_DISK_TYPE_SCSI = 8
+ LSM_DISK_TYPE_SCSI = 8,
+ LSM_DISK_TYPE_LUN = 9,
+ LSM_DISK_TYPE_NL_SAS = 51,
+ LSM_DISK_TYPE_HDD = 52,
+ LSM_DISK_TYPE_SSD = 53,
+ LSM_DISK_TYPE_HYBRID = 54,
} lsm_disk_type;
/**
@@ -248,8 +253,9 @@ typedef enum {
#define LSM_DISK_STATUS_STOPPING 0x0000000000000040
#define LSM_DISK_STATUS_STOPPED 0x0000000000000080
#define LSM_DISK_STATUS_INITIALIZING 0x0000000000000100
-#define LSM_DISK_STATUS_RECONSTRUCTING 0x0000000000000200
+#define LSM_DISK_BLOCK_SIZE_NOT_FOUND -1
+#define LSM_DISK_BLOCK_COUNT_NOT_FOUND -1
#define LSM_POOL_STATUS_UNKNOWN 0x0000000000000001
#define LSM_POOL_STATUS_OK 0x0000000000000002
@@ -291,7 +297,8 @@ typedef enum {
LSM_POOL_MEMBER_TYPE_DISK_NL_SAS = 17,
LSM_POOL_MEMBER_TYPE_DISK_HDD = 18,
LSM_POOL_MEMBER_TYPE_DISK_SSD = 19,
- LSM_POOL_MEMBER_TYPE_DISK_HYBRID = 110
+ LSM_POOL_MEMBER_TYPE_DISK_HYBRID = 110,
+ LSM_POOL_MEMBER_TYPE_DISK_LUN = 111
} lsm_pool_member_type;
typedef enum {
diff --git a/c_binding/lsm_mgmt.cpp b/c_binding/lsm_mgmt.cpp
index 54bdc33..226ceeb 100644
--- a/c_binding/lsm_mgmt.cpp
+++ b/c_binding/lsm_mgmt.cpp
@@ -940,6 +940,7 @@ static int valid_pool_member_type(lsm_pool_member_type validate)
break;
return 0;
diff --git a/plugin/ontap/ontap.py b/plugin/ontap/ontap.py
index a242668..ca3aed2 100644
--- a/plugin/ontap/ontap.py
+++ b/plugin/ontap/ontap.py
conv = {'ATA': Disk.DISK_TYPE_ATA, 'BSAS': Disk.DISK_TYPE_SAS,
'EATA': Disk.DISK_TYPE_ATA, 'FCAL': Disk.DISK_TYPE_FC,
- 'FSAS': Disk.DISK_TYPE_SAS, 'LUN': Disk.DISK_TYPE_OTHER,
+ 'FSAS': Disk.DISK_TYPE_SAS, 'LUN': Disk.DISK_TYPE_LUN,
'SAS': Disk.DISK_TYPE_SAS, 'SATA': Disk.DISK_TYPE_SATA,
'SCSI': Disk.DISK_TYPE_SCSI, 'SSD': Disk.DISK_TYPE_SSD,
'XATA': Disk.DISK_TYPE_ATA, 'XSAS': Disk.DISK_TYPE_SAS,
status = Disk.STATUS_INITIALIZING
- status = Disk.STATUS_RECONSTRUCTING
+ # "reconstructing' should be a pool status, not disk status.
+ # disk under reconstructing should be considered as OK.
+ status = Disk.STATUS_OK
status = Disk.STATUS_PREDICTIVE_FAILURE
diff --git a/python_binding/lsm/_data.py b/python_binding/lsm/_data.py
index dbb293d..4cc52cc 100644
--- a/python_binding/lsm/_data.py
+++ b/python_binding/lsm/_data.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2013 Red Hat, Inc.
+# Copyright (C) 2011-2014 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
@@ -14,6 +14,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# Author: tasleson
from abc import ABCMeta as _ABCMeta
@default_property('status', doc="Enumerated status")
@default_property('system_id', doc="System identifier")
@default_property("optional_data", doc="Optional data")
"""
Represents a disk.
BLOCK_COUNT_NOT_FOUND = -1
BLOCK_SIZE_NOT_FOUND = -1
- # Disk Type, using DMTF 2.31.0+ CIM_DiskDrive['InterconnectType']
DISK_TYPE_UNKNOWN = 0
DISK_TYPE_OTHER = 1
DISK_TYPE_NOT_APPLICABLE = 2
- DISK_TYPE_ATA = 3 # IDE disk is seldomly used.
+ DISK_TYPE_ATA = 3 # IDE disk which is seldomly used.
DISK_TYPE_SATA = 4
DISK_TYPE_SAS = 5
DISK_TYPE_FC = 6
- DISK_TYPE_SOP = 7 # SCSI over PCIe, often holding SSD
+ DISK_TYPE_SOP = 7 # SCSI over PCIe(SSD)
DISK_TYPE_SCSI = 8
+ DISK_TYPE_LUN = 9 # Remote LUN was treated as a disk.
# Due to complesity of disk types, we are defining these beside DMTF
DISK_TYPE_SSD = 53 # Solid State Drive
DISK_TYPE_HYBRID = 54 # uses a combination of HDD and SSD
- MAX_DISK_STATUS_BITS = 64
- # Disk status could be any combination of these status.
STATUS_UNKNOWN = 1 << 0
- # Failed to query out the status of Disk.
STATUS_OK = 1 << 1
- # Disk is accessible with no issue.
STATUS_OTHER = 1 << 2
- # Should explain in Disk.status_info for detail.
STATUS_PREDICTIVE_FAILURE = 1 << 3
- # Disk is in unstable state and will predictive fail.
STATUS_ERROR = 1 << 4
- # Disk data is not accessible due to hardware issue or connection error.
STATUS_OFFLINE = 1 << 5
- # Disk is connected but disabled by array for internal issue
- # Should explain in Disk.status_info for reason.
STATUS_STARTING = 1 << 6
- # Disk is reviving from STOPPED status. Disk is not accessible.
STATUS_STOPPING = 1 << 7
- # Disk is stopping by administrator. Disk is not accessible.
STATUS_STOPPED = 1 << 8
- # Disk is stopped by administrator. Disk is not accessible.
STATUS_INITIALIZING = 1 << 9
- # Disk is in initialing state.
- # Mostly shown when new disk inserted or creating spare disk.
- STATUS_RECONSTRUCTING = 1 << 10
- # Disk is in reconstructing date from other RAID member.
- # Should explain progress in Disk.status_info
-
- OPT_PROPERTIES = ['sn', 'part_num', 'vendor', 'model', 'status_info',
- 'owner_ctrler_id']
-
- def _value_convert(self, key_name, value, human, enum_as_number,
- value = self.status_to_str(value)
- value = self.disk_type_to_str(value)
- value = sh(value, human)
- value = sh(value, human)
- return value
+
+ OPT_PROPERTIES = ['sn', 'part_num', 'vendor', 'model']
def __init__(self, _id, _name, _disk_type, _block_size, _num_of_blocks,
self._id = _id
self._name = _name
self._disk_type = _disk_type
self._num_of_blocks = _num_of_blocks
self._status = _status
self._system_id = _system_id
-
- self._optional_data = OptionalData()
- #Make sure the properties only contain ones we permit
- allowed = set(Disk.OPT_PROPERTIES)
- actual = set(_optional_data.list())
-
- self._optional_data = _optional_data
- raise LsmError(ErrorNumber.INVALID_ARGUMENT,
- "Property keys are invalid: %s" %
- "".join(actual - allowed))
+ self._optional_data = _check_opt_data(_optional_data,
+ Disk.OPT_PROPERTIES)
+ self._plugin_data = _plugin_data
@property
@default_property('block_size', doc="Volume block size")
@default_property('num_of_blocks', doc="Number of blocks")
@default_property('status', doc="Enumerated volume status")
"""
Represents a volume.
MEMBER_TYPE_DISK_HDD = 18
MEMBER_TYPE_DISK_SSD = 19
MEMBER_TYPE_DISK_HYBRID = 110
+ MEMBER_TYPE_DISK_LUN = 111
MEMBER_TYPE_POOL = 2
MEMBER_TYPE_VOLUME = 3
MEMBER_TYPE_DISK_HDD: Disk.DISK_TYPE_HDD,
MEMBER_TYPE_DISK_SSD: Disk.DISK_TYPE_SSD,
MEMBER_TYPE_DISK_HYBRID: Disk.DISK_TYPE_HYBRID,
+ MEMBER_TYPE_DISK_LUN: Disk.DISK_TYPE_LUN,
}
@staticmethod
diff --git a/tools/lsmcli/data_display.py b/tools/lsmcli/data_display.py
index 10f569b..05eda29 100644
--- a/tools/lsmcli/data_display.py
+++ b/tools/lsmcli/data_display.py
@@ -265,11 +265,12 @@ _DISK_TYPE_CONV = {
Disk.DISK_TYPE_SATA: 'SATA',
Disk.DISK_TYPE_SAS: 'SAS',
Disk.DISK_TYPE_FC: 'FC',
- Disk.DISK_TYPE_SOP: 'SOP',
+ Disk.DISK_TYPE_SOP: 'SCSI Over PCI-E(SSD)',
Disk.DISK_TYPE_NL_SAS: 'NL_SAS',
Disk.DISK_TYPE_HDD: 'HDD',
Disk.DISK_TYPE_SSD: 'SSD',
Disk.DISK_TYPE_HYBRID: 'HYBRID',
+ Disk.DISK_TYPE_LUN: 'Remote LUN',
}
@@ -288,7 +289,6 @@ _DISK_STATUS_CONV = {
Disk.STATUS_STOPPING: 'STOPPING',
Disk.STATUS_STOPPED: 'STOPPED',
Disk.STATUS_INITIALIZING: 'INITIALIZING',
- Disk.STATUS_RECONSTRUCTING: 'RECONSTRUCTING',
}
Loading...