Discussion:
[Libstoragemgmt-devel] [PATCH 1/6] MegaRAID Plugin: Add missing capability VOLUME_RAID_INFO
Gris Ge
2015-03-17 15:19:04 UTC
Permalink
* Add missing lsm.Capabilities.VOLUME_RAID_INFO.

Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 1 +
1 file changed, 1 insertion(+)

diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index e754cd8..beb68e8 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -255,6 +255,7 @@ class MegaRAID(IPlugin):
cap = Capabilities()
cap.set(Capabilities.DISKS)
cap.set(Capabilities.VOLUMES)
+ cap.set(Capabilities.VOLUME_RAID_INFO)
return cap

def _storcli_exec(self, storcli_cmds, flag_json=True):
--
1.8.3.1
Gris Ge
2015-03-17 15:19:05 UTC
Permalink
* The storcli-1.14.12-1.noarch only support 'show health' command for
Nytro MegaRAID card. This patch change system status query using
'show all' command.

* Use single command 'storcli /c0 show all J' to get all information
to generate lsm.System.

* Status information is extracted from 'Status' section of 'show all' output.

* Append firmware version(firmware package build version) in System.name.
User could compare this version string with LSI webpage for upgrade.

* Tested on Intel and IBM rebranded MegaRAID cards.

Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 65 ++++++++++++++++++++++++---------------------
1 file changed, 35 insertions(+), 30 deletions(-)

diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index beb68e8..111e223 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -300,43 +300,48 @@ class MegaRAID(IPlugin):
return self._storcli_exec(
["show", "ctrlcount"]).get("Controller Count")

- def _lsm_status_of_ctrl(self, ctrl_num):
- ctrl_health_output = self._storcli_exec(
- ["/c%d" % ctrl_num, 'show', 'health', 'all'])
- health_info = ctrl_health_output['Controller Health Info']
+ def _lsm_status_of_ctrl(self, ctrl_show_all_output):
+ lsi_status_info = ctrl_show_all_output['Status']
+ status_info = ''
+ status = System.STATUS_UNKNOWN
+ if lsi_status_info['Controller Status'] == 'Optimal':
+ status = System.STATUS_OK
+ else:
# TODO(Gris Ge): Try pull a disk off to check whether this change.
- if health_info['Overall Health'] == 'GOOD':
- return System.STATUS_OK, ''
-
- return System.STATUS_UNKNOWN, "%s reason code %s" % (
- health_info['Overall Health'],
- health_info['Reason Code'])
-
- def _sys_id_of_ctrl_num(self, ctrl_num, ctrl_show_output=None):
- if ctrl_show_output is None:
- ctrl_show_output = self._storcli_exec(["/c%d" % ctrl_num, "show"])
- sys_id = ctrl_show_output['Serial Number']
- if not sys_id:
- raise LsmError(
- ErrorNumber.PLUGIN_BUG,
- "_sys_id_of_ctrl_num(): Fail to get system id: %s" %
- ctrl_show_output.items())
+ status_info = "%s: " % lsi_status_info['Controller Status']
+ for key_name in lsi_status_info.keys():
+ if key_name == 'Controller Status':
+ continue
+ if lsi_status_info[key_name] != 0 and \
+ lsi_status_info[key_name] != 'No' and \
+ lsi_status_info[key_name] != 'NA':
+ status_info += " %s:%s" % (
+ key_name, lsi_status_info[key_name])
+
+ return status, status_info
+
+ def _sys_id_of_ctrl_num(self, ctrl_num, ctrl_show_all_output=None):
+ if ctrl_show_all_output is None:
+ return self._storcli_exec(
+ ["/c%d" % ctrl_num, "show"])['Serial Number']
else:
- return sys_id
+ return ctrl_show_all_output['Basics']['Serial Number']

@_handle_errors
def systems(self, flags=0):
rc_lsm_syss = []
for ctrl_num in range(self._ctrl_count()):
- ctrl_show_output = self._storcli_exec(["/c%d" % ctrl_num, "show"])
- sys_id = self._sys_id_of_ctrl_num(ctrl_num, ctrl_show_output)
- sys_name = "%s %s %s:%s:%s" % (
- ctrl_show_output['Product Name'],
- ctrl_show_output['Host Interface'],
- format(ctrl_show_output['Bus Number'], '02x'),
- format(ctrl_show_output['Device Number'], '02x'),
- format(ctrl_show_output['Function Number'], '02x'))
- (status, status_info) = self._lsm_status_of_ctrl(ctrl_num)
+ ctrl_show_all_output = self._storcli_exec(
+ ["/c%d" % ctrl_num, "show", "all"])
+ sys_id = self._sys_id_of_ctrl_num(ctrl_num, ctrl_show_all_output)
+ sys_name = "%s %s %s ver: %s" % (
+ ctrl_show_all_output['Basics']['Model'],
+ ctrl_show_all_output['Bus']['Host Interface'],
+ ctrl_show_all_output['Basics']['PCI Address'],
+ ctrl_show_all_output['Version']['Firmware Package Build'],
+ )
+ (status, status_info) = self._lsm_status_of_ctrl(
+ ctrl_show_all_output)
plugin_data = "/c%d"
# Since PCI slot sequence might change.
# This string just stored for quick system verification.
--
1.8.3.1
Gris Ge
2015-03-17 15:19:06 UTC
Permalink
* Changed these methods to use 'flags=Client.FLAG_RSVD' as other methods do:
* capabilities()
* systems()
* disks()
* volumes()

Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index 111e223..7f79d34 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -27,9 +27,6 @@ from lsm import (uri_parse, search_property, size_human_2_size_bytes,

from lsm.plugin.megaraid.utils import cmd_exec, ExecError

-_FLAG_RSVD = Client.FLAG_RSVD
-
-
# Naming scheme
# mega_sys_path /c0
# mega_disk_path /c0/e64/s0
@@ -246,7 +243,7 @@ class MegaRAID(IPlugin):
raise LsmError(ErrorNumber.NO_SUPPORT, "Not supported yet")

@_handle_errors
- def capabilities(self, system, flags=_FLAG_RSVD):
+ def capabilities(self, system, flags=Client.FLAG_RSVD):
cur_lsm_syss = self.systems()
if system.id not in list(s.id for s in cur_lsm_syss):
raise LsmError(
@@ -328,7 +325,7 @@ class MegaRAID(IPlugin):
return ctrl_show_all_output['Basics']['Serial Number']

@_handle_errors
- def systems(self, flags=0):
+ def systems(self, flags=Client.FLAG_RSVD):
rc_lsm_syss = []
for ctrl_num in range(self._ctrl_count()):
ctrl_show_all_output = self._storcli_exec(
@@ -352,7 +349,8 @@ class MegaRAID(IPlugin):
return rc_lsm_syss

@_handle_errors
- def disks(self, search_key=None, search_value=None, flags=_FLAG_RSVD):
+ def disks(self, search_key=None, search_value=None,
+ flags=Client.FLAG_RSVD):
rc_lsm_disks = []
mega_disk_path_regex = re.compile(
r"^Drive (\/c[0-9]+\/e[0-9]+\/s[0-9]+) - Detailed Information$")
@@ -470,7 +468,8 @@ class MegaRAID(IPlugin):
sys_id, pool_id, plugin_data)

@_handle_errors
- def volumes(self, search_key=None, search_value=None, flags=0):
+ def volumes(self, search_key=None, search_value=None,
+ flags=Client.FLAG_RSVD):
lsm_vols = []
for ctrl_num in range(self._ctrl_count()):
vol_show_output = self._storcli_exec(
--
1.8.3.1
Gris Ge
2015-03-17 15:19:07 UTC
Permalink
* It's a copy/paste issue. Changed the constant name
from _DEFAULT_MDADM_BIN_PATHS to _DEFAULT_STORCLI_BIN_PATHS

Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index 7f79d34..6f74873 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -182,7 +182,7 @@ def _mega_raid_type_to_lsm(vd_basic_info, vd_prop_info):


class MegaRAID(IPlugin):
- _DEFAULT_MDADM_BIN_PATHS = [
+ _DEFAULT_STORCLI_BIN_PATHS = [
"/opt/MegaRAID/storcli/storcli64", "/opt/MegaRAID/storcli/storcli"]
_CMD_JSON_OUTPUT_SWITCH = 'J'

@@ -191,9 +191,9 @@ class MegaRAID(IPlugin):

def _find_storcli(self):
"""
- Try _DEFAULT_MDADM_BIN_PATHS
+ Try _DEFAULT_STORCLI_BIN_PATHS
"""
- for cur_path in MegaRAID._DEFAULT_MDADM_BIN_PATHS:
+ for cur_path in MegaRAID._DEFAULT_STORCLI_BIN_PATHS:
if os.path.lexists(cur_path):
self._storcli_bin = cur_path
--
1.8.3.1
Gris Ge
2015-03-17 15:19:09 UTC
Permalink
* Changed this regex as pylint suggested:
from: "^([0-9\.]+) ([EPTGMK])B$"
to: "^([0-9.]+) ([EPTGMK])B$"

Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index fa84cd7..cc4e238 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -117,7 +117,7 @@ def _mega_size_to_lsm(mega_size):
LSI Using 'TB, GB, MB, KB' and etc, for LSM, they are 'TiB' and etc.
Return int of block bytes
"""
- re_regex = re.compile("^([0-9\.]+) ([EPTGMK])B$")
+ re_regex = re.compile("^([0-9.]+) ([EPTGMK])B$")
re_match = re_regex.match(mega_size)
if re_match:
return size_human_2_size_bytes(
--
1.8.3.1
Gris Ge
2015-03-17 15:19:08 UTC
Permalink
* Remove unused import of strip.

Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 1 -
1 file changed, 1 deletion(-)

diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index 6f74873..fa84cd7 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -17,7 +17,6 @@

import os
import json
-from string import strip
import re
import errno
--
1.8.3.1
Gris Ge
2015-03-18 09:32:25 UTC
Permalink
* Bug fixes patches:
* MegaRAID Plugin: Add missing capability VOLUME_RAID_INFO
* MegaRAID Plugin: Fix incorrect system status query.

* Code tidy up patches:
* MegaRAID Plugin: Use Client.FLAG_RSVD instead of flags=0.
* MegaRAID Plugin: Fix incorrect internal constant name:
_DEFAULT_MDADM_BIN_PATHS
* MegaRAID Plugin: Remove unused import of strip.
* MegaRAID Plugin: Fix Anomalous backslash in string of regex.

Changes in V2:

* Patch 4/7: Use _DEFAULT_BIN_PATHS instead.
* Patch 7/7: New patch: Remove duplicate import 'search_property'.


Gris Ge (7):
MegaRAID Plugin: Add missing capability VOLUME_RAID_INFO
MegaRAID Plugin: Fix incorrect system status query.
MegaRAID Plugin: Use Client.FLAG_RSVD instead of flags=0.
MegaRAID Plugin: Fix incorrect internal constant name:
_DEFAULT_MDADM_BIN_PATHS
MegaRAID Plugin: Remove unused import of strip.
MegaRAID Plugin: Fix Anomalous backslash in string of regex.
MegaRAID Plugin: Remove duplicate import 'search_property'.

plugin/megaraid/megaraid.py | 90 +++++++++++++++++++++++----------------------
1 file changed, 47 insertions(+), 43 deletions(-)
--
1.8.3.1
Gris Ge
2015-03-18 09:32:26 UTC
Permalink
* Add missing lsm.Capabilities.VOLUME_RAID_INFO.

Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 1 +
1 file changed, 1 insertion(+)

diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index e754cd8..beb68e8 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -255,6 +255,7 @@ def capabilities(self, system, flags=_FLAG_RSVD):
cap = Capabilities()
cap.set(Capabilities.DISKS)
cap.set(Capabilities.VOLUMES)
+ cap.set(Capabilities.VOLUME_RAID_INFO)
return cap

def _storcli_exec(self, storcli_cmds, flag_json=True):
--
1.8.3.1
Gris Ge
2015-03-18 09:32:27 UTC
Permalink
* The storcli-1.14.12-1.noarch only support 'show health' command for
Nytro MegaRAID card. This patch change system status query using
'show all' command.

* Use single command 'storcli /c0 show all J' to get all information
to generate lsm.System.

* Status information is extracted from 'Status' section of 'show all' output.

* Append firmware version(firmware package build version) in System.name.
User could compare this version string with LSI webpage for upgrade.

* Tested on Intel and IBM rebranded MegaRAID cards.

Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 65 ++++++++++++++++++++++++---------------------
1 file changed, 35 insertions(+), 30 deletions(-)

diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index beb68e8..111e223 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -300,43 +300,48 @@ def _ctrl_count(self):
return self._storcli_exec(
["show", "ctrlcount"]).get("Controller Count")

- def _lsm_status_of_ctrl(self, ctrl_num):
- ctrl_health_output = self._storcli_exec(
- ["/c%d" % ctrl_num, 'show', 'health', 'all'])
- health_info = ctrl_health_output['Controller Health Info']
+ def _lsm_status_of_ctrl(self, ctrl_show_all_output):
+ lsi_status_info = ctrl_show_all_output['Status']
+ status_info = ''
+ status = System.STATUS_UNKNOWN
+ if lsi_status_info['Controller Status'] == 'Optimal':
+ status = System.STATUS_OK
+ else:
# TODO(Gris Ge): Try pull a disk off to check whether this change.
- if health_info['Overall Health'] == 'GOOD':
- return System.STATUS_OK, ''
-
- return System.STATUS_UNKNOWN, "%s reason code %s" % (
- health_info['Overall Health'],
- health_info['Reason Code'])
-
- def _sys_id_of_ctrl_num(self, ctrl_num, ctrl_show_output=None):
- if ctrl_show_output is None:
- ctrl_show_output = self._storcli_exec(["/c%d" % ctrl_num, "show"])
- sys_id = ctrl_show_output['Serial Number']
- if not sys_id:
- raise LsmError(
- ErrorNumber.PLUGIN_BUG,
- "_sys_id_of_ctrl_num(): Fail to get system id: %s" %
- ctrl_show_output.items())
+ status_info = "%s: " % lsi_status_info['Controller Status']
+ for key_name in lsi_status_info.keys():
+ if key_name == 'Controller Status':
+ continue
+ if lsi_status_info[key_name] != 0 and \
+ lsi_status_info[key_name] != 'No' and \
+ lsi_status_info[key_name] != 'NA':
+ status_info += " %s:%s" % (
+ key_name, lsi_status_info[key_name])
+
+ return status, status_info
+
+ def _sys_id_of_ctrl_num(self, ctrl_num, ctrl_show_all_output=None):
+ if ctrl_show_all_output is None:
+ return self._storcli_exec(
+ ["/c%d" % ctrl_num, "show"])['Serial Number']
else:
- return sys_id
+ return ctrl_show_all_output['Basics']['Serial Number']

@_handle_errors
def systems(self, flags=0):
rc_lsm_syss = []
for ctrl_num in range(self._ctrl_count()):
- ctrl_show_output = self._storcli_exec(["/c%d" % ctrl_num, "show"])
- sys_id = self._sys_id_of_ctrl_num(ctrl_num, ctrl_show_output)
- sys_name = "%s %s %s:%s:%s" % (
- ctrl_show_output['Product Name'],
- ctrl_show_output['Host Interface'],
- format(ctrl_show_output['Bus Number'], '02x'),
- format(ctrl_show_output['Device Number'], '02x'),
- format(ctrl_show_output['Function Number'], '02x'))
- (status, status_info) = self._lsm_status_of_ctrl(ctrl_num)
+ ctrl_show_all_output = self._storcli_exec(
+ ["/c%d" % ctrl_num, "show", "all"])
+ sys_id = self._sys_id_of_ctrl_num(ctrl_num, ctrl_show_all_output)
+ sys_name = "%s %s %s ver: %s" % (
+ ctrl_show_all_output['Basics']['Model'],
+ ctrl_show_all_output['Bus']['Host Interface'],
+ ctrl_show_all_output['Basics']['PCI Address'],
+ ctrl_show_all_output['Version']['Firmware Package Build'],
+ )
+ (status, status_info) = self._lsm_status_of_ctrl(
+ ctrl_show_all_output)
plugin_data = "/c%d"
# Since PCI slot sequence might change.
# This string just stored for quick system verification.
--
1.8.3.1
Gris Ge
2015-03-18 09:32:28 UTC
Permalink
* Changed these methods to use 'flags=Client.FLAG_RSVD' as other methods do:
* capabilities()
* systems()
* disks()
* volumes()

Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index 111e223..7f79d34 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -27,9 +27,6 @@

from lsm.plugin.megaraid.utils import cmd_exec, ExecError

-_FLAG_RSVD = Client.FLAG_RSVD
-
-
# Naming scheme
# mega_sys_path /c0
# mega_disk_path /c0/e64/s0
@@ -246,7 +243,7 @@ def time_out_get(self, flags=Client.FLAG_RSVD):
raise LsmError(ErrorNumber.NO_SUPPORT, "Not supported yet")

@_handle_errors
- def capabilities(self, system, flags=_FLAG_RSVD):
+ def capabilities(self, system, flags=Client.FLAG_RSVD):
cur_lsm_syss = self.systems()
if system.id not in list(s.id for s in cur_lsm_syss):
raise LsmError(
@@ -328,7 +325,7 @@ def _sys_id_of_ctrl_num(self, ctrl_num, ctrl_show_all_output=None):
return ctrl_show_all_output['Basics']['Serial Number']

@_handle_errors
- def systems(self, flags=0):
+ def systems(self, flags=Client.FLAG_RSVD):
rc_lsm_syss = []
for ctrl_num in range(self._ctrl_count()):
ctrl_show_all_output = self._storcli_exec(
@@ -352,7 +349,8 @@ def systems(self, flags=0):
return rc_lsm_syss

@_handle_errors
- def disks(self, search_key=None, search_value=None, flags=_FLAG_RSVD):
+ def disks(self, search_key=None, search_value=None,
+ flags=Client.FLAG_RSVD):
rc_lsm_disks = []
mega_disk_path_regex = re.compile(
r"^Drive (\/c[0-9]+\/e[0-9]+\/s[0-9]+) - Detailed Information$")
@@ -470,7 +468,8 @@ def _vd_to_lsm_vol(vd_id, dg_id, sys_id, vd_basic_info, vd_pd_info_list,
sys_id, pool_id, plugin_data)

@_handle_errors
- def volumes(self, search_key=None, search_value=None, flags=0):
+ def volumes(self, search_key=None, search_value=None,
+ flags=Client.FLAG_RSVD):
lsm_vols = []
for ctrl_num in range(self._ctrl_count()):
vol_show_output = self._storcli_exec(
--
1.8.3.1
Gris Ge
2015-03-18 09:32:29 UTC
Permalink
* It's a copy/paste issue. Changed the constant name
from _DEFAULT_MDADM_BIN_PATHS to _DEFAULT_STORCLI_BIN_PATHS

Changes in V2:

* Use _DEFAULT_BIN_PATHS instead.

Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index 7f79d34..1d7856d 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -182,7 +182,7 @@ def _mega_raid_type_to_lsm(vd_basic_info, vd_prop_info):


class MegaRAID(IPlugin):
- _DEFAULT_MDADM_BIN_PATHS = [
+ _DEFAULT_BIN_PATHS = [
"/opt/MegaRAID/storcli/storcli64", "/opt/MegaRAID/storcli/storcli"]
_CMD_JSON_OUTPUT_SWITCH = 'J'

@@ -191,9 +191,9 @@ def __init__(self):

def _find_storcli(self):
"""
- Try _DEFAULT_MDADM_BIN_PATHS
+ Try _DEFAULT_BIN_PATHS
"""
- for cur_path in MegaRAID._DEFAULT_MDADM_BIN_PATHS:
+ for cur_path in MegaRAID._DEFAULT_BIN_PATHS:
if os.path.lexists(cur_path):
self._storcli_bin = cur_path
--
1.8.3.1
Gris Ge
2015-03-18 09:32:30 UTC
Permalink
* Remove unused import of strip.

Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 1 -
1 file changed, 1 deletion(-)

diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index 1d7856d..8148eaa 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -17,7 +17,6 @@

import os
import json
-from string import strip
import re
import errno
--
1.8.3.1
Gris Ge
2015-03-18 09:32:31 UTC
Permalink
* Changed this regex as pylint suggested:
from: "^([0-9\.]+) ([EPTGMK])B$"
to: "^([0-9.]+) ([EPTGMK])B$"

Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index 8148eaa..e127c35 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -117,7 +117,7 @@ def _mega_size_to_lsm(mega_size):
LSI Using 'TB, GB, MB, KB' and etc, for LSM, they are 'TiB' and etc.
Return int of block bytes
"""
- re_regex = re.compile("^([0-9\.]+) ([EPTGMK])B$")
+ re_regex = re.compile("^([0-9.]+) ([EPTGMK])B$")
re_match = re_regex.match(mega_size)
if re_match:
return size_human_2_size_bytes(
--
1.8.3.1
Gris Ge
2015-03-18 09:32:32 UTC
Permalink
Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index e127c35..cb775f3 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -22,7 +22,7 @@

from lsm import (uri_parse, search_property, size_human_2_size_bytes,
Capabilities, LsmError, ErrorNumber, System, Client,
- Disk, VERSION, search_property, IPlugin, Pool, Volume)
+ Disk, VERSION, IPlugin, Pool, Volume)

from lsm.plugin.megaraid.utils import cmd_exec, ExecError
--
1.8.3.1
Tony Asleson
2015-03-18 16:39:10 UTC
Permalink
Looks good, branch merged and committed.

Thanks,
Tony
Post by Gris Ge
* MegaRAID Plugin: Add missing capability VOLUME_RAID_INFO
* MegaRAID Plugin: Fix incorrect system status query.
* MegaRAID Plugin: Use Client.FLAG_RSVD instead of flags=0.
_DEFAULT_MDADM_BIN_PATHS
* MegaRAID Plugin: Remove unused import of strip.
* MegaRAID Plugin: Fix Anomalous backslash in string of regex.
* Patch 4/7: Use _DEFAULT_BIN_PATHS instead.
* Patch 7/7: New patch: Remove duplicate import 'search_property'.
MegaRAID Plugin: Add missing capability VOLUME_RAID_INFO
MegaRAID Plugin: Fix incorrect system status query.
MegaRAID Plugin: Use Client.FLAG_RSVD instead of flags=0.
_DEFAULT_MDADM_BIN_PATHS
MegaRAID Plugin: Remove unused import of strip.
MegaRAID Plugin: Fix Anomalous backslash in string of regex.
MegaRAID Plugin: Remove duplicate import 'search_property'.
plugin/megaraid/megaraid.py | 90 +++++++++++++++++++++++----------------------
1 file changed, 47 insertions(+), 43 deletions(-)
Loading...