Add a new BayTech prompt type.
authorStephen Soltesz <soltesz@cs.princeton.edu>
Thu, 28 Feb 2008 21:14:40 +0000 (21:14 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Thu, 28 Feb 2008 21:14:40 +0000 (21:14 +0000)
reboot.py

index 98f74af..f8d772f 100755 (executable)
--- 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'])