Actions
Refactor #847
closedRefactor #765: Convert Pulp to use MongoEngine
Create a MongoEngine base class for Content Unit Models (ContentUnit)
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
Updated by bcourt over 9 years ago
- Blocks Refactor #853: Create the pulp.unit_models entry point added
Updated by bcourt over 9 years ago
- Blocks Refactor #865: Create a SharedContentUnit that extends the ContentUnit added
Updated by bcourt over 9 years ago
- Blocks Refactor #870: Create a generic serializer for RepositoryContentUnit/ContentUnit added
Updated by bcourt over 9 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bcourt
Updated by bcourt over 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 over 9 years ago
Added by bcourt over 9 years ago
Revision 5696c952 | View on GitHub
Initial content unit model
re: #847
Updated by bmbouter over 9 years ago
- Sprint Candidate set to Yes
- Tags deleted (
Sprint Candidate)
Updated by dkliban@redhat.com over 9 years ago
- Status changed from MODIFIED to 5
Updated by rbarlow almost 9 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Actions
Initial content unit model
re: #847