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

Common power consumption and supply APIs for modular chassis #136

Merged
merged 3 commits into from
Nov 12, 2020

Conversation

mprabhu-nokia
Copy link
Contributor

@mprabhu-nokia mprabhu-nokia commented Oct 20, 2020

sonic-platform-base: Changes to introduce APIs for modular chassis for power-consumption and supplied

HLD: sonic-net/SONiC#646

PSUd APIs for power requirement calculations

get_maximum_supplied_power() - per PSU
get_status_master_led() - get master psu led status. Class method.
set_status_master_led() - set master psu led status. Class method.

get_maximum_consumed_power(self) - per consumer API. Consumers are modules, Fans

@shyam77git
Copy link

As discussed in 10/21 sync-up mtg., LEDs are just no specific to PSUs only.
Other boards on the chassis - Supervisor, LC, FC and Fan Trays too have LEDs + chassis itself has LEDs.
Recommend having a LED daemon/service as part of PMON HLD to manage (get/set/monitor) them all and have some 'show led' CLI to display them. Note: this to be different from current ledd daemon/service which manages optics/interfaces LEDs

@shyam77git
Copy link

Recommend get_status_master_led() and set_status_master_led() as optional methods as not all platform has/support this.

@mprabhu-nokia
Copy link
Contributor Author

Recommend get_status_master_led() and set_status_master_led() as optional methods as not all platform has/support this.

Yes, these will be made optional.

Recommend get_status_master_led() and set_status_master_led() as optional methods as not all platform has/support this.

Yes, these are optional.

@jleveque
Copy link
Contributor

Please fix conflicts

PSUd APIs for power requirement calculations

get_maximum_supplied_power() - per PSU
get_all_power_consumers() - per platform to get power consumers
get_maximum_consumed_power() - get total consumed power per consumer
get_status_master_led() - get master psu led status
set_status_master_led() - set master psu led status
Addressed review-comments to move get_maxiumum_consumed_power(),
get_status_master_led() and set_status_master_led() to PSU etc.
This can in future be added to Fan and other peripherals
@mprabhu-nokia
Copy link
Contributor Author

Please fix conflicts

Resolved conflicts.

@jleveque
Copy link
Contributor

@Staphylo, @Junchao-Mellanox, @minionatwork: Please review again.

@jleveque jleveque merged commit 8813b1d into sonic-net:master Nov 12, 2020
@jleveque
Copy link
Contributor

@mprabhu-nokia: Please also add corresponding tests for these APIs to the platform API tests in the sonic-mgmt repo.

@mprabhu-nokia
Copy link
Contributor Author

@mprabhu-nokia: Please also add corresponding tests for these APIs to the platform API tests in the sonic-mgmt repo.

Will do.

@mprabhu-nokia mprabhu-nokia deleted the nokia-psud-pr branch November 12, 2020 21:43
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