Skip to content

[cmis] Only create CdbFwHandler if module support CDB#34

Closed
Junchao-Mellanox wants to merge 1 commit intomasterfrom
master-cdb
Closed

[cmis] Only create CdbFwHandler if module support CDB#34
Junchao-Mellanox wants to merge 1 commit intomasterfrom
master-cdb

Conversation

@Junchao-Mellanox
Copy link
Copy Markdown
Owner

Description

CdbFwHandler is created to handle CDB related command for cmis module. It should be created only CDB is supported by this module. However, the current implementation add an assertion in init function which will fail any cmis module which does not support CDB:

class CdbFwHandler(CdbCmdHandler):
    def __init__(self, reader, writer, mem_map):
        super(CdbFwHandler, self).__init__(reader, writer, mem_map)
        self.start_payload_size = 0
        self.is_lpl_only = False
        self.rw_length_ext = 0
        assert True == self.initFwHandler(), "Failed to initialize firmware handler"

The error logs:

2025 Nov 16 12:21:21.010105 sonic INFO pmon#supervisord: xcvrd Error creating API: Failed to initialize firmware handler
2025 Nov 16 12:21:21.010182 sonic INFO pmon#supervisord: xcvrd Failed to get firmware management features

Motivation and Context

Only create CdbFwHandler if module support CDB

How Has This Been Tested?

Manual test with modules that support and not support CDB
Unit test

Additional Information (Optional)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants