Project

Profile

Help

Refactor #847

Refactor #765: Convert Pulp to use MongoEngine

Create a MongoEngine base class for Content Unit Models (ContentUnit)

Added by bcourt over 5 years ago. Updated over 1 year ago.

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

100%

Estimated time:
Platform Release:
2.7.0
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Pulp 2
Sprint:
April 2015
Quarter:

Description

Create a base class for all future Content Units that stores information in MongoEngine

  • The "AddUnitMixin.link_unit" functionality is currently only used when errata are created and is never read. This functionality does not need to be migrated to the unit model
  • user_metadata field
  • add a method add_content(source_location, relative_path)

source_location - the temp directory or location on disk where the plugin has stored the file or directory
relative_path - the relative path within /var/lib/pulp/content/content_type/<relative_path> where the content should be saved
when the unit is saved, if content has been added it will be moved into place in the content directory by the platform and the storage_path will be set the relative_path, use the post_save signal on the model

  • add a property for the absolute storage path, this is a combination of pulp_config.config.get('server', 'storage_dir')/unit.content_type/unit.storage_path
  • class method to set the _last_updated property and a signal hook on save to set or update the value
  • The init should validate that the model implements a field for the content_type (this field should be persisted to the database)
  • The init should validate that the model implements a property named unit_key_fields that lists the fields that make up the unit key (This is not persisted to the database)
  • Method to get the list of repositories that contain the given unit. (This method will be a no/op until the Repository and the RepositoryContentUnit collection has been converted)

https://fedorahosted.org/pulp/wiki/ConvertingUnitsToMongoengine


Related issues

Blocks Pulp - Refactor #853: Create the pulp.unit_models entry pointCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocks Pulp - Refactor #865: Create a SharedContentUnit that extends the ContentUnitCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocks Pulp - Refactor #870: Create a generic serializer for RepositoryContentUnit/ContentUnitCLOSED - WONTFIX

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

Associated revisions

Revision 5696c952 View on GitHub
Added by bcourt over 5 years ago

Initial content unit model

re: #847

Revision 5696c952 View on GitHub
Added by bcourt over 5 years ago

Initial content unit model

re: #847

History

#1 Updated by mhrivnak over 5 years ago

  • Tags Groomed added

#2 Updated by bcourt over 5 years ago

  • Blocks Refactor #853: Create the pulp.unit_models entry point added

#3 Updated by bcourt over 5 years ago

  • Blocks Refactor #865: Create a SharedContentUnit that extends the ContentUnit added

#4 Updated by bcourt over 5 years ago

  • Blocks Refactor #870: Create a generic serializer for RepositoryContentUnit/ContentUnit added

#5 Updated by bcourt over 5 years ago

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

#6 Updated by bcourt over 5 years ago

  • Status changed from ASSIGNED to POST
  • Sprint/Milestone set to 15
  • % Done changed from 0 to 100
  • Platform Release set to 2.7.0

#7 Updated by bcourt over 5 years ago

  • Status changed from POST to MODIFIED

#8 Updated by bmbouter over 5 years ago

  • Groomed set to Yes
  • Tags deleted (Groomed)

#9 Updated by bmbouter over 5 years ago

  • Sprint Candidate set to Yes
  • Tags deleted (Sprint Candidate)

#10 Updated by dkliban@redhat.com over 5 years ago

  • Status changed from MODIFIED to 5

#11 Updated by rbarlow almost 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#12 Updated by bmbouter over 2 years ago

  • Sprint set to April 2015

#13 Updated by bmbouter over 2 years ago

  • Sprint/Milestone deleted (15)

#14 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF