Skip to content

Commit

Permalink
[credo][ycable] remove mux-toggle inprogress flags for some API's (so…
Browse files Browse the repository at this point in the history
…nic-net#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 <vdahiya@microsoft.com>
  • Loading branch information
vdahiya12 authored Sep 23, 2022
1 parent 6f30c0f commit b26aa5e
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions sonic_y_cable/credo/y_cable_credo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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 = []

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit b26aa5e

Please sign in to comment.