* Changed these methods to use 'flags=Client.FLAG_RSVD' as other methods do: * capabilities() * systems() * disks() * volumes()
Signed-off-by: Gris Ge <f...@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 ------------------------------------------------------------------------------ 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