Skip to content

[xcvr] Add get_module_fw_info method to XcvrApi class.#267

Merged
prgeor merged 1 commit intosonic-net:masterfrom
oleksandrivantsiv:xcvr
Mar 10, 2022
Merged

[xcvr] Add get_module_fw_info method to XcvrApi class.#267
prgeor merged 1 commit intosonic-net:masterfrom
oleksandrivantsiv:xcvr

Conversation

@oleksandrivantsiv
Copy link
Collaborator

Signed-off-by: Oleksandr Ivantsiv oivantsiv@nvidia.com

Description

Add get_module_fw_info method to XcvrApi abstract class to prevent an error on execution of sfputil show fwversion command.

Motivation and Context

An exception was raised when the command was executed with xcvr specification that doesn't support operation:

sfputil show fwversion Ethernet0
Traceback (most recent call last):
  File "/usr/local/bin/sfputil", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/sfputil/main.py", line 872, in fwversion
    show_firmware_version(physical_port)
  File "/usr/local/lib/python3.9/dist-packages/sfputil/main.py", line 847, in show_firmware_version
    out = api.get_module_fw_info()
AttributeError: 'Sff8436Api' object has no attribute 'get_module_fw_info'

How Has This Been Tested?

Run sonic-mgmt/platform_tests/sfp tests

Additional Information (Optional)

Signed-off-by: Oleksandr Ivantsiv <oivantsiv@nvidia.com>
@oleksandrivantsiv oleksandrivantsiv self-assigned this Mar 8, 2022
@prgeor prgeor added the Bug label Mar 10, 2022
@prgeor
Copy link
Collaborator

prgeor commented Mar 10, 2022

@oleksandrivantsiv thanks for fixing

@prgeor prgeor merged commit a844f18 into sonic-net:master Mar 10, 2022
liat-grozovik pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Apr 7, 2022
Update sonic-platform-common submodule to pickup new commits:
01512ec [SSD]Enhance ssd_generic with more error handling to avoid python crash sonic-net/sonic-platform-common#271
ac3e7f1 [y_cable][Broadcom] update the BRCM y_cable driver to release 2.0 sonic-net/sonic-platform-common#263
573717a [Credo][Ycable] Fix Credo firmware download API download_firmware flag sonic-net/sonic-platform-common#269
a844f18 [xcvr] Add get_module_fw_info method to XcvrApi class. sonic-net/sonic-platform-common#267
35bad16 [sfputil]Refactoring read_porttab_mappings sonic-net/sonic-platform-common#264
83c4345 [SSD Generic] Add support for parsing nvme ssd model, health and temperature sonic-net/sonic-platform-common#265
5da31e1 [ycable][credo] Fix the is_link_active API for Credo Ycable sonic-net/sonic-platform-common#260
931c6ea [Y-Cable][Credo] add theading locker to support thread-safe calling, add SKU check for download_firmware API. sonic-net/sonic-platform-common#222
ff3aa75 Fix SFF8472 Enhanced Options sonic-net/sonic-platform-common#259
a8a83e9 [ssd] Allow individual vendor parsers to handle errors sonic-net/sonic-platform-common#252

Signed-off-by: Kebo Liu <kebol@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants