pulp / pulpcore

Pulp 3 pulpcore package https://pypi.org/project/pulpcore/
GNU General Public License v2.0
285 stars 112 forks source link

repositories information on pulp3 #2322

Open waldirio opened 2 years ago

waldirio commented 2 years ago

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

Describe the solution you'd like some simple command that will return the information that we are looking for.

Describe alternatives you've considered This script

ggainey commented 2 years ago

CV/CVV are katello concepts - Pulp3 doesn't know about them. After some IRC discussion, sounds more like what we'd want there, is to be able to specify a search based on Distribution-base_path (maybe a regex thereon?) So a user who has been careful about their Distribution naming/pathing rules, could do something like "show me all the repo info for everything with 'RHEL8' in the path"

@waldirio - does the above capture what we were discussing?

We should review the output of the linked script and use it as a basis for a more-formal requirements-doc.

waldirio commented 2 years ago

Hello @ggainey

Yes, that sounds like a good plan for me!

Thank you Waldirio

sayan3296 commented 2 years ago

Related to "CV/CVV are katello concepts" part, How about making use of the backend_identifier of the repo here as a search parameter.

The katello_repositories table from foreman db gives us that which is unique for every combination of Repo CV and LCE and perhaps Pulp can easily use that to detect the distribution path and the list stuff from there.

-- Sayan

sayan3296 commented 2 years ago

Related to "CV/CVV are katello concepts" part, How about making use of the backend_identifier of the repo here as a search parameter.

The katello_repositories table from foreman db gives us that which is unique for every combination of Repo CV and LCE and perhaps Pulp can easily use that to detect the distribution path and the list stuff from there.

-- Sayan

Obviously, we will find that out manually and pass with the script\command\tool as an argument .. :)

Sample data from where we can get the pulp_id


foreman=# select id,pulp_id,relative_path,publication_href,version_href from katello_repositories where id = 31;
-[ RECORD 1 ]----+-----------------------------------------------------------------------------------
id               | 31
pulp_id          | 1-RHEL8-Test-71dcbe2f-4820-48a4-b1bd-efcebcaa28eb
relative_path    | RedHat/Test/RHEL8/content/dist/rhel8/8/x86_64/appstream/os
publication_href | /pulp/api/v3/publications/rpm/rpm/634f13f5-ad8d-4d16-bd96-5fad81911780/
version_href     | /pulp/api/v3/repositories/rpm/rpm/02904284-9ad3-47cf-9843-22bd701c63e3/versions/0/