From patchwork Thu May 2 09:02:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Senthil Kumaran X-Patchwork-Id: 16570 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EB271238EC for ; Thu, 2 May 2013 09:02:24 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id m16sf593957vca.11 for ; Thu, 02 May 2013 02:02:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :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=mOTtv1GeMOqjmZJY7XYvsqpGm6QTl73Udmw6AxwYIbQ=; b=ark64AOxzeMWq1svel5rKMiIK9G8lLit6cwSLQA9plycpe2xGV+jLEt94Fq6HGI9tg U9+qlBKDF7bQh8uTb6w9qcfb293t67sPktUwztMdgildvwuZ7e8uwSvw3LOME6qODzXF Y2Yeirudij0FMMl0HXgYtXGK+Y/7ACEoGljtioYvCcr3aohDSKtcjjYU8l6uVeeSuR4N wuFgcp+i9WYMIo5RdIC9qXUFoXFk6cSNh/qQmEvkF0G4p+zZNtQVyYdHO0Xm17NuIZF9 FULZ/43pFlW6dZeUFfILzg417qWVeZcohSL0pd69CvKvBTlPop8QFm+0y+474XdldmYu 1Ywg== X-Received: by 10.236.41.137 with SMTP id h9mr4879621yhb.43.1367485337905; Thu, 02 May 2013 02:02:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.51.69 with SMTP id i5ls1072174qeo.89.gmail; Thu, 02 May 2013 02:02:17 -0700 (PDT) X-Received: by 10.52.66.229 with SMTP id i5mr1553666vdt.131.1367485337710; Thu, 02 May 2013 02:02:17 -0700 (PDT) Received: from mail-vb0-x22f.google.com (mail-vb0-x22f.google.com [2607:f8b0:400c:c02::22f]) by mx.google.com with ESMTPS id j11si2553420vcw.5.2013.05.02.02.02.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 May 2013 02:02:17 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22f is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22f; Received: by mail-vb0-f47.google.com with SMTP id x14so266858vbb.20 for ; Thu, 02 May 2013 02:02:17 -0700 (PDT) X-Received: by 10.220.242.73 with SMTP id lh9mr1845064vcb.49.1367485337495; Thu, 02 May 2013 02:02:17 -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.58.127.98 with SMTP id nf2csp191589veb; Thu, 2 May 2013 02:02:16 -0700 (PDT) X-Received: by 10.194.173.167 with SMTP id bl7mr6480590wjc.50.1367485336363; Thu, 02 May 2013 02:02:16 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id m9si1683381wjx.253.2013.05.02.02.02.15 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 02 May 2013 02:02:16 -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 1UXpP5-0003Za-Qu for ; Thu, 02 May 2013 09:02:15 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id BFFDFE0786 for ; Thu, 2 May 2013 09:02:15 +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: 245 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-scheduler/trunk] Rev 245: Fix bug #1110713 - Please add XMLRPC call for "get job result bundle". Message-Id: <20130502090215.2749.97980.launchpad@ackee.canonical.com> Date: Thu, 02 May 2013 09:02:15 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16580"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 0062f5443f20313ff7c0b994ec59026171fcdab7 X-Gm-Message-State: ALoCoQnmvIsWkJc9zKUouB28rnAv+6OPhauSBlS7thCSlLe2qp4eyjYRWaj9BXV+5lMH7OmLhwVz X-Original-Sender: noreply@launchpad.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22f 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: , ------------------------------------------------------------ revno: 245 committer: Senthil Kumaran branch nick: trunk timestamp: Thu 2013-05-02 13:05:44 +0530 message: Fix bug #1110713 - Please add XMLRPC call for "get job result bundle". 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 2013-04-18 00:58:20 +0000 +++ lava_scheduler_app/api.py 2013-05-02 07:35:44 +0000 @@ -198,3 +198,37 @@ pending_jobs_by_device[device_type] = 0 return pending_jobs_by_device + + def job_details(self, job_id): + """ + Name + ---- + `job_details` (`job_id`) + + Description + ----------- + Get the details of given job id. + + Arguments + --------- + `job_id`: string + Job id for which the output is required. + + Return value + ------------ + This function returns an XML-RPC structures of job details, provided + the user is authenticated with an username and token. + """ + + if not self.user: + raise xmlrpclib.Fault( + 401, "Authentication with user and token required for this " + "API.") + + 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 job