From 9d41fed017b2a25bfcfd63df24b93f3eb1dbbb15 Mon Sep 17 00:00:00 2001 From: Administrator Date: Tue, 6 Dec 2022 15:50:23 +0800 Subject: [PATCH] edit storage serial_number --- delfin/drivers/macro_san/ms/ms_handler.py | 4 ++-- delfin/tests/unit/drivers/macro_san/ms/test_ms_stor.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/delfin/drivers/macro_san/ms/ms_handler.py b/delfin/drivers/macro_san/ms/ms_handler.py index d552b5cce..d0d7302d0 100644 --- a/delfin/drivers/macro_san/ms/ms_handler.py +++ b/delfin/drivers/macro_san/ms/ms_handler.py @@ -67,7 +67,7 @@ def get_storage(self, storage_id): if not storage_data_map: raise exception.SSHException('The command returns empty data') device_uuid = storage_data_map.get('DeviceUUID') - serial_number = '{}/{}'.format(self.ssh_host, device_uuid) + serial_number = '{}:{}'.format(self.ssh_host, device_uuid) storage_name = storage_data_map.get('DeviceName') firmware_version = self.get_firmware_version() pools = self.list_storage_pools(storage_id) @@ -1048,7 +1048,7 @@ def get_storages(self): device_uuid = storage_data_map.get('DeviceUUID') storage_name = storage_data_map.get('DeviceName') resource_name = storage_name if storage_name else device_uuid - resource_id = '{}/{}'.format(self.ssh_host, device_uuid) + resource_id = '{}:{}'.format(self.ssh_host, device_uuid) return resource_id, resource_name def down_perf_file(self, folder, storage_id, pattern): diff --git a/delfin/tests/unit/drivers/macro_san/ms/test_ms_stor.py b/delfin/tests/unit/drivers/macro_san/ms/test_ms_stor.py index ee169d5be..aee142aca 100644 --- a/delfin/tests/unit/drivers/macro_san/ms/test_ms_stor.py +++ b/delfin/tests/unit/drivers/macro_san/ms/test_ms_stor.py @@ -864,7 +864,7 @@ STORAGE_DATA = { 'name': '0x00b34202-fea90000-fa41e0d6-ded905a8', 'vendor': 'MacroSAN', 'status': 'normal', - 'serial_number': '110.143.133.200/0x00b34202-fea90000-fa41e0d6-ded905a8', + 'serial_number': '110.143.133.200:0x00b34202-fea90000-fa41e0d6-ded905a8', 'firmware_version': 'V2.0.14T04', 'raw_capacity': 1917702897664.0, 'total_capacity': 7670811590656.0, @@ -875,7 +875,7 @@ STORAGE_TWO_DATA = { 'name': 'Storage-1', 'vendor': 'MacroSAN', 'status': 'normal', - 'serial_number': '110.143.133.200/0x50b34200-0b750056-42ab74ff-6265d80e', + 'serial_number': '110.143.133.200:0x50b34200-0b750056-42ab74ff-6265d80e', 'firmware_version': 'V2.0.14T04', 'raw_capacity': 1917702897664.0, 'total_capacity': 7670811590656.0,