Project

Profile

Help

Story #3802

Updated by bmbouter 7 months ago

h3. Problem

Users performing
This RFE is a sync, e.g. Katello want to provide one-time options to override a Remote's configuration for that one sync. result of Katello/Pulp3 gap analysis. P1 item.

h3. Settings include proxy, proxy username and password, client key, client cert, and CA cert.

h2.
Design

h3. Core Changes Add the following optional fields to <code>RepositoryURLSerializer</code>:

1. Have the Remote's options * ssl_ca_certificate
* ssl_client_certificate
* ssl_client_key
* ssl_validation
* proxy_url
* proxy_username
* proxy_password

These fields will
be added used to override the <code>RepositoryURLSerializer</code> via inheritnace.
2. Override <code>RemoteViewSet.get_object()</code>
remote's settings on sync. Since sync is implemented in core so that anytime a plugin calls it, plugins, they will receive the remote with the options already overlaid.
3. Have <code>RemoteViewSet.get_object()</code> remove the in-memory Remote's <code>save()</code> method. It's unsafe for this in-memory object
need to be accidentally saved by a plugin writer.
4. Add docs on this feature and ensure it's clear that
handle these settings won't be saved and applied to requests that occur later via policy='streamed' or policy='on_demand'. fields.

h3. h2. Plugin Changes Todo

1. Adjust We need to open issues against existing plugins (file, python, rpm) instructing them how to leverage these fields. For pulp_file (as an example), the signature of your viewset to fetch these parameters from the serializer and pass them to the sync task. Then the sync task needs to replace <code>remote_pk</code> with <code>remote</code> be updated to accept these values and have pass them onto the in-memory version passed.
downloader factory.

Back