Discussion:
[Libstoragemgmt-devel] [PATCH] smis_cap.py: Remove copy/paste code
Tony Asleson
2015-03-05 23:24:41 UTC
Permalink
I saw this when skimming through looking for something else.

Signed-off-by: Tony Asleson <***@redhat.com>
---
plugin/smispy/smis_cap.py | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/plugin/smispy/smis_cap.py b/plugin/smispy/smis_cap.py
index e027a22..23a3449 100644
--- a/plugin/smispy/smis_cap.py
+++ b/plugin/smispy/smis_cap.py
@@ -247,19 +247,7 @@ def _tgt_cap_set(smis_common, cim_sys_path, cap):
if cim_sys_path.classname == 'LSIESG_MegaRAIDHBA':
return

- flag_fc_support = smis_common.profile_check(
- SmisCommon.SNIA_FC_TGT_PORT_PROFILE,
- SmisCommon.SMIS_SPEC_VER_1_4,
- raise_error=False)
- # One more check for NetApp Typo:
- # NetApp: 'FC Target Port'
- # SMI-S: 'FC Target Ports'
- # Bug reported.
- if not flag_fc_support:
- flag_fc_support = smis_common.profile_check(
- 'FC Target Port',
- SmisCommon.SMIS_SPEC_VER_1_4,
- raise_error=False)
+ flag_fc_support = fc_tgt_is_supported(smis_common)
flag_iscsi_support = smis_common.profile_check(
SmisCommon.SNIA_ISCSI_TGT_PORT_PROFILE,
SmisCommon.SMIS_SPEC_VER_1_4,
--
1.8.2.1
Loading...