-
Notifications
You must be signed in to change notification settings - Fork 187
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
base: main
Are you sure you want to change the base?
Conversation
53246e8
to
58e6f29
Compare
Signed-off-by: Peng Hui Jiang <[email protected]>
@jiangphcn release generated in golang-zhmcclient here https://github.com/zhmcclient/golang-zhmcclient/releases/tag/v0.3.0 to support the new function. |
thanks @jiangphcn this is really good! Would you be made the PR ready for the next release? |
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 { |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
@jiangphcn , I have converted this to a draft to indicate WIP. |
thank you @sthaha |
No description provided.