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

Added new APIs and enhanced the required APIs in "module_base.py and #454

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

rameshraghupathy
Copy link

Added new APIs and enhanced the required APIs in "module_base.py and chassis_base.py" to support SmartSwitch

Description

The ChassisBase class and ModuleBase class need to support new SmartSwitch platforms.

Motivation and Context

Some new API and some API enhancements are required to support SmartSwitch. This has been captured in the PMON HLD document. These changes are implementation based on those requirements.

How Has This Been Tested?

The corresponding platform APIs were implemented. The new CLI changes and chassisd changes invoke these APIs. UT was performed and demo was done.

Additional Information (Optional)

sonic_platform_base/chassis_base.py Show resolved Hide resolved
sonic_platform_base/chassis_base.py Outdated Show resolved Hide resolved
"""
raise NotImplementedError

def get_state_info(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the difference between get_state_info and get_oper_status? Can you please add an example of the expected return value?

From the HLD, I understood that get_oper_status should return a simple online or offline state. And get_state_info should return the state progression. But from the description of the get_oper_status, it is different in this PR.

Copy link
Author

@rameshraghupathy rameshraghupathy Jul 19, 2024

Choose a reason for hiding this comment

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

Sure, will add an example of the return value.

@@ -152,6 +170,11 @@ def get_oper_status(self):
A string, the operational status of the module from one of the
predefined status values: MODULE_STATUS_EMPTY, MODULE_STATUS_OFFLINE,
MODULE_STATUS_FAULT, MODULE_STATUS_PRESENT or MODULE_STATUS_ONLINE
The SmartSwitch platforms will have these additional status
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should remain the same

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.

None yet

5 participants