From patchwork Fri Jul 5 14:36:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tarmac X-Patchwork-Id: 18271 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f72.google.com (mail-qe0-f72.google.com [209.85.128.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8132E25CAB for ; Fri, 5 Jul 2013 14:36:16 +0000 (UTC) Received: by mail-qe0-f72.google.com with SMTP id 1sf2881561qec.11 for ; Fri, 05 Jul 2013 07:36:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to :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:x-original-sender :x-original-authentication-results:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=5WS0eaQwoG5EcS9YoQCJjlIr11I5U+1RUCH4DnWBF7o=; b=GXVtjugcA5c1gszmfYtfO4JtA2XVr0dj/6YoleL+80otpkYqqu3Xu9jTQDzzNZx2j2 NcnS0PeGDCxPytwDE1fy0MmW2NwxHsWjY9YuokicImFNQUAIqoKv3ZTaLj/1Qjyj24RC KXK5j9ahSx7GZXGX0ClqnQRU0K5cysDjhXW/caPFVFtP3doewEKaA9ShDcZF7DeVXu+6 5RmyEu4qxTDoG/AIyKSxPmCWvrj95sUvBY+fkTZOfyz/XV1+aJyejci8W2Wha1+SLAJz lxtcMPjU2yZb/3csPHW3ZFJ60qrV1tJDL8LVDxUqWoRL/3sXlSLxMTrku9moeD7ogMOQ RP8A== X-Received: by 10.236.92.7 with SMTP id i7mr5250205yhf.52.1373034975749; Fri, 05 Jul 2013 07:36:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.97.195 with SMTP id ec3ls995411qeb.13.gmail; Fri, 05 Jul 2013 07:36:15 -0700 (PDT) X-Received: by 10.220.90.71 with SMTP id h7mr7015085vcm.16.1373034975608; Fri, 05 Jul 2013 07:36:15 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id k4si2369580vdi.2.2013.07.05.07.36.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Jul 2013 07:36:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id ht10so1691628vcb.18 for ; Fri, 05 Jul 2013 07:36:15 -0700 (PDT) X-Received: by 10.52.178.227 with SMTP id db3mr1127867vdc.20.1373034975483; Fri, 05 Jul 2013 07:36:15 -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.149.77 with SMTP id s13csp57872vcv; Fri, 5 Jul 2013 07:36:14 -0700 (PDT) X-Received: by 10.15.108.8 with SMTP id cc8mr12559584eeb.65.1373034974466; Fri, 05 Jul 2013 07:36:14 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id u9si6583402eeg.51.2013.07.05.07.36.13 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 05 Jul 2013 07:36:14 -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 1Uv77N-0008O0-O0 for ; Fri, 05 Jul 2013 14:36:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id A52C9E0246 for ; Fri, 5 Jul 2013 14:36:13 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-tool X-Launchpad-Branch: ~linaro-validation/lava-tool/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 187 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-tool/trunk] Rev 187: "[r=stylesen][bug=][author=arthur-she] automatic merge by tarmac" Message-Id: <20130705143613.2882.34490.launchpad@ackee.canonical.com> Date: Fri, 05 Jul 2013 14:36:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16696"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: f9e7d77571cc6e0653af5e5ff5fe51f019bdbded X-Gm-Message-State: ALoCoQl1IRdMLUtjx9JX0GwUZBAYTexff2WClsvUMe1Ycl535q+QjBR673uFcwnncrnatsXmItwp X-Original-Sender: noreply@launchpad.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.173 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: Arthur She (arthur-she) Related merge proposals: https://code.launchpad.net/~arthur-she/lava-tool/add-job-status-command/+merge/172981 proposed by: Arthur She (arthur-she) review: Approve - Senthil Kumaran S (stylesen) ------------------------------------------------------------ revno: 187 [merge] author: Arthur She committer: Tarmac branch nick: lava-tool timestamp: Fri 2013-07-05 15:35:51 +0100 message: "[r=stylesen][bug=][author=arthur-she] automatic merge by tarmac" modified: entry_points.ini lava_scheduler_tool/commands.py --- lp:lava-tool https://code.launchpad.net/~linaro-validation/lava-tool/trunk You are subscribed to branch lp:lava-tool. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-tool/trunk/+edit-subscription === modified file 'entry_points.ini' --- entry_points.ini 2013-05-27 20:51:39 +0000 +++ entry_points.ini 2013-07-04 09:29:28 +0000 @@ -16,6 +16,7 @@ resubmit-job = lava_scheduler_tool.commands:resubmit_job cancel-job = lava_scheduler_tool.commands:cancel_job job-output = lava_scheduler_tool.commands:job_output +job-status = lava_scheduler_tool.commands:job_status backup=lava_dashboard_tool.commands:backup bundles=lava_dashboard_tool.commands:bundles data_views=lava_dashboard_tool.commands:data_views @@ -35,6 +36,7 @@ resubmit-job = lava_scheduler_tool.commands:resubmit_job cancel-job = lava_scheduler_tool.commands:cancel_job job-output = lava_scheduler_tool.commands:job_output +job-status = lava_scheduler_tool.commands:job_status [lava.dashboard.commands] backup=lava_dashboard_tool.commands:backup === modified file 'lava_scheduler_tool/commands.py' --- lava_scheduler_tool/commands.py 2013-04-22 17:23:45 +0000 +++ lava_scheduler_tool/commands.py 2013-07-04 09:29:28 +0000 @@ -132,3 +132,26 @@ print "Downloaded job output of {0} to file {1!r}".format( self.args.JOB_ID, filename) + + +class job_status(Command): + """ + Get job status and bundle sha1, if it existed, from the scheduler. + """ + + @classmethod + def register_arguments(cls, parser): + super(job_status, cls).register_arguments(parser) + parser.add_argument("SERVER") + parser.add_argument("JOB_ID", + type=int, + help="Job ID to check the status") + + def invoke(self): + server = AuthenticatingServerProxy( + self.args.SERVER, auth_backend=KeyringAuthBackend()) + job_status = server.scheduler.job_status(self.args.JOB_ID) + + print "Job ID: %d\nJob Status: %s\nBundle SHA1: %s" %(self.args.JOB_ID, + job_status['job_status'], job_status['bundle_sha1']) +