Project

Profile

Help

Refactor #862

Refactor #765: Convert Pulp to use MongoEngine

Add unit association and querying support to the Repository model

Added by bcourt over 5 years ago. Updated over 1 year 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 - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocks Docker Support - Refactor #863: Convert pulp_docker to use MongoEngine models for unitsCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 60d8aa14 View on GitHub
Added by bcourt over 5 years ago

Add unit querying & association support required for plugin conversion to mongoengine

fixes #862

Revision 60d8aa14 View on GitHub
Added by bcourt over 5 years ago

Add unit querying & association support required for plugin conversion to mongoengine

fixes #862

Revision e0df741c View on GitHub
Added by bmbouter over 5 years ago

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

Revision e0df741c View on GitHub
Added by bmbouter over 5 years ago

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

History

#1 Updated by bcourt over 5 years ago

  • Blocked by Refactor #785: Convert the 'repos' collection to a mongoengine model added

#2 Updated by bcourt over 5 years ago

  • Blocked by Refactor #863: Convert pulp_docker to use MongoEngine models for units added

#3 Updated by bcourt over 5 years ago

  • Blocked by deleted (Refactor #863: Convert pulp_docker to use MongoEngine models for units)

#4 Updated by bcourt over 5 years ago

  • Blocks Refactor #863: Convert pulp_docker to use MongoEngine models for units added

#5 Updated by bcourt over 5 years ago

  • Priority changed from Normal to High

#6 Updated by bcourt over 5 years ago

  • Sprint Candidate set to Yes

#7 Updated by bmbouter over 5 years ago

  • Groomed set to No

#8 Updated by mhrivnak over 5 years ago

  • Subject changed from Add unit querying support to the Repository model to Add unit association and querying support to the Repository model

#9 Updated by mhrivnak over 5 years ago

  • Groomed changed from No to Yes

#10 Updated by bcourt over 5 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bcourt

#11 Updated by bcourt over 5 years ago

  • Status changed from ASSIGNED to POST
  • Sprint/Milestone set to 16
  • % Done changed from 0 to 100

#12 Updated by bcourt over 5 years ago

  • Platform Release set to 2.8.0

#13 Updated by bcourt over 5 years ago

  • Status changed from POST to MODIFIED

#14 Updated by dkliban@redhat.com almost 5 years ago

  • Status changed from MODIFIED to 5

#15 Updated by dkliban@redhat.com over 4 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#16 Updated by bmbouter over 2 years ago

  • Sprint set to May 2015

#17 Updated by bmbouter over 2 years ago

  • Sprint/Milestone deleted (16)

#18 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF