From patchwork Mon Dec 3 01:23:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Doan X-Patchwork-Id: 13318 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 E041C23E1A for ; Mon, 3 Dec 2012 01:23:19 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 6A1A1A19C33 for ; Mon, 3 Dec 2012 01:23:19 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id t4so1701455iag.11 for ; Sun, 02 Dec 2012 17:23:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :content-type:mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state; bh=NxiFEMC8LCbZ98DVx2B1sxHygqZToaFLyGwnNhjK9MI=; b=XuI1CtE5ufwkN/FiGsGJj10nfgWD/AqsRd3+y4H0/wihH3LZuJcLP2yBh2vFhrKnkm Q4fkG6RI6l+Bp2QVB1ifPfadMe0cdYvxMUzxzgEfur9wKYd/e/78Msk7brRv+9jUsafn TKdKfyhDQVhS4DE8DyqafBayujxTdUkOT58z8Up4ffk+ia+4dc4qhrMDaGW87dxLifIC ubNFVSMz5XTAadWZ12lPU9m7VN1J2UPgMQwRaPByeCe0xG7YAoebBTMjY+bPqpylmjsU MC18TJg0LweQ7cETh3lL44jegFucqbT/qTx+/8x2yev4yt7ad9VI8sUVvDsRPZq99La1 +TOA== Received: by 10.50.152.137 with SMTP id uy9mr4794415igb.62.1354497798667; Sun, 02 Dec 2012 17:23:18 -0800 (PST) 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.50.67.148 with SMTP id n20csp79206igt; Sun, 2 Dec 2012 17:23:17 -0800 (PST) Received: by 10.216.202.73 with SMTP id c51mr2807870weo.102.1354497797024; Sun, 02 Dec 2012 17:23:17 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id d1si7431465weo.9.2012.12.02.17.23.15 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 02 Dec 2012 17:23:17 -0800 (PST) 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 1TfKkc-0004Uz-JE for ; Mon, 03 Dec 2012 01:23:14 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 7B266E03B0 for ; Mon, 3 Dec 2012 01:23:14 +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: 477 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 477: fix config warnings for boot_options Message-Id: <20121203012314.548.90962.launchpad@ackee.canonical.com> Date: Mon, 03 Dec 2012 01:23:14 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16319"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: c783c7526f590960cfdb8d82b56ec358a554432e X-Gm-Message-State: ALoCoQmWhU7GWwMCtgyCbViy4UkGxrwfZYD3WzH3ID77azsKzPg0LXvqdD0BgFT8wUFC92l483aV ------------------------------------------------------------ revno: 477 committer: Andy Doan branch nick: config-warnings timestamp: Sun 2012-12-02 11:40:55 -0600 message: fix config warnings for boot_options Our boot_options stuff is kind of self-defining. ie - each item in the list requires a section by that name. Configglue doesn't have a great way to validate that schema-wise, but we can ignore these sections. modified: lava_dispatcher/config.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/config.py' --- lava_dispatcher/config.py 2012-11-30 19:14:23 +0000 +++ lava_dispatcher/config.py 2012-12-02 17:40:55 +0000 @@ -172,6 +172,15 @@ return DispatcherConfig(cp, config_dir) +def _hack_boot_options(scp): + """ + Boot options are built by creating sections for each item in the + boot_options list. Those sections are managed by + lava_dispatcher.device.boot_options so we ignore here + """ + scp.extra_sections = set(scp.get('__main__', 'boot_options')) + + def get_device_config(name, config_dir): # We read the device config once to get the device type, then we start # again and read device-defaults, device-types/$device-type and @@ -186,6 +195,7 @@ config_dir, real_device_config) _get_config("devices/%s" % name, config_dir, real_device_config) real_device_config.set("__main__", "hostname", name) + _hack_boot_options(real_device_config) valid, report = real_device_config.is_valid(report=True) if not valid: logging.warning("Device config for %s is not valid:\n %s", name, '\n '.join(report))