Project

Profile

Help

Refactor #862

closed

Refactor #765: Convert Pulp to use MongoEngine

Add unit association and querying support to the Repository model

Added by bcourt over 9 years ago. Updated over 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
2.8.0
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Pulp 2
Sprint:
May 2015
Quarter:

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

Blocked by Pulp - Refactor #785: Convert the 'repos' collection to a mongoengine modelCLOSED - CURRENTRELEASEamacdona@redhat.com

Actions
Blocks Docker Support - Refactor #863: Convert pulp_docker to use MongoEngine models for unitsCLOSED - CURRENTRELEASErbarlow

Actions

Also available in: Atom PDF