From 4e08440f13f0be6854b784e39e2865a5d2328d0b Mon Sep 17 00:00:00 2001 From: vdahiya12 <67608553+vdahiya12@users.noreply.github.com> Date: Thu, 14 Apr 2022 16:23:35 -0700 Subject: [PATCH] [Credo][Ycable] improve logging for Server Powered off/Faulty cables (#272) Signed-off-by: vaibhav-dahiya Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com Cable could be powered off during which the i2c to the NIC MCU would not be able to respond with which side is active. For such cases the log needs to be improved. In case the cable is powered correctly but still the cable is not able to get the actve side, that would mean a faulty cable. Added/improved the appropriate logs Description Motivation and Context How Has This Been Tested? Improved logs only Additional Information (Optional) --- sonic_y_cable/credo/y_cable_credo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sonic_y_cable/credo/y_cable_credo.py b/sonic_y_cable/credo/y_cable_credo.py index fd4aa67ca6e5..e93c27866445 100644 --- a/sonic_y_cable/credo/y_cable_credo.py +++ b/sonic_y_cable/credo/y_cable_credo.py @@ -617,7 +617,7 @@ def get_read_side(self): self.log_info("Reading from NIC side") return YCableBase.TARGET_NIC else: - self.log_error("Error: unknown status for checking which side regval = {} ".format(result)) + self.log_error("Error: Credo Y Cable unable to get the read side, Cable not plugged/Faulty Cable register value = {} ".format(result)) return YCableBase.TARGET_UNKNOWN @@ -675,7 +675,7 @@ def get_mux_direction(self): self.log_info("mux pointing to TOR B") return YCableBase.TARGET_TOR_B - self.log_error("Error: unknown status for mux direction regval = {} ".format(result)) + self.log_error("Error: Credo Y Cable unable to check the status mux direction, cable powered off/Faulty Cable register value = {}".format(result)) return YCableBase.TARGET_UNKNOWN def get_active_linked_tor_side(self): @@ -736,7 +736,7 @@ def get_active_linked_tor_side(self): self.log_info("Nothing linked for routing") return YCableBase.TARGET_NIC - self.log_error("Error: unknown status for active TOR regval = {} ".format(result)) + self.log_error("Error: Credo Y Cable unable to get active linked ToR side Cable powered off/Faulty Cable register value = {} ".format(result)) return YCableBase.TARGET_UNKNOWN def is_link_active(self, target):