From b26aa5ef79fca95064d0baf3b1beed8d56d212f8 Mon Sep 17 00:00:00 2001 From: vdahiya12 <67608553+vdahiya12@users.noreply.github.com> Date: Fri, 23 Sep 2022 14:31:45 -0700 Subject: [PATCH] [credo][ycable] remove mux-toggle inprogress flags for some API's (#311) this PR removes some of the toggle synchronization logic for SONiC telemetry, since SONiC telemetry table MUX_CABLE_INFO is anyways disabled/enabled using CLI config muxcable telemetry enable/disable, it is redundant to have this logic embedded in ycabled and port_instance helper objects, which could be unneccessary Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com Signed-off-by: vaibhav-dahiya --- sonic_y_cable/credo/y_cable_credo.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/sonic_y_cable/credo/y_cable_credo.py b/sonic_y_cable/credo/y_cable_credo.py index 0c0adfdcc36d..9e6af58b51bb 100644 --- a/sonic_y_cable/credo/y_cable_credo.py +++ b/sonic_y_cable/credo/y_cable_credo.py @@ -859,8 +859,6 @@ def get_active_linked_tor_side(self): TARGET_UNKNOWN, if checking which side is linked and sending traffic API fails. """ - if self.mux_toggle_status == self.MUX_TOGGLE_STATUS_INPROGRESS: - return YCableBase.TARGET_UNKNOWN curr_offset = YCable.OFFSET_ACTIVE_TOR_INDICATOR @@ -924,8 +922,6 @@ def is_link_active(self, target): , False if the link is not active """ - if self.mux_toggle_status == self.MUX_TOGGLE_STATUS_INPROGRESS: - return YCableBase.TARGET_UNKNOWN curr_offset = YCable.OFFSET_CHECK_LINK_ACTIVE @@ -996,8 +992,6 @@ def get_eye_heights(self, target): a list, with EYE values of lane 0 lane 1 lane 2 lane 3 with corresponding index """ - if self.mux_toggle_status == self.MUX_TOGGLE_STATUS_INPROGRESS: - return None eye_result = [] @@ -1144,8 +1138,6 @@ def get_switch_count_total(self, switch_count_type, clear_on_read=False): an integer, the number of times the Y-cable has been switched """ - if self.mux_toggle_status == self.MUX_TOGGLE_STATUS_INPROGRESS: - return 0 count = 0 @@ -2185,8 +2177,6 @@ def get_local_temperature(self): an Integer, the temperature of the local MCU """ - if self.mux_toggle_status == self.MUX_TOGGLE_STATUS_INPROGRESS: - return 0 curr_offset = YCable.OFFSET_INTERNAL_TEMPERATURE if self.platform_chassis is not None: @@ -2214,8 +2204,6 @@ def get_nic_voltage(self): a float, the voltage of the NIC MCU """ - if self.mux_toggle_status == self.MUX_TOGGLE_STATUS_INPROGRESS: - return 0 if self.platform_chassis is not None: with self.rlock.acquire_timeout(RLocker.ACQUIRE_LOCK_TIMEOUT) as lock_status: @@ -2244,8 +2232,6 @@ def get_local_voltage(self): a float, the voltage of the local MCU """ - if self.mux_toggle_status == self.MUX_TOGGLE_STATUS_INPROGRESS: - return 0 if self.platform_chassis is not None: with self.rlock.acquire_timeout(RLocker.ACQUIRE_LOCK_TIMEOUT) as lock_status: