[RFC/RFE] Show URLs to versioned content in Katello WebUI/Hammer/API

Hi all,

in some cases, you want to distribute content from Foreman/Katello to hosts without subscription-manager: either your Client OS does not provide subscription-manager at all, or you want to register a host to Foreman/Katello but there’s no subscription-manager (+dependencies) available yet.

If you know the structure of the URLs or read our documentation, you can consume versioned and unversioned content that is unprotected from Foreman/Katello: the URLs for .repo and .sources files all follow a specific structure and are publicly* available. It’s documented in Managing Content: Content views in Foreman (grep for “pulp/content” to get the URLs in your browser).

Request: Add a button to the WebUI that you can click to copy the URL of the Pulp repository on Foreman/Katello.

Intended usage: to help users register their hosts; e.g. when providing multiple “dependency repositories” in “Host Registration”:

Where to add these buttons: on the content view version page.

Bonus: Also add this to Hammer CLI and API.

Current state: tested with Foreman 3.10: Show URL repos structure of content on Katello by maximiliankolb · Pull Request #3062 · theforeman/foreman-documentation · GitHub

original PR in foreman-documentation: Show URL repos structure of content on Katello

Thanks,
Maximilian.

My comments shouldn’t have to block the whole RFE, but I think this intended use is questionable. IMHO it’s not the best UX to have a user copy from one place and then paste it in another place.

Wouldn’t it be better if we actually figured out a way to automate this?

It makes me think of the kickstart RPM repositories that we have. They contain the minimal content so you can kickstart a machine. Then the complete content is behind some permission check. The user doesn’t have to copy-paste this.

Perhaps global registration with Katello should automatically add all repositories that are available without permission checks during the registration part and then clean it up once it’s been registered.