git://git.onelab.eu
/
monitor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
56ba19a
)
Added new squence for apc_reboot()
author
Stephen Soltesz
<soltesz@cs.princeton.edu>
Wed, 7 Nov 2007 19:52:12 +0000
(19:52 +0000)
committer
Stephen Soltesz
<soltesz@cs.princeton.edu>
Wed, 7 Nov 2007 19:52:12 +0000
(19:52 +0000)
reboot.py
patch
|
blob
|
history
diff --git
a/reboot.py
b/reboot.py
index
46486e2
..
581f71b
100755
(executable)
--- a/
reboot.py
+++ b/
reboot.py
@@
-160,6
+160,16
@@
def apc_reboot(ip, username, password, port, protocol, dryrun):
transport = None
transport = None
+ # TODO: I may need to differentiate between different models of APC
+ # hardware...
+ # for instance, the original code didn't work for:
+ # planetdev03.fm.intel.com
+ # American Power Conversion
+ # Network Management Card AOS v3.3.0
+ # (c) Copyright 2005 All Rights Reserved
+ # Rack PDU APP v3.3.1
+
+
try:
#if "ssh" in protocol:
if "22" in protocol and protocol['22'] == "open":
try:
#if "ssh" in protocol:
if "22" in protocol and protocol['22'] == "open":
@@
-194,7
+204,11
@@
def apc_reboot(ip, username, password, port, protocol, dryrun):
# 4- Power Supply Status
# 3- Outlet Control/Config
# 4- Power Supply Status
# 3- Outlet Control/Config
- telnet_answer(transport, "\r\n> ", "3")
+ telnet_answer(transport, "\r\n> ", "2")
+ telnet_answer(transport, "\r\n> ", "1")
+
+ # 3- Outlet Control/Config
+ #telnet_answer(transport, "\r\n> ", "3")
# 1- Outlet 1
# 2- Outlet 2
# 1- Outlet 1
# 2- Outlet 2