From a95834b65a9f3b17ab1ce4e1ba5d1a60102e4507 Mon Sep 17 00:00:00 2001 From: Alexander Allen Date: Mon, 19 Apr 2021 20:29:56 -0400 Subject: [PATCH] [DeviceBase] Added hardware revision number to generic device properties (#184) Added a `get_revision()` method to the generic platform device class which returns the hardware revision number of the device as a string. --- sonic_platform_base/device_base.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sonic_platform_base/device_base.py b/sonic_platform_base/device_base.py index 72f0f05add0e..02227b9b1dd3 100644 --- a/sonic_platform_base/device_base.py +++ b/sonic_platform_base/device_base.py @@ -55,6 +55,15 @@ def get_serial(self): """ raise NotImplementedError + def get_revision(self): + """ + Retrieves the hardware revision of the device + + Returns: + string: Revision value of device + """ + raise NotImplementedError + def get_status(self): """ Retrieves the operational status of the device