From 1e9ec7f7f382204d755931cd0a16bb9fa961c3d6 Mon Sep 17 00:00:00 2001 From: Stephen Soltesz Date: Thu, 28 Feb 2008 21:14:40 +0000 Subject: [PATCH] Add a new BayTech prompt type. --- reboot.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/reboot.py b/reboot.py index 98f74af..f8d772f 100755 --- a/reboot.py +++ b/reboot.py @@ -612,6 +612,24 @@ class HPiLOHttps(PCUControl): return 0 +class BayTechAU(PCUControl): + def run(self, node_port, dryrun): + self.open(self.host, self.username, None, "Enter user name:") + self.sendPassword(self.password, "Enter Password:") + + #self.ifThenSend("RPC-16>", "Status") + self.ifThenSend("RPC3-NC>", "Reboot %d" % node_port) + + # Reboot Outlet N (Y/N)? + if dryrun: + self.ifThenSend("(Y/N)?", "N") + else: + self.ifThenSend("(Y/N)?", "Y") + self.ifThenSend("RPC3-NC>", "") + + self.close() + return 0 + class BayTechGeorgeTown(PCUControl): def run(self, node_port, dryrun): self.open(self.host, self.username, None, "Enter user name:") @@ -1170,6 +1188,10 @@ def reboot_test(nodename, values, continue_probe, verbose, dryrun): baytech = BayTechCtrlC(values, verbose, ['22', '23']) rb_ret = baytech.reboot(values[nodename], dryrun) + elif values['pcu_id'] in [93]: + baytech = BayTechAU(values, verbose, ['22', '23']) + rb_ret = baytech.reboot(values[nodename], dryrun) + elif values['pcu_id'] in [1057]: # These require a 'ctrl-c' to be sent... baytech = BayTechCtrlCUnibe(values, verbose, ['22', '23']) -- 2.47.0