Skip to content

Commit 9d0c550

Browse files
authored
[ycabled] [active-standby] add changes for correcting telemetry values for 'active-standby' when the cable is present but vendor name and part number is not recognized (sonic-net#478)
* [ycabled] [active-standby] add changes for correcting telemetry values for 'active-standby' when the cable is present but vendor name and part number is not recognized Signed-off-by: vaibhav-dahiya <[email protected]> * add tests Signed-off-by: vaibhav-dahiya <[email protected]> --------- Signed-off-by: vaibhav-dahiya <[email protected]>
1 parent 7e18648 commit 9d0c550

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

sonic-ycabled/tests/test_y_cable_helper.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,8 @@ def test_create_tables_and_insert_mux_unknown_entries(self):
11361136
static_tbl[asic_index] = swsscommon.Table(
11371137
test_db[asic_index], "STATIC_TABLE")
11381138
static_tbl[asic_index].get.return_value = (status, fvs)
1139+
mux_tbl[asic_index] = swsscommon.Table(
1140+
test_db[asic_index], "STATIC_TABLE")
11391141

11401142
rc = create_tables_and_insert_mux_unknown_entries(
11411143
state_db, y_cable_tbl, static_tbl, mux_tbl, asic_index, logical_port_name)
@@ -1611,6 +1613,8 @@ def test_check_identifier_presence_and_update_mux_table_entry_module_microsoft_y
16111613
test_db[asic_index], swsscommon.STATE_HW_MUX_CABLE_TABLE_NAME)
16121614
static_tbl[asic_index] = swsscommon.Table(
16131615
test_db[asic_index], MUX_CABLE_STATIC_INFO_TABLE)
1616+
mux_tbl[asic_index] = swsscommon.Table(
1617+
test_db[asic_index], "MUX_CABLE_INFO")
16141618

16151619
port_tbl[asic_index] = swsscommon.Table(
16161620
test_db[asic_index], "PORT_INFO_TABLE")

sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,7 @@ def create_tables_and_insert_mux_unknown_entries(state_db, y_cable_tbl, static_t
11511151
# fill the newly found entry
11521152
read_y_cable_and_update_statedb_port_tbl(
11531153
logical_port_name, y_cable_tbl[asic_index])
1154+
post_port_mux_info_to_db(logical_port_name, mux_tbl, asic_index, y_cable_tbl, 'pseudo-cable')
11541155
post_port_mux_static_info_to_db(
11551156
logical_port_name, static_tbl[asic_index], y_cable_tbl)
11561157

0 commit comments

Comments
 (0)