Refactor #765: Convert Pulp to use MongoEngine
Add unit association and querying support to the Repository model
CLOSED - CURRENTRELEASE
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.