Project

Profile

Help

Task #4719

closed

refactor handler.py code so that some of it is available in pulpcore-plugin

Added by dkliban@redhat.com about 5 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Quarter:

Description

Docker plugin implements it's own content-app handler code. When I added lazy sync support[0], I had to copy and paste 3 methods and a constant from handler.py. It would be better if plugin writers could get such functionality by inheriting it from an object provided by the plugin API.

As a result of this task the plugin API will provide a StreamingHandler that will provide the following:

HOP_BY_HOP_HEADERS constant

async def _stream_content_artifact(self, request, response, content_artifact)

async def _stream_remote_artifact(self, request, response, remote_artifact):

def _save_artifact(self, download_result, remote_artifact)

[0] https://github.com/pulp/pulp_docker/pull/344

Also available in: Atom PDF