[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 143: Make the device_type a config item for the board type

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

Commit Message

Paul Larson Oct. 20, 2011, 3:24 p.m.
Merge authors:
  Michael Hudson-Doyle (mwhudson)
Related merge proposals:
  https://code.launchpad.net/~mwhudson/lava-dispatcher/dont-infer-lmc-name-for-board-bug-877045/+merge/79906
  proposed by: Michael Hudson-Doyle (mwhudson)
  review: Approve - Paul Larson (pwlars)
------------------------------------------------------------
revno: 143 [merge]
committer: Paul Larson <paul.larson@canonical.com>
branch nick: lava-dispatcher
timestamp: Thu 2011-10-20 10:20:56 -0500
message:
  Make the device_type a config item for the board type
modified:
  lava_dispatcher/actions/deploy.py
  lava_dispatcher/client.py
  lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf


--
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/actions/deploy.py'
--- lava_dispatcher/actions/deploy.py	2011-10-20 10:19:30 +0000
+++ lava_dispatcher/actions/deploy.py	2011-10-20 15:20:56 +0000
@@ -165,7 +165,7 @@ 
 
         cmd = ("sudo flock /var/lock/lava-lmc.lck linaro-media-create --hwpack-force-yes --dev %s "
                "--image-file %s --binary %s --hwpack %s --image-size 3G" %
-               (client.device_type, image_file, rootfs_path, hwpack_path))
+               (client.lmc_dev_arg, image_file, rootfs_path, hwpack_path))
         logging.info("Executing the linaro-media-create command")
         logging.info(cmd)
         rc, output = getstatusoutput(cmd)

=== modified file 'lava_dispatcher/client.py'
--- lava_dispatcher/client.py	2011-10-20 14:49:29 +0000
+++ lava_dispatcher/client.py	2011-10-20 15:20:56 +0000
@@ -76,6 +76,10 @@ 
     def default_network_interface(self):
         return self.device_option("default_network_interface")
 
+    @property
+    def lmc_dev_arg(self):
+        return self.device_option("lmc_dev_arg")
+
     def in_master_shell(self, timeout=10):
         """ Check that we are in a shell on the master image
         """

=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf'
--- lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf	2011-10-20 04:09:15 +0000
+++ lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf	2011-10-20 04:12:48 +0000
@@ -51,3 +51,8 @@ 
 
 # The character the boot loader uses as a prompt on this board.
 bootloader_prompt = #
+
+# The argument to pass to --dev when invoking linaro-media-create
+# Defaults to device_type because that's what was used before this
+# option was introduced.
+lmc_dev_arg = %(device_type)s