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

[OpenBMC] Update PowerSupplyRedundancy to use the correct endpoints #4715

Closed
whowutwut opened this issue Jan 24, 2018 · 1 comment
Closed

Comments

@whowutwut
Copy link
Member

Talking to the Firmware team today, the implementation of Power Supply is using the old interface and the correct way to get/set the value is using the setValue and getValue endpoints:

I think the PS sensor, even though the object is in the xyz/ namespace, implements the old PS interface. The right way to set a value is by calling 'SetValue' or something equivalent.

Those are these commands:

curl -b cjar -k -H "Content-Type: application/json" -X POST \
https://$BMC_IP/xyz/openbmc_project/sensors/chassis/PowerSupplyRedundancy/action/getValue \
-d '{"data": []}'

curl -b cjar -k -H "Content-Type: application/json" -X POST \
https://$BMC_IP/xyz/openbmc_project/sensors/chassis/PowerSupplyRedundancy/action/setValue \
-d '{"data": ["Enabled"]}'

curl -b cjar -k -H "Content-Type: application/json" -X POST \
https://$BMC_IP/xyz/openbmc_project/sensors/chassis/PowerSupplyRedundancy/action/setValue \
-d '{"data": ["Disabled"]}'

Update the xCAT code to use these correct endpoints

@zet809
Copy link

zet809 commented Jan 30, 2018

Verified, so close this issue.

[root@stratton01 ~]# rspconfig f6u17 powersupplyredundancy | grep PowerSupply
Tue Jan 30 00:48:05 2018 f6u17: [openbmc_debug] curl -k -b cjar -X POST -H "Content-Type: application/json" -d '{"data":[]}' https://10.6.17.100/xyz/openbmc_project/sensors/chassis/PowerSupplyRedundancy/action/getValue
f6u17: BMC PowerSupplyRedundancy : Disabled
[root@stratton01 ~]# rspconfig f6u17 powersupplyredundancy=enabled | grep PowerSupply
Tue Jan 30 00:48:41 2018 f6u17: [openbmc_debug] curl -k -b cjar -X POST -H "Content-Type: application/json" -d '{"data":["Enabled"]}' https://10.6.17.100/xyz/openbmc_project/sensors/chassis/PowerSupplyRedundancy/action/setValue
f6u17: BMC Setting BMC PowerSupplyRedundancy...

@zet809 zet809 closed this as completed Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants