diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 420: add a dummy_deployment action to allow dispatcher testing without having to do the time consuming...

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

Commit Message

Michael-Doyle Hudson Oct. 24, 2012, 9:23 p.m. UTC
Merge authors:
  Michael Hudson-Doyle (mwhudson)
Related merge proposals:
  https://code.launchpad.net/~mwhudson/lava-dispatcher/dummy-deployment/+merge/131126
  proposed by: Michael Hudson-Doyle (mwhudson)
------------------------------------------------------------
revno: 420 [merge]
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Thu 2012-10-25 10:15:01 +1300
message:
  add a dummy_deployment action to allow dispatcher testing without having to do the time consuming deploy each time
removed:
  lava_dispatcher/actions/android_deploy.py
renamed:
  lava_dispatcher/actions/lava-android-test.py => lava_dispatcher/actions/lava_android_test.py
  lava_dispatcher/actions/lava-test.py => lava_dispatcher/actions/lava_test.py
modified:
  lava_dispatcher/actions/deploy.py
  lava_dispatcher/device/master.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
diff mbox

Patch

=== removed file 'lava_dispatcher/actions/android_deploy.py'
--- lava_dispatcher/actions/android_deploy.py	2012-09-30 17:01:44 +0000
+++ lava_dispatcher/actions/android_deploy.py	1970-01-01 00:00:00 +0000
@@ -1,39 +0,0 @@ 
-#!/usr/bin/python
-
-# Copyright (C) 2011 Linaro Limited
-#
-# Author: Linaro Validation Team <linaro-dev@lists.linaro.org>
-#
-# This file is part of LAVA Dispatcher.
-#
-# LAVA Dispatcher is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# LAVA Dispatcher is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses>.
-
-from lava_dispatcher.actions import BaseAction
-
-
-class cmd_deploy_linaro_android_image(BaseAction):
-
-    parameters_schema = {
-        'type': 'object',
-        'properties': {
-            'boot': {'type': 'string'},
-            'system': {'type': 'string'},
-            'data': {'type': 'string'},
-            'rootfstype': {'type': 'string', 'optional': True, 'default': 'ext4'},
-            },
-        'additionalProperties': False,
-        }
-
-    def run(self, boot, system, data, rootfstype='ext4'):
-        self.client.deploy_linaro_android(boot, system, data, rootfstype)

=== modified file 'lava_dispatcher/actions/deploy.py'
--- lava_dispatcher/actions/deploy.py	2012-09-30 17:01:44 +0000
+++ lava_dispatcher/actions/deploy.py	2012-10-24 01:34:07 +0000
@@ -72,3 +72,36 @@ 
     def run(self, hwpack=None, rootfs=None, image=None, rootfstype='ext3'):
         self.client.deploy_linaro(
             hwpack=hwpack, rootfs=rootfs, image=image, rootfstype=rootfstype)
+
+
+class cmd_deploy_linaro_android_image(BaseAction):
+
+    parameters_schema = {
+        'type': 'object',
+        'properties': {
+            'boot': {'type': 'string'},
+            'system': {'type': 'string'},
+            'data': {'type': 'string'},
+            'rootfstype': {'type': 'string', 'optional': True, 'default': 'ext4'},
+            },
+        'additionalProperties': False,
+        }
+
+    def run(self, boot, system, data, rootfstype='ext4'):
+        self.client.deploy_linaro_android(boot, system, data, rootfstype)
+
+
+class cmd_dummy_deploy(BaseAction):
+
+    parameters_schema = {
+        'type': 'object',
+        'properties': {
+            'type': {'type': 'string', 'enum':['ubuntu', 'oe', 'android']},
+            },
+        'additionalProperties': False,
+        }
+
+    def run(self, type):
+        device = self.client.target_device
+        device.boot_master_image()
+        device.deployment_data = device.target_map[type]

=== renamed file 'lava_dispatcher/actions/lava-android-test.py' => 'lava_dispatcher/actions/lava_android_test.py'
=== renamed file 'lava_dispatcher/actions/lava-test.py' => 'lava_dispatcher/actions/lava_test.py'
=== modified file 'lava_dispatcher/device/master.py'
--- lava_dispatcher/device/master.py	2012-10-23 17:58:40 +0000
+++ lava_dispatcher/device/master.py	2012-10-24 01:43:42 +0000
@@ -69,8 +69,9 @@ 
         Target.ubuntu_deployment_data['data_type'] = 'ubuntu'
         Target.oe_deployment_data['data_type'] = 'oe'
         self.target_map = {
+            'android': Target.android_deployment_data,
+            'oe': Target.oe_deployment_data,
             'ubuntu': Target.ubuntu_deployment_data,
-            'oe': Target.oe_deployment_data,
             }
 
         self.master_ip = None