From 48dd99a413c8ac5bc75f456331990e5b8adc43ee Mon Sep 17 00:00:00 2001 From: yuanyu Date: Fri, 21 Jan 2022 15:09:11 +0800 Subject: [PATCH] Handling view return issues --- delfin/drivers/hpe/hpe_3par/component_handler.py | 3 --- delfin/tests/unit/drivers/hpe/hpe_3par/test_hpe_3parstor.py | 1 - 2 files changed, 4 deletions(-) diff --git a/delfin/drivers/hpe/hpe_3par/component_handler.py b/delfin/drivers/hpe/hpe_3par/component_handler.py index d00307329..54f7fa38b 100644 --- a/delfin/drivers/hpe/hpe_3par/component_handler.py +++ b/delfin/drivers/hpe/hpe_3par/component_handler.py @@ -629,16 +629,13 @@ def list_masking_views(self, storage_id): port = view.get('port', '').replace('-', '') id = view.get('lun') wwn = view.get('host_wwn/iscsi_name', '').replace('-', '') - native_port_group_id = None if port: id = '%s_%s' % (view.get('lun'), port) - native_port_group_id = 'port_group_%s' % port if wwn: id = '%s_%s' % (id, wwn) view_model = { 'native_masking_view_id': id, "name": view.get('lun'), - 'native_port_group_id': native_port_group_id, "storage_id": storage_id } if 'set:' in vv_name: diff --git a/delfin/tests/unit/drivers/hpe/hpe_3par/test_hpe_3parstor.py b/delfin/tests/unit/drivers/hpe/hpe_3par/test_hpe_3parstor.py index f24cd9d5f..150a8a20c 100644 --- a/delfin/tests/unit/drivers/hpe/hpe_3par/test_hpe_3parstor.py +++ b/delfin/tests/unit/drivers/hpe/hpe_3par/test_hpe_3parstor.py @@ -1329,7 +1329,6 @@ def __init__(self): { 'native_masking_view_id': '2_0:2:1', 'name': '2', - 'native_port_group_id': 'port_group_0:2:1', 'storage_id': '12345', 'native_volume_id': '666', 'native_storage_host_id': '160'