X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=reboot.py;h=c41bac8feb04e97ef91439dbe2408e548a840542;hb=d5b0651a666c9a6b2deb4103ed15c3c06075395d;hp=4cccdf0a3499dec0702a5c6f5d9db5d242c10976;hpb=d0652340b89d51c6115edb13d5c7c72b34dea66f;p=monitor.git diff --git a/reboot.py b/reboot.py index 4cccdf0..c41bac8 100755 --- a/reboot.py +++ b/reboot.py @@ -562,7 +562,8 @@ class IntelAMT(PCUControl): import soltesz cmd = soltesz.CMD() - cmd_str = "IntelAMTSDK/Samples/RemoteControl/remoteControl" + #[cmd_str = "IntelAMTSDK/Samples/RemoteControl/remoteControl" + cmd_str = "cmdamt/remoteControl" if dryrun: # NOTE: -p checks the power state of the host. @@ -904,6 +905,20 @@ class ePowerSwitchGood(PCUControl): self.close() return 0 +class CustomPCU(PCUControl): + def run(self, node_port, dryrun): + url = "https://www-itec.uni-klu.ac.at/plab-pcu/index.php" + + if not dryrun: + # Turn host off, then on + formstr = "plab%s=off" % node_port + os.system("curl --user %s:%s --form '%s' --insecure %s" % (self.username, self.password, formstr, url)) + time.sleep(5) + formstr = "plab%s=on" % node_port + os.system("curl --user %s:%s --form '%s' --insecure %s" % (self.username, self.password, formstr, url)) + else: + os.system("curl --user %s:%s --insecure %s" % (self.username, self.password, url)) + class ePowerSwitchOld(PCUControl): def run(self, node_port, dryrun): @@ -1299,6 +1314,9 @@ def reboot_test(nodename, values, continue_probe, verbose, dryrun): eps = ePowerSwitchGood(values, verbose, ['80']) rb_ret = eps.reboot(values[nodename], dryrun) + elif continue_probe and values['pcu_id'] in [1122]: + custom = CustomPCU(values, verbose, ['80', '443']) + custom.reboot(values[nodename], dryrun) elif continue_probe: rb_ret = "Unsupported_PCU"