Skip to content

Commit

Permalink
[ycabled] [active-standby] add changes for correcting telemetry value…
Browse files Browse the repository at this point in the history
…s for 'active-standby' when the cable is present but vendor name and part number is not recognized (#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>
  • Loading branch information
vdahiya12 authored and mssonicbld committed May 9, 2024
1 parent f53ff21 commit 1c06ca9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sonic-ycabled/tests/test_y_cable_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,8 @@ def test_create_tables_and_insert_mux_unknown_entries(self):
static_tbl[asic_index] = swsscommon.Table(
test_db[asic_index], "STATIC_TABLE")
static_tbl[asic_index].get.return_value = (status, fvs)
mux_tbl[asic_index] = swsscommon.Table(
test_db[asic_index], "STATIC_TABLE")

rc = create_tables_and_insert_mux_unknown_entries(
state_db, y_cable_tbl, static_tbl, mux_tbl, asic_index, logical_port_name)
Expand Down Expand Up @@ -1610,6 +1612,8 @@ def test_check_identifier_presence_and_update_mux_table_entry_module_microsoft_y
test_db[asic_index], swsscommon.STATE_HW_MUX_CABLE_TABLE_NAME)
static_tbl[asic_index] = swsscommon.Table(
test_db[asic_index], MUX_CABLE_STATIC_INFO_TABLE)
mux_tbl[asic_index] = swsscommon.Table(
test_db[asic_index], "MUX_CABLE_INFO")

port_tbl[asic_index] = swsscommon.Table(
test_db[asic_index], "PORT_INFO_TABLE")
Expand Down
1 change: 1 addition & 0 deletions sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,7 @@ def create_tables_and_insert_mux_unknown_entries(state_db, y_cable_tbl, static_t
# fill the newly found entry
read_y_cable_and_update_statedb_port_tbl(
logical_port_name, y_cable_tbl[asic_index])
post_port_mux_info_to_db(logical_port_name, mux_tbl, asic_index, y_cable_tbl, 'pseudo-cable')
post_port_mux_static_info_to_db(
logical_port_name, static_tbl[asic_index], y_cable_tbl)

Expand Down

0 comments on commit 1c06ca9

Please sign in to comment.