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

test, don't merge: hmc support #1256

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jiangphcn
Copy link
Contributor

No description provided.

@jiangphcn jiangphcn force-pushed the s390-base branch 2 times, most recently from 53246e8 to 58e6f29 Compare February 25, 2024 23:24
Signed-off-by: Peng Hui Jiang <[email protected]>
@huoqifeng
Copy link

@jiangphcn release generated in golang-zhmcclient here https://github.com/zhmcclient/golang-zhmcclient/releases/tag/v0.3.0 to support the new function.

@rootfs
Copy link
Contributor

rootfs commented Feb 26, 2024

thanks @jiangphcn this is really good! Would you be made the PR ready for the next release?

@jiangphcn
Copy link
Contributor Author

thanks so much @rootfs for your encourage, as always. Yes, I will try my best to make it be ready for next release.

type PowerHMC struct{}

func (a *PowerHMC) GetName() string {
return "hmc"
func (r *PowerHMC) GetName() string {
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we think about zhmc as it's for z/s390x ?


func (r *PowerHMC) GetHMCManager() *zhmcclient.ZhmcManager {
if hmcManager == nil {
endpoint := os.Getenv("HMC_ENDPOINT")
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure we should add a PREFIX such as Z_ so it will be easier for other platform to know it's for z only?

}
energy, _, err := hmcManager.GetEnergyDetailsforLPAR(lparURI, props)
if err != nil {
klog.V(1).Infof("Error getting energy data: %v", err.Message)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this need return error ?


func (r *PowerHMC) GetNodeComponentsEnergy() map[int]source.NodeComponentsEnergy {
pkgEnergy, _ := r.GetLiveEnergyFromLpar()
pkgEnergy = pkgEnergy * 3
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe we can write some info here about why we need this *3

@sthaha sthaha marked this pull request as draft July 25, 2024 01:36
@sthaha
Copy link
Collaborator

sthaha commented Jul 25, 2024

@jiangphcn , I have converted this to a draft to indicate WIP.

@jiangphcn
Copy link
Contributor Author

thank you @sthaha

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.

5 participants