Project

Profile

Help

Story #3802

closed

[Epic] As a user, I can override a remote's settings when making a request to start a sync

Added by ttereshc almost 6 years ago. Updated over 3 years ago.

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

100%

Estimated time:
(Total: 0:00 h)
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Problem

Users performing a sync, e.g. Katello want to provide one-time options to override a Remote's configuration for that one sync.

Design

Core Changes

1. Have the Remote's options be added to the RepositoryURLSerializer via inheritnace.
2. Override RemoteViewSet.get_object() in core so that anytime a plugin calls it, they will receive the remote with the options already overlaid. This will log at the debug level about options that are overlaid. It's important not to log the 'password' or 'cert_key' field values for security reasons. Also the overlay needs to work generically so when plugin writers try to overlay additional, custom Remote attributes it works.
3. Have RemoteViewSet.get_object() remove the in-memory Remote's save() method. It's unsafe for this in-memory object to be accidentally saved by a plugin writer.
4. Add docs on this feature and ensure it's clear that these settings won't be saved and applied to requests that occur later via policy='streamed' or policy='on_demand'.

Plugin Changes

1. Adjust the signature of your sync task to replace remote_pk with remote and have the in-memory version passed.

Plugins can additionally have the override include custom Remote fields by subclassing RepositoryURLSerializer similar to how RepositoryURLSerializer subclassed RemoteSerializer in core. Additionally the plugin's view will specify their subclassed serializer. It's important the get_object() method work generically so the plugin writer does not have to take an additional step to overlay custom attributes.


Sub-issues 8 (0 open8 closed)

RPM Support - Story #4413: As a user, I can specify one-time options during syncCLOSED - WONTFIX

Actions
Ansible Plugin - Story #5038: As a user, I can submit one-time Remote options with syncCLOSED - WONTFIX

Actions
Debian Support - Story #5039: As a user, I can submit one-time Remote options with syncCLOSED - WONTFIX

Actions
Container Support - Story #5040: As a user, I can submit one-time Remote options with syncCLOSED - WONTFIX

Actions
File Support - Story #5041: As a user, I can submit one-time Remote options with syncCLOSED - WONTFIX

Actions
Story #5042: As a user, I can submit one-time Remote options with syncCLOSED - WONTFIX

Actions
Maven Plugin - Story #5043: As a user, I can submit one-time Remote options with syncCLOSED - WONTFIX

Actions
Story #5044: As a plugin writer, I have docs on how to have custom Remote fields be usable for 1-time optionsCLOSED - WONTFIX

Actions

Also available in: Atom PDF