Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transceiver eeprom dom CLI modification to show output from TRANSCEIVER_DOM_THRESHOLD table #2535

Merged
merged 2 commits into from
Dec 5, 2022

Conversation

mihirpat1
Copy link
Contributor

@mihirpat1 mihirpat1 commented Dec 2, 2022

What I did

This PR is needed along with sonic-net/sonic-platform-daemons#320 to continue supporting "show interface transceiver eeprom <port> -d" CLI since PR#320 is separating DOM threshold related information in a separate table entry (TRANSCEIVER_DOM_THRESHOLD from TRANSCEIVER_DOM_SENSOR) in state DB.
The change with this PR will ensure that the CLI output remains unchanged until sonic-net/sonic-buildimage#12911 is committed which will all together publish DOM threshold related information in a new CLI.

How I did it

dom_info_dict is now populated using information from both TRANSCEIVER_DOM_SENSOR as well as TRANSCEIVER_DOM_THRESHOLD.

How to verify it

Please refer to the enclosure attached to sonic-net/sonic-platform-daemons#320

Previous command output (if the output of a command-line utility has changed)

Overall, the "show interface transceiver eeprom <port> -d" command o/p will remain unchanged with this commit. The current code change is on the back end side where-in DOM threshold data is now being retrieved from TRANSCEIVER_DOM_THRESHOLD table.

New command output (if the output of a command-line utility has changed)

"show interface transceiver eeprom <port> -d" o/p will remain unchanged with this commit.

Signed-off-by: Mihir Patel patelmi@microsoft.com

Signed-off-by: Mihir Patel <patelmi@microsoft.com>
Signed-off-by: Mihir Patel <patelmi@microsoft.com>
@mihirpat1 mihirpat1 marked this pull request as ready for review December 2, 2022 18:10
@mihirpat1 mihirpat1 changed the title EEPROM CLI support to dump output from TRANSCEIVER_DOM_THRESHOLD table Transceiver eeprom dom CLI modification to show output from TRANSCEIVER_DOM_THRESHOLD table Dec 2, 2022
@mihirpat1 mihirpat1 requested a review from prgeor December 2, 2022 18:43
@@ -391,6 +391,7 @@ class SFPShow(object):
if dump_dom:
sfp_type = sfp_info_dict['type']
dom_info_dict = state_db.get_all(state_db.STATE_DB, 'TRANSCEIVER_DOM_SENSOR|{}'.format(interface_name))
dom_info_dict.update(state_db.get_all(state_db.STATE_DB, 'TRANSCEIVER_DOM_THRESHOLD|{}'.format(interface_name)))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mihirpat1 : Please validate, add UT outcome of following CLIs:

specific port (optics EEPROM/DOM)

  1. show int trans eeprom Ethernet<> -n asic<>
  2. show int trans eeprom --dom Ethernet<> -n asic<>

all ports where optics inserted in LC/Fixed-chassis
3) show int trans eeprom
4)show int trans eeprom --dom

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@shyam77git shyam77git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changeset and the multi-ASIC UT (I asked for) LGTM

@prgeor
Copy link
Contributor

prgeor commented Dec 5, 2022

@mihirpat1 if no change can you specify that in these section:
`
Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)
`

@prgeor prgeor merged commit 00c01b3 into sonic-net:master Dec 5, 2022
@mihirpat1
Copy link
Contributor Author

@mihirpat1 if no change can you specify that in these section: ` Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed) `

I have updated the PR description now with the above info.

preetham-singh pushed a commit to preetham-singh/sonic-utilities that referenced this pull request Dec 6, 2022
…ER_DOM_THRESHOLD table (sonic-net#2535)

* EEPROM CLI support to dump output from TRANSCEIVER_DOM_THRESHOLD table

Signed-off-by: Mihir Patel <patelmi@microsoft.com>

* Resolved test failures

Signed-off-by: Mihir Patel <patelmi@microsoft.com>

Signed-off-by: Mihir Patel <patelmi@microsoft.com>
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Dec 6, 2022
Update sonic-utilities submodule pointer to include the following:
* ca9a020 [generate_dump] [Mellanox] Fix the duplicate dfw dump collection problem by adding symlinks ([sonic-net#2536](sonic-net/sonic-utilities#2536))
* 92c7001 [config] Add check in config interface ip command to block if the interface is portchannel member ([sonic-net#2539](sonic-net/sonic-utilities#2539))
* e8130f5 [system-health] Improve code structure of system health CLIs ([sonic-net#2453](sonic-net/sonic-utilities#2453))
* 00c01b3 Transceiver eeprom dom CLI modification to show output from TRANSCEIVER_DOM_THRESHOLD table ([sonic-net#2535](sonic-net/sonic-utilities#2535))
* 42f51c2 sonic-utilities: Update config reload() to verify formatting of an input file ([sonic-net#2529](sonic-net/sonic-utilities#2529))
* a5e1e2b [GCU] Add RemoveCreateOnlyDependency Validator/Generator ([sonic-net#2500](sonic-net/sonic-utilities#2500))
* 6411b52 [QoS] Introduce delay to the qos reload flow ([sonic-net#2503](sonic-net/sonic-utilities#2503))
* fce7ec3 Use github code scanning instead of LGTM ([sonic-net#2530](sonic-net/sonic-utilities#2530))
* 91bd6de Change show kube command default value of insecure key to True ([sonic-net#2517](sonic-net/sonic-utilities#2517))
* c44c584 Add db_migrator_constants.py script to setup.py ([sonic-net#2534](sonic-net/sonic-utilities#2534))
* 6a3238e [drop counters] Fix CLI script for unconfigured PGs ([sonic-net#2518](sonic-net/sonic-utilities#2518))
* 263810b Update vrf add, del commands for duplicate/non-existing VRFs ([sonic-net#2467](sonic-net/sonic-utilities#2467))
* addae73 Port 202012 DB migration changes to newer branches ([sonic-net#2515](sonic-net/sonic-utilities#2515))
* 2af8cfa [VXLAN]Fixing traceback in show remotemac when mac moves during command execution ([sonic-net#2506](sonic-net/sonic-utilities#2506))

Signed-off-by: dprital <drorp@nvidia.com>
StormLiangMS pushed a commit that referenced this pull request Dec 30, 2022
…ER_DOM_THRESHOLD table (#2535)

* EEPROM CLI support to dump output from TRANSCEIVER_DOM_THRESHOLD table

Signed-off-by: Mihir Patel <patelmi@microsoft.com>

* Resolved test failures

Signed-off-by: Mihir Patel <patelmi@microsoft.com>

Signed-off-by: Mihir Patel <patelmi@microsoft.com>
yxieca pushed a commit that referenced this pull request Jan 19, 2023
…ER_DOM_THRESHOLD table (#2535)

* EEPROM CLI support to dump output from TRANSCEIVER_DOM_THRESHOLD table

Signed-off-by: Mihir Patel <patelmi@microsoft.com>

* Resolved test failures

Signed-off-by: Mihir Patel <patelmi@microsoft.com>

Signed-off-by: Mihir Patel <patelmi@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants