Allow users to filter on package filename in /content/rpm/packages/ for pulp3
Author: jcabrera (jcabrera)
Redmine Issue: 4879, https://pulp.plan.io/issues/4879
Add the possibility to query the file name ("location_href"?) of a package in the contents.
This simplifies the use of jq as we get directly the good href with the use of a GET query
http :24817/pulp/api/v3/content/rpm/packages/?filename=name-version-release.arch.rpm
I prefer the query version than using jq
http :24817/pulp/api/v3/content/rpm/packages/ | jq -r '.results[] | select( .location_href == "name-version-release.arch.rpm")'
There could be a limitation when there are to much contents because the pagination prevents to look for all contents.
From: daviddavis (daviddavis) Date: 2019-05-24T15:19:57Z
Just FYI, file name of a package is different than location_href. Location_href could include a path like "Packages/v/VirtualGL-devel-2.5.2-1.el7.x86_64.rpm".
Description from a duplicate: "Today, there is no filename filter on the package list endpoint. I think there are a couple fields (location_href or relative_path) that store a filename-like value for each package."
Fixed by https://github.com/pulp/pulp_rpm/pull/3216