From 2612b93f26887aa8245dc7cf2cc32d4e014b9050 Mon Sep 17 00:00:00 2001 From: tanjy Date: Wed, 26 Jan 2022 17:58:14 +0800 Subject: [PATCH 1/2] changem svc host ostype --- delfin/drivers/ibm/storwize_svc/ssh_handler.py | 6 +++--- .../unit/drivers/ibm/storwize_svc/test_ibm_storwize_svc.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/delfin/drivers/ibm/storwize_svc/ssh_handler.py b/delfin/drivers/ibm/storwize_svc/ssh_handler.py index 25c102df8..75333df44 100644 --- a/delfin/drivers/ibm/storwize_svc/ssh_handler.py +++ b/delfin/drivers/ibm/storwize_svc/ssh_handler.py @@ -120,11 +120,11 @@ class SSHHandler(object): ALERT_NOT_FOUND_CODE = 'CMMVC8275E' BLOCK_SIZE = 512 BYTES_TO_BIT = 8 - OS_TYPE_MAP = {'generic': constants.HostOSTypes.LINUX, + OS_TYPE_MAP = {'generic': constants.HostOSTypes.UNKNOWN, 'hp/unix': constants.HostOSTypes.HP_UX, 'openvms': constants.HostOSTypes.OPEN_VMS, - 'tpgs': constants.HostOSTypes.AIX, - 'vvol': constants.HostOSTypes.AIX + 'tpgs': constants.HostOSTypes.UNKNOWN, + 'vvol': constants.HostOSTypes.UNKNOWN } INITIATOR_STATUS_MAP = {'active': constants.InitiatorStatus.ONLINE, 'offline': constants.InitiatorStatus.OFFLINE, diff --git a/delfin/tests/unit/drivers/ibm/storwize_svc/test_ibm_storwize_svc.py b/delfin/tests/unit/drivers/ibm/storwize_svc/test_ibm_storwize_svc.py index d2238ff52..cd1151e21 100644 --- a/delfin/tests/unit/drivers/ibm/storwize_svc/test_ibm_storwize_svc.py +++ b/delfin/tests/unit/drivers/ibm/storwize_svc/test_ibm_storwize_svc.py @@ -1395,7 +1395,7 @@ def __init__(self): 'name': 'tjy_test_iscsi', 'storage_id': '12345', 'native_storage_host_id': '38', - 'os_type': 'Linux', + 'os_type': 'Unknown', 'status': 'normal' } ] From d1b81605cd12a323cbd52aef8e90adcbf3eaf32b Mon Sep 17 00:00:00 2001 From: tanjy Date: Wed, 26 Jan 2022 18:02:58 +0800 Subject: [PATCH 2/2] changem svc host ostype --- delfin/drivers/ibm/storwize_svc/ssh_handler.py | 1 - 1 file changed, 1 deletion(-) diff --git a/delfin/drivers/ibm/storwize_svc/ssh_handler.py b/delfin/drivers/ibm/storwize_svc/ssh_handler.py index 75333df44..15aa6ceab 100644 --- a/delfin/drivers/ibm/storwize_svc/ssh_handler.py +++ b/delfin/drivers/ibm/storwize_svc/ssh_handler.py @@ -1109,7 +1109,6 @@ def list_masking_views(self, storage_id): "native_masking_view_id": view_id, } view_list.append(view_result) - return view_list except Exception as e: LOG.error("Failed to get view metrics from svc")