bmc-toolbox/bmclib

Support for redfish based power/boot actions

joelrebel opened this issue · 0 comments

Since HP, Dell and Supermicro have decent support for Redfish to carry out power actions,
and these actions seem to work reliably - much better than the IPMI based actions,
we can add this support to bmclib

As a start we add support for these methods,

This could be implemented by integrating with redgopher

  • PXE once
curl -sk -H "$token" -H "Content-Type: application/json" -X PATCH https://$1/redfish/v1/Systems/1/ -d '{"Boot": {"BootSourceOverrideTarget": "Pxe", "BootSourceOverrideEnabled": "Once"}}'
  • Restart
curl -sk -H "$token" -H "Content-Type: application/json" -X POST https://$1/redfish/v1/Systems/1/Actions/ComputerSystem.Reset/ -d '{"ResetType": "ForceRestart"}'
  • Power off
#curl -sk -H "$token" -H "Content-Type: application/json" -X POST https://$1/redfish/v1/Systems/1/Actions/ComputerSystem.Reset/ -d '{"ResetType": "ForceOff"}'
  • Power on
curl -sk -H "$token" -H "Content-Type: application/json" -X POST https://$1/redfish/v1/Systems/1/Actions/ComputerSystem.Reset/ -d '{"ResetType": "On"}'

As a bonus, just for the HP Gen 10 and higher we add

curl -sk -H "$token" -H "Content-Type: application/json" -X PATCH https://$1/redfish/v1/Systems/1/ -d '{"Boot": {"BootSourceOverrideTarget": "UefiHttp", "BootSourceOverrideEnabled": "Once"}}'

Task list

  • HP
  • Dell
  • Supermicro