From: Stephen Soltesz Date: Wed, 7 Nov 2007 19:52:12 +0000 (+0000) Subject: Added new squence for apc_reboot() X-Git-Tag: Monitor-1.0-0~36 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=130b64b59e5dd4e2b0fc307940de873aef45b989;p=monitor.git Added new squence for apc_reboot() --- diff --git a/reboot.py b/reboot.py index 46486e2..581f71b 100755 --- a/reboot.py +++ b/reboot.py @@ -160,6 +160,16 @@ def apc_reboot(ip, username, password, port, protocol, dryrun): 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": @@ -194,7 +204,11 @@ def apc_reboot(ip, username, password, port, protocol, dryrun): # 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