log_user 0
+set path [ file dirname [ file dirname $argv0 ] ]
+
if { "$method" == "https" } {
if { "$dryrun" == "True" } {
- set file $path/iloxml/Get_Network.xml
+ set file $path/hpilo/iloxml/Get_Network.xml
} else {
- #set file $path/iloxml/Reset_Server.xml
- set file $path/iloxml/Get_Network.xml
+ set file $path/hpilo/iloxml/Reset_Server.xml
+ #set file $path/hpilo/iloxml/Get_Network.xml
}
- spawn "$path/locfg.pl" -s $host -u $user -p '$password' -f $file
+ spawn "$path/hpilo/locfg.pl" -s $host -u $user -p $password -f $file
} elseif { "$method" == "ssh" } {
if { "$dryrun" == "True" } {
set reset_cmd "POWER\r"
set reset_msg "Test: No error"
} else {
- #set reset_cmd "reset\r"
- set reset_cmd "POWER\r"
+ #set reset_cmd "POWER\r"
+ set reset_cmd "reset\r"
set reset_msg "Reset: No error"
}
spawn ssh $user@$host
"MESSAGE='Host power is already ON.'" { send_user "$expect_out(0,string)"}
"MESSAGE='Host power is already OFF.'" { send_user "$expect_out(0,string)"}
"MESSAGE='Login credentials rejected.'" { send_user "$expect_out(0,string)"}
+ "MESSAGE='User login name was not found'" { send_user "$expect_out(0,string)"}
"<GET_NETWORK_SETTINGS>" { send_user "Test: No error"}
-re "ERROR:.*" { send_user "$expect_out(0,string)" }
eof { send_user "Reached EOF without status report: $expect_out(buffer)" }
"password: " { send "$password\n" ; exp_continue }
"Permission denied" { send_user "HPiLO username/password: $expect_out(0,string)"; exit }
"Could not resolve hostname" { send_user "HPiLO hostname: $expect_out(0,string)"; exit }
+ "Connection timed out" { send_user "HPiLO ssh timeout: $expect_out(0,string)"; exit }
"</>hpiLO-> " { send "cd system1\r" }
+ eof { send_user "HPiLO early EOF\n"; exit }
}
expect "</system1>hpiLO-> " { send $reset_cmd }