Skip to content

Commit b26aa5e

Browse files
authored
[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 [email protected] Signed-off-by: vaibhav-dahiya <[email protected]>
1 parent 6f30c0f commit b26aa5e

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

sonic_y_cable/credo/y_cable_credo.py

-14
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,6 @@ def get_active_linked_tor_side(self):
859859
TARGET_UNKNOWN, if checking which side is linked and sending traffic API fails.
860860
"""
861861

862-
if self.mux_toggle_status == self.MUX_TOGGLE_STATUS_INPROGRESS:
863-
return YCableBase.TARGET_UNKNOWN
864862

865863
curr_offset = YCable.OFFSET_ACTIVE_TOR_INDICATOR
866864

@@ -924,8 +922,6 @@ def is_link_active(self, target):
924922
, False if the link is not active
925923
"""
926924

927-
if self.mux_toggle_status == self.MUX_TOGGLE_STATUS_INPROGRESS:
928-
return YCableBase.TARGET_UNKNOWN
929925

930926
curr_offset = YCable.OFFSET_CHECK_LINK_ACTIVE
931927

@@ -996,8 +992,6 @@ def get_eye_heights(self, target):
996992
a list, with EYE values of lane 0 lane 1 lane 2 lane 3 with corresponding index
997993
"""
998994

999-
if self.mux_toggle_status == self.MUX_TOGGLE_STATUS_INPROGRESS:
1000-
return None
1001995

1002996
eye_result = []
1003997

@@ -1144,8 +1138,6 @@ def get_switch_count_total(self, switch_count_type, clear_on_read=False):
11441138
an integer, the number of times the Y-cable has been switched
11451139
"""
11461140

1147-
if self.mux_toggle_status == self.MUX_TOGGLE_STATUS_INPROGRESS:
1148-
return 0
11491141

11501142
count = 0
11511143

@@ -2185,8 +2177,6 @@ def get_local_temperature(self):
21852177
an Integer, the temperature of the local MCU
21862178
"""
21872179

2188-
if self.mux_toggle_status == self.MUX_TOGGLE_STATUS_INPROGRESS:
2189-
return 0
21902180

21912181
curr_offset = YCable.OFFSET_INTERNAL_TEMPERATURE
21922182
if self.platform_chassis is not None:
@@ -2214,8 +2204,6 @@ def get_nic_voltage(self):
22142204
a float, the voltage of the NIC MCU
22152205
"""
22162206

2217-
if self.mux_toggle_status == self.MUX_TOGGLE_STATUS_INPROGRESS:
2218-
return 0
22192207

22202208
if self.platform_chassis is not None:
22212209
with self.rlock.acquire_timeout(RLocker.ACQUIRE_LOCK_TIMEOUT) as lock_status:
@@ -2244,8 +2232,6 @@ def get_local_voltage(self):
22442232
a float, the voltage of the local MCU
22452233
"""
22462234

2247-
if self.mux_toggle_status == self.MUX_TOGGLE_STATUS_INPROGRESS:
2248-
return 0
22492235

22502236
if self.platform_chassis is not None:
22512237
with self.rlock.acquire_timeout(RLocker.ACQUIRE_LOCK_TIMEOUT) as lock_status:

0 commit comments

Comments
 (0)