From patchwork Tue Sep 27 04:08:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael-Doyle Hudson X-Patchwork-Id: 4356 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E827F23EFB for ; Tue, 27 Sep 2011 04:08:14 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id D8ADCA18101 for ; Tue, 27 Sep 2011 04:08:14 +0000 (UTC) Received: by fxe23 with SMTP id 23so9376001fxe.11 for ; Mon, 26 Sep 2011 21:08:14 -0700 (PDT) Received: by 10.223.55.136 with SMTP id u8mr8882407fag.46.1317096494659; Mon, 26 Sep 2011 21:08:14 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.3.234 with SMTP id f10cs59360laf; Mon, 26 Sep 2011 21:08:14 -0700 (PDT) Received: by 10.227.19.193 with SMTP id c1mr8024112wbb.24.1317096493660; Mon, 26 Sep 2011 21:08:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id fl17si18980288wbb.33.2011.09.26.21.08.13 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Sep 2011 21:08:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1R8Oxp-0004mW-1H for ; Tue, 27 Sep 2011 04:08:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id F1926E23AE for ; Tue, 27 Sep 2011 04:08:12 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 122 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 122: copy device_type from job data to result metadata if present Message-Id: <20110927040812.11184.35439.launchpad@ackee.canonical.com> Date: Tue, 27 Sep 2011 04:08:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14028"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 12654e8757027d7d535e8632dea83fc6b5be6339 Merge authors: Michael Hudson-Doyle (mwhudson) Related merge proposals: https://code.launchpad.net/~mwhudson/lava-dispatcher/propagate-device_type/+merge/76938 proposed by: Michael Hudson-Doyle (mwhudson) review: Approve - Yongqin Liu (liuyq0307) ------------------------------------------------------------ revno: 122 [merge] committer: Michael Hudson-Doyle branch nick: trunk timestamp: Tue 2011-09-27 17:06:15 +1300 message: copy device_type from job data to result metadata if present modified: lava_dispatcher/__init__.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 === modified file 'lava_dispatcher/__init__.py' --- lava_dispatcher/__init__.py 2011-09-23 04:41:15 +0000 +++ lava_dispatcher/__init__.py 2011-09-26 02:36:37 +0000 @@ -60,11 +60,18 @@ else: submit_results = None + metadata = { + 'target.hostname': self.target, + } + + if 'device_type' in self.job_data: + metadata['target.device_type'] = self.job_data['device_type'] + self.context.test_data.add_metadata(metadata) + try: for cmd in self.job_data['actions']: params = cmd.get('parameters', {}) metadata = cmd.get('metadata', {}) - metadata['target.hostname'] = self.target self.context.test_data.add_metadata(metadata) action = lava_commands[cmd['command']](self.context) try: