Skip to content

Commit

Permalink
[ycabled] remove some redundant logging for active-active cable type (s…
Browse files Browse the repository at this point in the history
…onic-net#274)

This change is required for stop posting MUX_CABLE_INFO entries into state DB for active-active cable_type since for these cables there is no i2c/eeprom or muxcable.
This loop is independent of main loop, hence it needs to be changed separately

Description
Motivation and Context
How Has This Been Tested?
Unit-tests

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
  • Loading branch information
vdahiya12 committed Jul 18, 2022
1 parent e889625 commit 005ec30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1424,12 +1424,13 @@ def check_identifier_presence_and_update_mux_info_entry(state_db, mux_tbl, asic_
port_tbl[asic_id] = swsscommon.Table(config_db[asic_id], "MUX_CABLE")

(status, fvs) = port_tbl[asic_index].get(logical_port_name)
(cable_status, cable_type) = check_mux_cable_port_type(logical_port_name, port_tbl, asic_index)

if status is False:
helper_logger.log_warning("Could not retreive fieldvalue pairs for {}, inside config_db table {}".format(logical_port_name, port_tbl[asic_index].getTableName()))
return

else:
elif cable_status and cable_type == "active-standby":
# Convert list of tuples to a dictionary
mux_table_dict = dict(fvs)
if "state" in mux_table_dict:
Expand Down

0 comments on commit 005ec30

Please sign in to comment.