1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
# HP Management Processor device (MP) for high-end cellular systems
#
# (c) Copyright 2009 Hewlett-Packard Development Company, L.P.
# Bjorn Helgaas <bjorn.helgaas@hp.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# Example:
# device "sd-001" "hpmpdome" "sd-001-mp.test:23"
# node "sd-001-p0" "sd-001" "0"
#
# Tested on:
# SD64B (MP firmware 26.5.1)
#
# This handles each partition separately. The "plug" argument to node is the
# partition number.
#
# N.B. This only works on Superdomes, not mid-range cellular systems.
specification "hpmpdome" {
timeout 10
script login {
expect "MP login: "
send "Admin\r\n"
expect "MP password: "
send "Admin\r\n"
expect "MP> "
send "cm\r\n"
expect "MP:CM> "
}
script status {
send "pe\r\n"
expect "Select Device: "
send "p\r\n"
expect "Select a partition number: "
send "%s\r\n"
expect "The power state is (ON|OFF)"
setplugstate $1 on="ON" off="OFF"
expect "In what state do you want the power.*\? "
send "q\r\n"
expect "MP:CM> "
}
script on {
send "pe\r\n"
expect "Select Device: "
send "p\r\n"
expect "Select a partition number: "
send "%s\r\n"
expect "The power state is (ON|OFF)"
setplugstate $1 on="ON" off="OFF"
expect "In what state do you want the power.*\? "
send "on\r\n"
expect "MP:CM> "
}
script off {
send "pe\r\n"
expect "Select Device: "
send "p\r\n"
expect "Select a partition number: "
send "%s\r\n"
expect "The power state is (ON|OFF)"
setplugstate $1 on="ON" off="OFF"
expect "In what state do you want the power.*\? "
send "off\r\n"
expect "MP:CM> "
}
script reset {
send "rs\r\n"
expect "Select a partition number: "
send "%s\r\n"
expect "Do you want to reset partition number.*\? "
send "y\r\n"
expect "MP:CM> "
}
}
|