Support on_demand policy for remote

Open
#507 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
api, backend

Research direction

Look at the remote model and serializer in the codebase to see where the policy choices are defined. The error indicates 'on_demand' is not a valid choice; add it to the allowed policies. Check the linked pulp-cli-maven issue for context. Test by creating a remote with the on_demand policy via the API as shown.

Written by the indexing model from the issue text.

Description

Feature Triage-Needed

Is your feature request related to a problem? Please describe.

I'd like to be able to make a pull-through cache, using the on_demand policy.
This plugin doesn't seem to support it.

Describe the solution you'd like
Add support for on_demand and streaming policies.

Describe alternatives you've considered
None

Additional context
Example POST and response:

curl -u user:password -X POST \
  http://localhost:8080/pulp/api/v3/remotes/maven/maven/ \
  -H "Content-Type: application/json" \
  -d '{
    "name": "maven-central",
    "url": "https://repo1.maven.org/maven2/",
    "policy": "on_demand"
  }'
{"policy":["\"on_demand\" is not a valid choice."]}

See also: https://github.com/pulp/pulp-cli-maven/issues/170

Dominant language
Python
Stars
5
Forks
30
Avg merge
1d 15h
Merged PRs (30d)
27

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pulp/pulp_maven

All issues in pulp/pulp_maven

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.