Refactor #862
closedRefactor #765: Convert Pulp to use MongoEngine
Add unit association and querying support to the Repository model
100%
Description
Add the ability to query units via the Repository model
- Add method find_units(association_q, unit_q, limit, skip) that returns an iterable. This iterable yields repo_content_units with a 'unit' attribute on each item that is filled in by the find_units iterator(), if limit is unspecified all units will be returned, if skip is unspecified then the first batch will be returned
- Add method add_unit(model) that creates/updates the repo_content_unit collection entry for the unit
- Add method add_units(model_iterable) that creates/updates the repo_content_unit collection entry for every model in the iterable.
- content_unit_counts should be updated automatically whenever units are added or removed from the repository
- Add a method to remove_unit(unit_model) remove a unit by passing in the unit object.
- Add a method to remove_units(association_qs, unit_qs) to remove units matching a filter.
Related issues
Updated by bcourt over 9 years ago
- Blocked by Refactor #785: Convert the 'repos' collection to a mongoengine model added
Updated by bcourt over 9 years ago
- Blocked by Refactor #863: Convert pulp_docker to use MongoEngine models for units added
Updated by bcourt over 9 years ago
- Blocked by deleted (Refactor #863: Convert pulp_docker to use MongoEngine models for units)
Updated by bcourt over 9 years ago
- Blocks Refactor #863: Convert pulp_docker to use MongoEngine models for units added
Updated by mhrivnak over 9 years ago
- Subject changed from Add unit querying support to the Repository model to Add unit association and querying support to the Repository model
Updated by bcourt over 9 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bcourt
Updated by bcourt over 9 years ago
- Status changed from ASSIGNED to POST
- Sprint/Milestone set to 16
- % Done changed from 0 to 100
Added by bcourt over 9 years ago
Added by bcourt over 9 years ago
Revision 60d8aa14 | View on GitHub
Add unit querying & association support required for plugin conversion to mongoengine
fixes #862
Updated by bcourt over 9 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp|60d8aa1406703bb0f20d3632d0a8e2f5f48b66a6.
Added by bmbouter over 9 years ago
Revision e0df741c | View on GitHub
Set storage path in ContentUnit.pre_save handler correctly.
The pre-save handler did not save the full path to the file_path set with set_content in the case where file_path is a file.
re #862
Added by bmbouter over 9 years ago
Revision e0df741c | View on GitHub
Set storage path in ContentUnit.pre_save handler correctly.
The pre-save handler did not save the full path to the file_path set with set_content in the case where file_path is a file.
re #862
Updated by dkliban@redhat.com almost 9 years ago
- Status changed from MODIFIED to 5
Updated by dkliban@redhat.com over 8 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Add unit querying & association support required for plugin conversion to mongoengine
fixes #862