From patchwork Thu Sep 12 08:20:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Senthil Kumaran X-Patchwork-Id: 19992 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7A5E725B63 for ; Thu, 12 Sep 2013 08:20:38 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id e13sf11511800vbg.4 for ; Thu, 12 Sep 2013 01:20:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:to:from:subject :message-id:date:reply-to:sender:errors-to:precedence :x-original-sender:x-original-authentication-results:mailing-list :list-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=qAhE8hl1d/fpzqW6Tbb5A05N1b8TkiCH27JQimT9Qvs=; b=GpJl435jrRR44PimJLiAsxvecdu58bMISICaa0sIZWJQ5AdHrsn3LT/JMtA1aAt8QY 325cxaPwh+CwjJgUFwhtUjcsfKCcl4CUP7WRzOaV+gposH1cwmeYDHjuS0co7fY7fXl1 182YPMEXvtq5U4ke85o/i4J7YpEO4OkF/RAhYiYEJt88mje8qeVVuswLHItPD1gMC3Jn OV8EzVaYhOLyAzjebbCQEbgOA0gPFLc00Mc4afNWb6UAFWvRaDjD57fRMlwCnroCcxZa 6KuzTJbRlRvQAt6DDlNeJzC0qZVMeBlxvGE8keqaFPxShTKr9tVE2zbbeSbfBVuwWtDO jcCw== X-Gm-Message-State: ALoCoQl6mdrMlIKT+rOl88kl17w9BKBNLCj6GEctKst50J4hWTHOv/Pa6V+jlP6ccU2xyK7kk6lT X-Received: by 10.236.2.5 with SMTP id 5mr2380064yhe.23.1378974038228; Thu, 12 Sep 2013 01:20:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.47.82 with SMTP id b18ls613765qen.53.gmail; Thu, 12 Sep 2013 01:20:38 -0700 (PDT) X-Received: by 10.52.107.134 with SMTP id hc6mr4461733vdb.10.1378974037981; Thu, 12 Sep 2013 01:20:37 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id un5si824133vcb.97.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Sep 2013 01:20:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id pa12so7606139veb.30 for ; Thu, 12 Sep 2013 01:20:37 -0700 (PDT) X-Received: by 10.52.120.78 with SMTP id la14mr4715681vdb.9.1378974037884; Thu, 12 Sep 2013 01:20:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp6371vcz; Thu, 12 Sep 2013 01:20:37 -0700 (PDT) X-Received: by 10.180.185.146 with SMTP id fc18mr20911216wic.44.1378974036896; Thu, 12 Sep 2013 01:20:36 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id o9si7887866wic.15.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 12 Sep 2013 01:20:36 -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; Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1VK28i-0006fz-AL for ; Thu, 12 Sep 2013 08:20:36 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 3F198ECB9B for ; Thu, 12 Sep 2013 08:20:36 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-scheduler X-Launchpad-Branch: ~linaro-validation/lava-scheduler/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 263 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-scheduler/trunk] Rev 263: Fix bug #1224260 - split_multi_job makes assumptions about the job JSON that Message-Id: <20130912082036.13140.2900.launchpad@ackee.canonical.com> Date: Thu, 12 Sep 2013 08:20:36 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16761"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 82c8fd2889769788d15bf36672d899a0f822620d X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: noreply@launchpad.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Merge authors: Senthil Kumaran S (stylesen) Related merge proposals: https://code.launchpad.net/~stylesen/lava-scheduler/fix-bug-1224260/+merge/185211 proposed by: Senthil Kumaran S (stylesen) review: Approve - Neil Williams (codehelp) ------------------------------------------------------------ revno: 263 [merge] committer: Senthil Kumaran branch nick: trunk timestamp: Thu 2013-09-12 13:49:58 +0530 message: Fix bug #1224260 - split_multi_job makes assumptions about the job JSON that are not enforced by the schema. Respect parameters that are marked as optional in the job schema. modified: lava_scheduler_app/utils.py --- lp:lava-scheduler https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk You are subscribed to branch lp:lava-scheduler. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk/+edit-subscription === modified file 'lava_scheduler_app/utils.py' --- lava_scheduler_app/utils.py 2013-09-02 16:22:57 +0000 +++ lava_scheduler_app/utils.py 2013-09-12 07:07:01 +0000 @@ -81,15 +81,21 @@ for c in range(0, count): node_json[role].append({}) node_json[role][c]["timeout"] = json_jobdata["timeout"] - node_json[role][c]["job_name"] = json_jobdata["job_name"] - node_json[role][c]["tags"] = clients["tags"] + if json_jobdata.get("job_name", False): + node_json[role][c]["job_name"] = json_jobdata["job_name"] + if clients.get("tags", False): + node_json[role][c]["tags"] = clients["tags"] node_json[role][c]["group_size"] = group_count node_json[role][c]["target_group"] = target_group node_json[role][c]["actions"] = node_actions[role] node_json[role][c]["role"] = role # multinode node stage 2 - node_json[role][c]["logging_level"] = json_jobdata["logging_level"] + if json_jobdata.get("logging_level", False): + node_json[role][c]["logging_level"] = \ + json_jobdata["logging_level"] + if json_jobdata.get("priority", False): + node_json[role][c]["priority"] = json_jobdata["priority"] node_json[role][c]["device_type"] = clients["device_type"] return node_json