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

etc: add device file for HPE Proliant DL325 Gen10 #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions etc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pkgsysconf_DATA = \
devices/redfishpower-cray-windom.dev \
devices/redfishpower-cray-ex.dev \
devices/redfishpower-cray-ex-rabbit.dev \
devices/redfishpower-hpe-proliant-dl325-gen10-plus.dev \
devices/phantom.dev \
devices/plmpower.dev \
devices/powerman.dev \
Expand Down
62 changes: 62 additions & 0 deletions etc/devices/redfishpower-hpe-proliant-dl325-gen10-plus.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Support for Redfish Rest Interface
#
# Powerman.conf should look something like this:
# include "/etc/powerman/redfishpower-hpe-proliant-dl325-gen10-plus.dev"
# device "redfishpower" "redfishpower-hpe-proliant-dl325-gen10-plus" "/usr/sbin/redfishpower -h pnode[1-2] |&"
# node "node1" "redfishpower" "pnode1"
# node "node2" "redfishpower" "pnode2"
#
# - If necessary, set your system's username/password via redfishpower's
# --auth option.
#
# - This device specification was tested on a EAS3 HP ProLiant DL325 node.
#
# - CAUTION: If you intend to use this file as the basis for a different
# Redfish system, read the section "UPDATING REDFISHPOWER DEVICE FILES"
# in redfishpower(8).
#
specification "redfishpower-hpe-proliant-dl325-gen10-plus" {
timeout 60

script login {
expect "redfishpower> "
send "auth USER:PASS\n"
expect "redfishpower> "
send "setheader Content-Type:application/json\n"
expect "redfishpower> "
send "setstatpath redfish/v1/Systems/1\n"
expect "redfishpower> "
send "setonpath redfish/v1/Systems/1/Actions/ComputerSystem.Reset {\"ResetType\":\"On\"}\n"
expect "redfishpower> "
send "setoffpath redfish/v1/Systems/1/Actions/ComputerSystem.Reset {\"ResetType\":\"ForceOff\"}\n"
expect "redfishpower> "
send "settimeout 60\n"
expect "redfishpower> "
}
script logout {
send "quit\n"
}
script status_all {
send "stat\n"
foreachnode {
expect "([^\n:]+): ([^\n]+\n)"
setplugstate $1 $2 on="^on\n" off="^off\n"
}
expect "redfishpower> "
}
script on_ranged {
send "on %s\n"
expect "redfishpower> "
}
script off_ranged {
send "off %s\n"
expect "redfishpower> "
}
script cycle_ranged {
send "off %s\n"
expect "redfishpower> "
delay 2
send "on %s\n"
expect "redfishpower> "
}
}
Loading