Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to list repositories containing a content #631

Closed
maartenbeeckmans opened this issue Feb 14, 2023 · 1 comment · Fixed by #647
Closed

Add option to list repositories containing a content #631

maartenbeeckmans opened this issue Feb 14, 2023 · 1 comment · Fixed by #647
Assignees
Labels
feature request New feature request (template-set) prio-list driving Pulp's Kanban searches
Milestone

Comments

@maartenbeeckmans
Copy link

Summary

It is possible to get this information from the GET http :/pulp/api/v3/repository_versions/?content=<content_href> api endpoint. (see pulp/pulpcore#2865 (comment))

This will only return the hrefs of the repository. It would be helpful if the cli would also return the names of the repositories.

Examples

pulp rpm repository list --content <content_href>

One possibility is to add this functionality to the pulp rpm repository list command where it is possible to specify the href of a content unit. But content is based on the repository version so this is not really correct. Other proposals are always welcome

curl --netrc --silent http://$(hostname)/pulp/api/v3/repository_versions/?content=/pulp/api/v3/content/rpm/packages/47be5d88-5356-47c7-afb6-227db266f39c/ | jq
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "pulp_href": "/pulp/api/v3/repositories/rpm/rpm/3c400303-baf7-4417-b9b8-2127ba7164a9/versions/1/",
      "pulp_created": "2023-01-25T16:16:51.914377Z",
      "number": 1,
      "repository": "/pulp/api/v3/repositories/rpm/rpm/3c400303-baf7-4417-b9b8-2127ba7164a9/",
      "base_version": "/pulp/api/v3/repositories/rpm/rpm/3c400303-baf7-4417-b9b8-2127ba7164a9/versions/0/",
      "content_summary": {
        "added": {
          "rpm.package": {
            "count": 1,
            "href": "/pulp/api/v3/content/rpm/packages/?repository_version_added=/pulp/api/v3/repositories/rpm/rpm/3c400303-baf7-4417-b9b8-2127ba7164a9/versions/1/"
          }
        },
        "removed": {},
        "present": {
          "rpm.package": {
            "count": 1,
            "href": "/pulp/api/v3/content/rpm/packages/?repository_version=/pulp/api/v3/repositories/rpm/rpm/3c400303-baf7-4417-b9b8-2127ba7164a9/versions/1/"
          }
        }
      }
    }
  ]
}
@maartenbeeckmans maartenbeeckmans added feature request New feature request (template-set) Triage-Needed Needs to be reviewed at next pulp-cli mtg labels Feb 14, 2023
@mdellweg mdellweg changed the title Add option to list repositories containing a contenttype Add option to list repositories containing a content Feb 15, 2023
@dkliban dkliban removed the Triage-Needed Needs to be reviewed at next pulp-cli mtg label Feb 15, 2023
@ggainey
Copy link
Contributor

ggainey commented Feb 15, 2023

There is a pulp repository list command for finding repositories regardless of their plugin-type. What if we extend that, adding pulp repository version list, with possible filters supporting all the available filters for the Repository_Versions command (e.g., --content --content-in, --fields, etc)

How does that sound to folk?

@mdellweg mdellweg added the prio-list driving Pulp's Kanban searches label Feb 20, 2023
@mdellweg mdellweg self-assigned this Mar 6, 2023
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Mar 6, 2023
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Mar 6, 2023
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Mar 6, 2023
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Mar 9, 2023
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Mar 13, 2023
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Mar 13, 2023
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Mar 14, 2023
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Mar 14, 2023
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Mar 14, 2023
mdellweg added a commit that referenced this issue Mar 15, 2023
@mdellweg mdellweg added this to the 0.18.0 milestone Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request (template-set) prio-list driving Pulp's Kanban searches
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants