If I understand correctly, I think you want to have a snapshot of a repo as it existed on the first day of each month. The obvious solution is to simply copy everything on the first day of each month to a snapshot repo, but I assume that you are trying to create these snapshots after those dates have passed.
Try an association filter, as opposed to a unit filter, on the "created" attribute. That attribute is the "ISO8601 representation of the time the association was created". All times stored in pulp are UTC. Good luck, Michael On Thu, Dec 31, 2015 at 11:07 AM, Radu Coroi <[email protected]> wrote: > Hi All, > I'm trying to create a monthly snapshot release process with each new > repo/snapshot having all the packages in Oracle Linux Latest repo until the > beginning of the each month. > > I tried to use the following json: > { "source_repo_id" : "rc_test1", > "criteria": { > "type_ids" : ["rpm"], > "filters" : { > "unit" : { "build_time": {"$lte": "2015-08-01"}} > } > } > } > > And the following command: > curl -k -i -H "Accept: application/json" -X POST --data-binary > "@/home/adm_RaduCoroi/ansible/pulp/copy_between_repos_based_on_build_time.json" > https://admin:[email protected] > //pulp/api/v2/repositories/rc_test1/actions/associate/ > HTTP/1.1 202 ACCEPTED > Date: Thu, 31 Dec 2015 15:31:46 GMT > Server: Apache/2.2.15 (Oracle) > Content-Length: 172 > Connection: close > Content-Type: application/json; charset=utf-8 > > {"spawned_tasks": [{"_href": > "/pulp/api/v2/tasks/8846ffdf-9d77-4fb5-93fa-ee417ab1bd05/", "task_id": > "8846ffdf-9d77-4fb5-93fa-ee417ab1bd05"}], "result": null, "error": null} > > Unfortunately nothing was copied between the test repos as build_time > might not be part of the metadata. > > I know that if I can create a schedule to get all rpms from the source to > the destination but to go back in time without manual parsing of the RPM > headers I will like to be able to filter based on build_time or similar > info. > > Thank you very much, > Radu > > _______________________________________________ > Pulp-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/pulp-list >
_______________________________________________ Pulp-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/pulp-list
