Add missing REST API filters to content list commands#1331
Merged
Add missing REST API filters to content list commands#1331
Conversation
- Introduce `content_filter_options` group in generic.py for common filters (repository_version, repository_version_added, repository_version_removed) - Add plugin-specific filters: Python (name, author, version, packagetype, filename), Container (digest, media-type), Ansible (pubkey-fingerprint-in), RPM (checksum-type, context, filename, expanded modulemd filters) - Add version constraints for newer Python filters (name/author contains) - Remove duplicate field/exclude-field options in RPM content - Add content filter tests to each plugin's test_content.sh Generated by: claude-4.6-opus Made-with: Cursor
91b41ae to
b8b904e
Compare
mdellweg
reviewed
Mar 4, 2026
Member
mdellweg
left a comment
There was a problem hiding this comment.
This reminds me that click is emitting a warning about how we "reuse" the options all over the place. But that sure is a different story.
Comment on lines
-114
to
-115
| field_option, | ||
| exclude_field_option, |
Member
There was a problem hiding this comment.
Why do we remove these?
I guess you wanted to add them to the generic list.
Contributor
Author
There was a problem hiding this comment.
There are already specified on the list_command() generic. They are decorated on the callback.
Member
There was a problem hiding this comment.
So they were superfluous already.
👍
mdellweg
approved these changes
Mar 5, 2026
Comment on lines
-114
to
-115
| field_option, | ||
| exclude_field_option, |
Member
There was a problem hiding this comment.
So they were superfluous already.
👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
content_filter_optionsgroup ingeneric.pyfor shared content filters (repository_version,repository_version_added,repository_version_removed), following the pattern ofremote_filter_optionsrelative_pathname,name__in,name__contains,author,author__contains,packagetype,packagetype__in,filename,filename__contains,version,version__gte,version__ltedigest,digest__in,is_bootable,is_flatpak(manifest); scopedmedia_typeto manifests/tags onlypubkey_fingerprint__in(signatures)checksum_type,checksum_type__in,checksum_type__ne,filename,context,context__in(modulemd); expandedarch/versionfilters to modulemdsneeds_pluginsversion constraints for newer Python filters (name__contains,author__containsrequirepython>=3.25.0)field_option/exclude_field_optionin RPM content that caused Click warningstest_content.shTest plan
pulp file content list --repository-version,--repository-version-added,--repository-version-removed,--relative-pathpulp python content list --name,--name-in,--version,--version-gte,--packagetype,--filename,--filename-contains,--authorpulp container content -t tag list --name,-t manifest list --digest,-t blob list --digestpulp ansible content list --name,--namespacepulp rpm content -t package list --name,--checksum-type;-t modulemd list --name --version,--context,--arch;-t advisory list --idGenerated by: claude-4.6-opus