pulp.app.response¶
All response objects documented here should be imported directly from the pulpcore.app.response
namespace.
pulpcore.app.response
¶
OperationPostponedResponse(task, request)
¶
Bases: Response
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::
{
"task": "/pulp/api/v3/tasks/735633bc-eb41-4737-b436-c7c6914f34b1/"
}
Parameters:
-
task
(Task
) –A pulpcore.plugin.models.Task object used to generate the response.
-
request
(Request
) –Request used to generate the pulp_href urls
TaskGroupOperationResponse(task_group, request)
¶
Bases: Response
An HTTP response class for returning 202 and a task group.
This response object should be used by views that create a task group and dispatch one or more tasks for that group. When JSON is requested, the response will look like the following::
{
"task_group": "/pulp/api/v3/task-groups/735633bc-eb41-4737-b436-c7c6914f34b1/"
}
Parameters:
-
task_group
(TaskGroup
) –A pulpcore.plugin.models.TaskGroup object used to generate the response.
-
request
(Request
) –Request used to generate the pulp_href urls