Skip to content

Commit 1c06ca9

Browse files
vdahiya12mssonicbld
authored andcommitted
[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 <vdahiya@microsoft.com> * add tests Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com> --------- Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
1 parent f53ff21 commit 1c06ca9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

sonic-ycabled/tests/test_y_cable_helper.py

+4
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,8 @@ def test_create_tables_and_insert_mux_unknown_entries(self):
11351135
static_tbl[asic_index] = swsscommon.Table(
11361136
test_db[asic_index], "STATIC_TABLE")
11371137
static_tbl[asic_index].get.return_value = (status, fvs)
1138+
mux_tbl[asic_index] = swsscommon.Table(
1139+
test_db[asic_index], "STATIC_TABLE")
11381140

11391141
rc = create_tables_and_insert_mux_unknown_entries(
11401142
state_db, y_cable_tbl, static_tbl, mux_tbl, asic_index, logical_port_name)
@@ -1610,6 +1612,8 @@ def test_check_identifier_presence_and_update_mux_table_entry_module_microsoft_y
16101612
test_db[asic_index], swsscommon.STATE_HW_MUX_CABLE_TABLE_NAME)
16111613
static_tbl[asic_index] = swsscommon.Table(
16121614
test_db[asic_index], MUX_CABLE_STATIC_INFO_TABLE)
1615+
mux_tbl[asic_index] = swsscommon.Table(
1616+
test_db[asic_index], "MUX_CABLE_INFO")
16131617

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

sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py

+1
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)