1 from pcucontrol.reboot import *
2 from distutils.sysconfig import get_python_lib;
5 class HPiLO(BasicPCUControl):
6 supported_ports = [443,22]
7 def run(self, node_port, dryrun):
8 if self.type == Transport.SSH:
9 return self.run_ssh(node_port, dryrun)
10 elif self.type == Transport.HTTP or self.type == Transport.HTTPS:
11 return self.run_https(node_port, dryrun)
13 raise ExceptionNoTransport("Unimplemented Transport for HPiLO %s" % self.type)
15 def pcu_run(self, node_port):
16 r = self.run_https(node_port, dryrun=False)
19 r2 = self.run_ssh(node_port, dryrun=False)
24 def pcu_test(self, node_port):
25 r = self.run_https(node_port, dryrun=True)
28 r2 = self.run_ssh(node_port, dryrun=True)
33 def run_ssh(self, node_port, dryrun):
34 return self.run_expect_script("HPiLO.exp ssh", dryrun=dryrun, model="None")
36 def run_https(self, node_port, dryrun):
37 return self.run_expect_script("HPiLO.exp https", dryrun=dryrun, model="None")