From fd54bca3ae740694703fe802f32fb1735e24e195 Mon Sep 17 00:00:00 2001 From: michael_shih Date: Thu, 4 May 2023 18:14:05 +0800 Subject: [PATCH] [Edgecore][device][platform] Add Add plugins/ssd_util.py to support command:[show platform ssdhealth --vendor]. Signed-off-by: michael_shih --- .../plugins/ssd_util.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 device/accton/x86_64-accton_as9736_64d-r0/plugins/ssd_util.py diff --git a/device/accton/x86_64-accton_as9736_64d-r0/plugins/ssd_util.py b/device/accton/x86_64-accton_as9736_64d-r0/plugins/ssd_util.py new file mode 100755 index 000000000000..4b173c5e3890 --- /dev/null +++ b/device/accton/x86_64-accton_as9736_64d-r0/plugins/ssd_util.py @@ -0,0 +1,24 @@ +# ssd_util.py +# +# Platform-specific SSD interface for SONiC +## + +try: + from sonic_platform_base.sonic_ssd.ssd_generic import SsdUtil as MainSsdUtil +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +NOT_AVAILABLE = "N/A" + +class SsdUtil(MainSsdUtil): + """Platform-specific SsdUtil class""" + + def __init__(self, diskdev): + super(SsdUtil, self).__init__(diskdev) + + # If it has no vendor tool to read SSD information, + # ssd_util.py will use generic SSD information + # for vendor SSD information. + if self.vendor_ssd_info == NOT_AVAILABLE: + self.vendor_ssd_info = self.ssd_info +