pulp.app.response

All response objects documented here should be imported directly from the pulpcore.app.response namespace.

class pulpcore.app.response.OperationPostponedResponse(result, request)

An HTTP response class for returning 202 and a spawned task.

This response object should be used by views that dispatch asynchronous tasks. The most common use case is for sync and publish operations. When JSON is requested, the response will look like the following:

{
    "pulp_href": "https://example.com/pulp/api/v3/tasks/adlfk-bala-23k5l7-lslser",
    "task_id": "adlfk-bala-23k5l7-lslser"
}
Parameters
  • result (rq.job.Job) – A rq.job.Job object used to generate the response.

  • request (rest_framework.request.Request) – Request used to generate the pulp_href urls