Pulp - Story #7832: [EPIC] As a user, I have Alternate Content Sources
As a user I can use Alternate Content Sources
Add refresh endpoint with slightly adjust synchronize method and first stage to support ACS.
Updated by dalley about 2 years ago
Quoting from a related issue:
To fix this, we should introduce a new RemoteRepositoryViewset which will provide a new primitive Pulp endpoint, /pulp/api/v3/remote_repositories///. This viewset will work with all repositories that have remote set, which is to say that the queryset would be Repository.objects.filter(remote__isnull=False).
This viewset would provide only one action endpoint, "refresh" (or "update"), which would perform a mirror-mode sync and publish with the internally-attached remote. The viewset would not provide the "modify" endpoint since mirrored repositories shouldn't be able to be changed, and it wouldn't provide the "sync" endpoint because there would not be any need to customize the sync in that way. This avoids needing to throw errors if a user attempts an operation they shouldn't do - because the new API provides no mechanism to do it - and also avoids creating a new model.
The old /repositories/// endpoint will remain exactly as it is currently, even at the code level, since all of the changes are in the new viewset. However we should discourage users from using this API with repositories they want to sync from external sources, and encourage using the new API instead, which has the benefit of being much easier to use for most if not all use cases.
Create a "remote repository", specifying name + description + any remote options, which will transparently create both the remote and repository. "refresh" (or "update" or "sync") it - no parameters necessary because it uses the internal remote. syncs for most plugins would always "mirror"