From patchwork Tue Mar 13 01:04:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael-Doyle Hudson X-Patchwork-Id: 7244 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 9BE9123E12 for ; Tue, 13 Mar 2012 01:04:14 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 368CFA18253 for ; Tue, 13 Mar 2012 01:04:14 +0000 (UTC) Received: by iage36 with SMTP id e36so20103iag.11 for ; Mon, 12 Mar 2012 18:04:13 -0700 (PDT) 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=iebupDG6KAvj5/sHsl4FQUW/GlZM1eEIqAwvGagkHZU=; b=gNnz1z4FCM/WoXhxIh0aLux5XUfsa/udJ3LU/C52IxpbiN3VmSPpzuULCgwlBJ2fuT nXhAK8ahv3uKKtFfWR3Egwd8yRsxRQMajV4WW6PUJeATJfSGnwNLu4jwGTZpPNvq7Xiw Fk5h4Cn5Jrh7q2Ry13stQiJsXEDpzIs4nG+AVcOzHl1PbXG6O4tFxGcg1+LzD7OJ5z1k q+tYSZEITw/ij3oqodjpqoP/Ktn5gLRwx4UUJtjpDiYvq2WWt5QyAVFAtMClMhWZnanV 2o/cs4M/wvv1oQpY+1X7vzPQu/+PUvf9PuCeCvbbuGhSQqu8Br95Se2fUxyToKbtjhAY VoYg== Received: by 10.50.183.137 with SMTP id em9mr1321150igc.58.1331600653300; Mon, 12 Mar 2012 18:04:13 -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.231.53.18 with SMTP id k18csp54752ibg; Mon, 12 Mar 2012 18:04:12 -0700 (PDT) Received: by 10.180.87.8 with SMTP id t8mr2523292wiz.15.1331600651818; Mon, 12 Mar 2012 18:04:11 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id ft4si17239555wib.39.2012.03.12.18.04.10 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Mar 2012 18:04:11 -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 1S7G9q-0002tt-Nj for ; Tue, 13 Mar 2012 01:04:10 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id A8129E01F1 for ; Tue, 13 Mar 2012 01:04:10 +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: 146 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-scheduler/trunk] Rev 146: Add an admin action to put all passing boards into unknown health state, for use after a rollout. Message-Id: <20120313010410.2843.6711.launchpad@ackee.canonical.com> Date: Tue, 13 Mar 2012 01:04:10 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14933"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 31626dd1f5057c4ad5fb98580768ed92a045e986 X-Gm-Message-State: ALoCoQm1x6oppxBYcE7jR5gFKyUkjEC9a7J6Cv+xCsbEXnLdIYts9CTBuuU6BXPY/HghNzvN061v Merge authors: Michael Hudson-Doyle (mwhudson) Related merge proposals: https://code.launchpad.net/~mwhudson/lava-scheduler/health-unknown-action/+merge/97121 proposed by: Michael Hudson-Doyle (mwhudson) review: Approve - Zygmunt Krynicki (zkrynicki) ------------------------------------------------------------ revno: 146 [merge] committer: Michael Hudson-Doyle branch nick: trunk timestamp: Tue 2012-03-13 14:02:45 +1300 message: Add an admin action to put all passing boards into unknown health state, for use after a rollout. modified: doc/changes.rst lava_scheduler_app/admin.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 'doc/changes.rst' --- doc/changes.rst 2012-03-07 02:14:40 +0000 +++ doc/changes.rst 2012-03-13 00:24:38 +0000 @@ -10,6 +10,8 @@ one page. * Make TestJob a restricted resource, and update views to reflect restrictions. +* Add admin action to set the health_status of all boards with pass + status to unknown status -- for use after a rollout. .. _version_0_10.1: === modified file 'lava_scheduler_app/admin.py' --- lava_scheduler_app/admin.py 2012-02-09 19:23:51 +0000 +++ lava_scheduler_app/admin.py 2012-03-13 00:21:57 +0000 @@ -18,8 +18,14 @@ device.put_into_online_mode(request.user, "admin action") online_action.short_description = "take online" +def health_unknown(modeladmin, request, queryset): + for device in queryset.filter(health_status=Device.HEALTH_PASS): + device.health_status = Device.HEALTH_UNKNOWN + device.save() +health_unknown.short_description = "set health_status to unknown" + class DeviceAdmin(admin.ModelAdmin): - actions = [online_action, offline_action] + actions = [online_action, offline_action, health_unknown] list_filter = ['device_type', 'status'] admin.site.register(Device, DeviceAdmin)