initial
This commit is contained in:
commit
7a7bc34ae3
32 changed files with 4857 additions and 0 deletions
12
modules/kubernetes/idrac-power-cycle.sh
Normal file
12
modules/kubernetes/idrac-power-cycle.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
user="user"
|
||||
pass="pass"
|
||||
# Get power supply on outside system voltage
|
||||
curl -s -k -u $user:$pass -H"Content-type: application/json" -X GET https://idrac/redfish/v1/Chassis/System.Embedded.1/Power/PowerSupplies/PSU.Slot.2 |jq .LineInputVoltage
|
||||
|
||||
# Power off
|
||||
curl -s -k -u $user:$pass -X POST -d '{"Action": "Reset", "ResetType": "GracefulShutdown"}' -H"Content-type: application/json" https://idrac/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset
|
||||
|
||||
# Power on
|
||||
curl -s -k -u $user:$pass -X POST -d '{"Action": "Reset", "ResetType": "On"}' -H"Content-type: application/json" https://idrac/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset
|
||||
Loading…
Add table
Add a link
Reference in a new issue