From b972e84c17d5f7e1bb378cc9a31b9da9c22a2311 Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Wed, 7 Aug 2019 01:55:49 +0800 Subject: [PATCH] add more error code to get_transceiver_change_event (#50) --- sonic_platform_base/sonic_sfp/sfputilbase.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sonic_platform_base/sonic_sfp/sfputilbase.py b/sonic_platform_base/sonic_sfp/sfputilbase.py index 772c9c725..b8d487690 100644 --- a/sonic_platform_base/sonic_sfp/sfputilbase.py +++ b/sonic_platform_base/sonic_sfp/sfputilbase.py @@ -1101,8 +1101,12 @@ def get_transceiver_change_event(self, timeout=0): event. When timeout is non-zero, the function can also return when the timer expires. When timer expires, the return status is True and events is empty. :returns: (status, events) - :status: Boolean, True if call successful, False if not; - :events: dictionary for pysical port index and the SFP status, - status='1' represent plug in, '0' represent plug out like {'0': '1', '31':'0'} + :status: Boolean, True if call successful and no system level event/error occurred, + False if call not success or system level event/error occurred. + :events: dictionary for physical port index and the SFP status, + status='1' represent plug in, '0' represent plug out like {'0': '1', '31':'0'} + when it comes to system level event/error, the index will be '-1', + and status can be 'system_not_ready', 'system_become_ready', 'system_fail', + like {'-1':'system_not_ready'}. """ return