import logging
logger = logging.getLogger("monitor")
-verbose = 0
+verbose = 1
#dryrun = 0;
class ExceptionNotFound(Exception): pass
# Login
telnet_answer(telnet, "Password >", password)
+ # XXX Some iPals require you to hit Enter a few times first
+ telnet.write("\r\n\r\n")
+
# P# - Pulse relay
if not dryrun:
telnet_answer(telnet, "Enter >", "P%d" % port)
# DataProbe iPal (many sites)
if continue_probe and values['model'].find("Dataprobe IP-41x/IP-81x") >= 0:
if values['portstatus']['23'] == "open":
- rb_ret = reboot.ipal_reboot(pcu_name(values),
+ rb_ret = ipal_reboot(pcu_name(values),
values['password'],
pcu[nodename],
dryrun)
elif continue_probe and values['model'].find("APC AP79xx/Masterswitch") >= 0:
if values['portstatus']['22'] == "open" or \
values['portstatus']['23'] == "open":
- rb_ret = reboot.apc_reboot(pcu_name(values),
+ rb_ret = apc_reboot(pcu_name(values),
values['username'],
values['password'],
pcu[nodename],
# BayTech DS4-RPC
elif continue_probe and values['model'].find("Baytech DS4-RPC") >= 0:
if values['portstatus']['22'] == "open":
- rb_ret = reboot.baytech_reboot(pcu_name(values),
+ rb_ret = baytech_reboot(pcu_name(values),
values['username'],
values['password'],
pcu[nodename],
# iLO
elif continue_probe and values['model'].find("HP iLO") >= 0:
if values['portstatus']['22'] == "open":
- rb_ret = reboot.ilo_reboot(pcu_name(values),
+ rb_ret = ilo_reboot(pcu_name(values),
values['username'],
values['password'],
dryrun)
# DRAC ssh
elif continue_probe and values['model'].find("Dell RAC") >= 0:
if values['portstatus']['22'] == "open":
- rb_ret = reboot.drac_reboot(pcu_name(values),
+ rb_ret = drac_reboot(pcu_name(values),
values['username'],
values['password'],
dryrun)
(values['model'].find("BlackBox PS5xx") >= 0 or
values['model'].find("ePowerSwitch 1/4/8x") >=0 ):
if values['portstatus']['80'] == "open":
- rb_ret = reboot.bbpse_reboot(pcu_name(values),
+ rb_ret = bbpse_reboot(pcu_name(values),
values['username'],
values['password'],
pcu[nodename],
# x10toggle
elif continue_probe and values['protocol'] == "ssh" and \
values['model'] == "x10toggle":
- rb_ret = reboot.x10toggle_reboot(pcu_name(values),
+ rb_ret = x10toggle_reboot(pcu_name(values),
values['username'],
values['password'],
pcu[nodename],
# ????
elif continue_probe and values['protocol'] == "racadm" and \
values['model'] == "RAC":
- rb_ret = reboot.racadm_reboot(pcu_name(values),
+ rb_ret = racadm_reboot(pcu_name(values),
values['username'],
values['password'],
pcu[nodename],