move pcucontrol package into pcucontrol module.
[pcucontrol.git] / pcucontrol / models / WTIIPS4.py
1 from pcucontrol.reboot import *
2
3 class WTIIPS4(PCUControl):
4         supported_ports = [23]
5         def run_telnet(self, node_port, dryrun):
6                 self.transport.open(self.host)
7                 self.transport.sendPassword(self.password, "Enter Password:")
8
9                 self.transport.ifThenSend("IPS> ", "/Boot %s" % node_port)
10                 if not dryrun:
11                         self.transport.ifThenSend("Sure? (Y/N): ", "N")
12                 else:
13                         self.transport.ifThenSend("Sure? (Y/N): ", "Y")
14
15                 self.transport.ifThenSend("IPS> ", "")
16
17                 self.transport.close()
18                 return 0