sonic-net / sonic-platform-daemons

Platform module daemons for SONiC
Other
25 stars 159 forks source link

[xcvrd] Fix swsscommon set port table handle in media_settings parser #562

Open vdahiya12 opened 3 days ago

vdahiya12 commented 3 days ago

instead of ProducerStateTable for settings kvp, the xcvrd daemon should be just using swsscommon.Table which is what this PR fixes.

Description

The method notify_media_setting was updated to use get_app_set_port_tbl() instead of get_app_port_tbl() for interacting with the application port table. This change modifies the way media settings are published to the application database for a given logical port.

A new table, app_set_port_tbl, was added to the XcvrTableHelper class to support the updated functionality in media_settings_parser.py. The table is initialized in the constructor and used by the get_app_set_port_tbl() method.

The changes include:

Motivation and Context

since ProducerStateTable cannot be used to set key-value pairs in redis, the xcvrd daemon should be just using swsscommon.Table for PORT_TABLE which is what this PR fixes.

How Has This Been Tested?

UT and testing on Arista 7260cx3 testbed

Additional Information (Optional)

prgeor commented 3 days ago

@vdahiya12 please update

Motivation and Context
How Has This Been Tested?