From 8942a4d71326d2def23a559465b0121794d67a4a Mon Sep 17 00:00:00 2001 From: Yuanzhe Liu Date: Mon, 2 Sep 2024 09:39:19 +0300 Subject: [PATCH] Support new ssd model Virtium VTSM24ABXI160-BM110006 The Virtium prefix is shown in device model from smartctl output, so keep it. Signed-off-by: Yuanzhe, Liu --- sonic_platform_base/sonic_storage/ssd.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sonic_platform_base/sonic_storage/ssd.py b/sonic_platform_base/sonic_storage/ssd.py index bab1c095c..d0f4f3c57 100644 --- a/sonic_platform_base/sonic_storage/ssd.py +++ b/sonic_platform_base/sonic_storage/ssd.py @@ -253,11 +253,13 @@ def parse_virtium_info(self): pass else: health_raw = NOT_AVAILABLE + # The ID of "Remaining Life Left" attribute on 'VSFDM8XC240G-V11-T' + # and 'Virtium VTSM24ABXI160-BM110006' device is 231 + # However, it is not recognized by SmartCmd nor smartctl so far + # We need to parse them using the ID number + special_ssd = ['VSFDM8XC240G-V11-T', 'Virtium VTSM24ABXI160-BM110006'] try: - if self.model == 'VSFDM8XC240G-V11-T': - # The ID of "Remaining Life Left" attribute on 'VSFDM8XC240G-V11-T' device is 231 - # However, it is not recognized by SmartCmd nor smartctl so far - # We need to parse it using the ID number + if self.model in special_ssd: health_raw = self.parse_id_number(VIRTIUM_HEALTH_ID, self.vendor_ssd_info) self.health = float(health_raw.split()[2]) if health_raw != NOT_AVAILABLE else NOT_AVAILABLE else: