1 # Each method follows the following format:
2 # CustomPCU_loginbase()
4 # This provides a simple means of lookup given the custom type.
5 # The only problem might come up if a single site has multiple custom PCUs.
6 # That would be pretty wierd though...
8 from pcucontrol.reboot import *
10 class CustomPCU_uniklu(PCUControl):
11 def run_http(self, node_port, dryrun):
12 url = "https://www-itec.uni-klu.ac.at/plab-pcu/index.php"
15 # Turn host off, then on
16 formstr = "plab%s=off" % node_port
17 os.system("curl --user %s:%s --form '%s' --insecure %s" % (self.username, self.password, formstr, url))
19 formstr = "plab%s=on" % node_port
20 os.system("curl --user %s:%s --form '%s' --insecure %s" % (self.username, self.password, formstr, url))
22 os.system("curl --user %s:%s --insecure %s" % (self.username, self.password, url))