Skip to content

Commit

Permalink
edit storage serial_number
Browse files Browse the repository at this point in the history
  • Loading branch information
zhilong-xu committed Dec 6, 2022
1 parent 4ba8e59 commit 9d41fed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions delfin/drivers/macro_san/ms/ms_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions delfin/tests/unit/drivers/macro_san/ms/test_ms_stor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 9d41fed

Please sign in to comment.