Project

Profile

Help

Refactor #847

closed

Refactor #765: Convert Pulp to use MongoEngine

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

Added by bcourt almost 9 years ago. Updated almost 5 years 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 - CURRENTRELEASEbcourt

Actions
Blocks Pulp - Refactor #865: Create a SharedContentUnit that extends the ContentUnitCLOSED - CURRENTRELEASEjortel@redhat.com

Actions
Blocks Pulp - Refactor #870: Create a generic serializer for RepositoryContentUnit/ContentUnitCLOSED - WONTFIX

Actions
Actions #1

Updated by mhrivnak almost 9 years ago

  • Tags Groomed added
Actions #2

Updated by bcourt almost 9 years ago

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

Updated by bcourt almost 9 years ago

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

Updated by bcourt almost 9 years ago

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

Updated by bcourt almost 9 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bcourt
Actions #6

Updated by bcourt almost 9 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

Added by bcourt almost 9 years ago

Revision 5696c952 | View on GitHub

Initial content unit model

re: #847

Added by bcourt almost 9 years ago

Revision 5696c952 | View on GitHub

Initial content unit model

re: #847

Actions #7

Updated by bcourt almost 9 years ago

  • Status changed from POST to MODIFIED
Actions #8

Updated by bmbouter almost 9 years ago

  • Groomed set to Yes
  • Tags deleted (Groomed)
Actions #9

Updated by bmbouter almost 9 years ago

  • Sprint Candidate set to Yes
  • Tags deleted (Sprint Candidate)
Actions #10

Updated by dkliban@redhat.com almost 9 years ago

  • Status changed from MODIFIED to 5
Actions #11

Updated by rbarlow about 8 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #12

Updated by bmbouter about 6 years ago

  • Sprint set to April 2015
Actions #13

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (15)
Actions #14

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF