[Pulp-list] Question on filters - Pulp v2
Randy Barlow
rbarlow at redhat.com
Wed Dec 12 19:35:39 UTC 2012
Partha Aji wrote:
> I was trying to copy contents of a repo to another repo via filters based of https://pulp-dev-guide.readthedocs.org/en/latest/rest-api/content/associate.html.
> Its seems to work okay, albeit a bit confusing when dealing with dependencies and regex cases. I was wondering if pulp had something similar to a "simulate copy" call to tell me what packages exactly will get copied over (including dependencies).
Hi Partha! I was just doing something like that today, in fact. One way
to see what your filter matches is to search the repo units with the
same filter you want to copy with. For example, if I want to copy RHSA
errata from one repo to another, and I want to test that my filter
works, I can try it like this:
$ pulp-admin rpm repo content errata \
> --filters='{"id": {"$regex": "^RHSA"}}' \
> --repo-id=repo_1 --fields=id
If that matches what I intended, I can run the same filter with the copy
operation. Does that help?
--
Randy Barlow
Raleigh, NC, USA
More information about the Pulp-list
mailing list