From patchwork Fri May 11 04:13:12 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: 8525 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 442AA23E42 for ; Fri, 11 May 2012 04:13:16 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 0766DA18910 for ; Fri, 11 May 2012 04:13:15 +0000 (UTC) Received: by ggnf1 with SMTP id f1so1267733ggn.11 for ; Thu, 10 May 2012 21:13:15 -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=QEHLuCGuwgjh8CA7r+zfK5RRdsg2dbxUwLeEEFGf4GA=; b=JLiIG1pS/ZAJsJpzYNCPHwgMyVGSn4BNmca2tEud5iTqdx9WPbwxsZxLNWl/WcmuId 5EPZNcMeHQX/92/9+5+ByoxoZcjb1hiSCBlMq3PTxe8FpuN/nEEojOH2iJhb77TyJATc Y2nSXtkQ3AWX/KZZtdC/jd5a5T5lM0g8nhObejROEBJrh8vhaoKMVSwnWhxHujm4jgjK PT68kmioUeA4RZ36Kai3zxVa1FrD96Yl/FyfPwo58m4jHbNBUIFndKjnqFR1yT527jUZ r0FpDdCfWdcXO5zi9sKGvUitztuvTcltVt7D3Na+tu/uor0qsHzBHVPLB64h+L9HP5xI 0lbQ== Received: by 10.50.160.225 with SMTP id xn1mr810756igb.3.1336709595241; Thu, 10 May 2012 21:13:15 -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.73.147 with SMTP id q19csp146600ibj; Thu, 10 May 2012 21:13:14 -0700 (PDT) Received: by 10.180.82.5 with SMTP id e5mr3748198wiy.0.1336709593630; Thu, 10 May 2012 21:13:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id o49si6922341wee.15.2012.05.10.21.13.13 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 May 2012 21:13: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 1SShE8-0001R3-Sk for ; Fri, 11 May 2012 04:13:12 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id CEB23E1653 for ; Fri, 11 May 2012 04:13:12 +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: 168 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-scheduler/trunk] Rev 168: add resubmit_job to the api (Paul Larson) Message-Id: <20120511041312.32036.29073.launchpad@ackee.canonical.com> Date: Fri, 11 May 2012 04:13: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="15225"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 78156526b475aac67e410965e0af72093a8530e7 X-Gm-Message-State: ALoCoQli8AmPULo6ITTO7o1YWb/O7AOrHeeJGE3C/elDegcv5LU8HmMf74Vj2sUCVJ6VvVh/yYxg Merge authors: Paul Larson (pwlars) Related merge proposals: https://code.launchpad.net/~pwlars/lava-scheduler/resubmit/+merge/100725 proposed by: Paul Larson (pwlars) ------------------------------------------------------------ revno: 168 [merge] committer: Michael Hudson-Doyle branch nick: trunk timestamp: Fri 2012-05-11 16:11:04 +1200 message: add resubmit_job to the api (Paul Larson) modified: lava_scheduler_app/api.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/api.py' --- lava_scheduler_app/api.py 2012-03-15 01:34:13 +0000 +++ lava_scheduler_app/api.py 2012-05-09 05:57:15 +0000 @@ -36,6 +36,13 @@ raise xmlrpclib.Fault(404, "Specified device type not found.") return job.id + def resubmit_job(self, job_id): + try: + job = TestJob.objects.accessible_by_principal(self.user).get(pk=job_id) + except TestJob.DoesNotExist: + raise xmlrpclib.Fault(404, "Specified job not found.") + return self.submit_job(job.definition) + def cancel_job(self, job_id): if not self.user: raise xmlrpclib.Fault(401, "Authentication required.")