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 79 80
|
# HP Management Processor device (MP) for mid-range 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 "rx8620-001" "hpmpcell" "rx8620-001-mp.test:23"
# node "rx8620-001-p0" "rx8620-001" "0"
#
# Tested on:
# rx8620 (MP firmware A.7.008, A.8.005)
#
# This handles each partition separately. The "plug" argument to node is the
# partition number.
#
# N.B. This only works on mid-range, e.g., rx7620, rx7640, rx8620, and rx8640.
# It doesn't handle Superdome because Superdome uses "P" to select partition,
# not "R". It should support PA-RISC systems, e.g., rp7620, rp7640, etc.
specification "hpmpcell" {
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 "r\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 "r\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 "r\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> "
}
}
|