[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 637: Remove highbank brand from IPMI/PXE device support code

Message ID 20130715174816.25331.20730.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Antonio Terceiro July 15, 2013, 5:48 p.m.
Merge authors:
  Antonio Terceiro (terceiro)
Related merge proposals:
  https://code.launchpad.net/~terceiro/lava-dispatcher/generalize-ipmi-pxe/+merge/164781
  proposed by: Antonio Terceiro (terceiro)
------------------------------------------------------------
revno: 637 [merge]
committer: Antonio Terceiro <antonio.terceiro@linaro.org>
branch nick: trunk
timestamp: Mon 2013-07-15 14:46:28 -0300
message:
  Remove highbank brand from IPMI/PXE device support code
renamed:
  lava_dispatcher/device/highbank.py => lava_dispatcher/device/ipmi_pxe.py
modified:
  lava_dispatcher/default-config/lava-dispatcher/device-types/highbank.conf
  lava_dispatcher/device/ipmi_pxe.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription

Patch

=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-types/highbank.conf'
--- lava_dispatcher/default-config/lava-dispatcher/device-types/highbank.conf	2013-02-14 03:14:34 +0000
+++ lava_dispatcher/default-config/lava-dispatcher/device-types/highbank.conf	2013-05-20 17:49:09 +0000
@@ -1,2 +1,2 @@ 
-client_type = highbank
+client_type = ipmi_pxe
 connection_command = ipmitool -I lanplus -U admin -P admin -H %(ecmeip)s sol activate

=== renamed file 'lava_dispatcher/device/highbank.py' => 'lava_dispatcher/device/ipmi_pxe.py'
--- lava_dispatcher/device/highbank.py	2013-05-30 01:41:52 +0000
+++ lava_dispatcher/device/ipmi_pxe.py	2013-07-15 17:44:58 +0000
@@ -52,13 +52,13 @@ 
 from lava_dispatcher.ipmi import IpmiPxeBoot
 
 
-class HighbankTarget(Target):
+class IpmiPxeTarget(Target):
 
     MASTER_PS1 = 'root@master [rc=$(echo \$?)]# '
     MASTER_PS1_PATTERN = 'root@master \[rc=(\d+)\]# '
 
     def __init__(self, context, config):
-        super(HighbankTarget, self).__init__(context, config)
+        super(IpmiPxeTarget, self).__init__(context, config)
         self.proc = self.context.spawn(self.config.connection_command, timeout=1200)
         self.device_version = None
         if self.config.ecmeip == None:
@@ -235,7 +235,7 @@ 
         self.proc.expect("\(initramfs\)")
         self.proc.sendline('export PS1="%s"' % self.MASTER_PS1)
         self.proc.expect(self.MASTER_PS1_PATTERN, timeout=180, lava_no_logging=1)
-        runner = HBMasterCommandRunner(self)
+        runner = BusyboxHttpdMasterCommandRunner(self)
 
         runner.run(". /scripts/functions")
         runner.run("DEVICE=%s configure_networking" % 
@@ -260,21 +260,21 @@ 
            logging.debug("deploy done")
 
 
-target_class = HighbankTarget
-
-
-class HBMasterCommandRunner(MasterCommandRunner):
+target_class = IpmiPxeTarget
+
+
+class BusyboxHttpdMasterCommandRunner(MasterCommandRunner):
     """A CommandRunner to use when the target is booted into the master image.
     """
     http_pid = None
     
     def __init__(self, target):
-        super(HBMasterCommandRunner, self).__init__(target)
+        super(BusyboxHttpdMasterCommandRunner, self).__init__(target)
 
     def start_http_server(self):
         master_ip = self.get_master_ip()
         if self.http_pid != None:
-            raise OperationFailed("busybox httpd already running with pid %" % self.http_pid)
+            raise OperationFailed("busybox httpd already running with pid %d" % self.http_pid)
         # busybox produces no output to parse for, so run it in the bg and get its pid
         self.run('busybox httpd -f &')
         self.run('echo pid:$!:pid',response="pid:(\d+):pid",timeout=10)