Uniform way for returning tasks in API

Bug #1427536 reported by Przemyslaw Kaminski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Przemyslaw Kaminski

Bug Description

Our task returning way is buggy:

self.http(202, Task.to_json(task))

We sometimes return 202 status for ready/error tasks and sometimes 200 status for running tasks. A better way is to write a function along the lines of

self.raise_task(task)

that would take care of status code automatically.

Tags: nailgun
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Przemyslaw Kaminski (pkaminski)
importance: Undecided → Medium
assignee: Przemyslaw Kaminski (pkaminski) → Fuel Python Team (fuel-python)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

Fix proposed to branch: master
Review: https://review.openstack.org/160676

Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Przemyslaw Kaminski (pkaminski)
status: New → In Progress
Changed in fuel:
assignee: Przemyslaw Kaminski (pkaminski) → Vitaly Kramskikh (vkramskikh)
Changed in fuel:
assignee: Vitaly Kramskikh (vkramskikh) → Przemyslaw Kaminski (pkaminski)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/160676
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=2de3806128f398d192d7e31f4ca3af571afeb0b2
Submitter: Jenkins
Branch: master

commit 2de3806128f398d192d7e31f4ca3af571afeb0b2
Author: Przemyslaw Kaminski <email address hidden>
Date: Thu Mar 12 17:27:39 2015 +0100

    Unified task returning procedure

    Change-Id: Ic15d88a4513452214b488f0b3de79a18e1e4cdaf
    Closes-Bug: #1427536

Changed in fuel:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.