Actions
Refactor #853
closedRefactor #765: Convert Pulp to use MongoEngine
Create the pulp.unit_models entry point
Start date:
Due date:
% Done:
100%
Estimated time:
Platform Release:
2.7.0
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Pulp 2
Sprint:
Quarter:
Description
Create a python entry point for 'pulp.unit_models' the entry points will be created in the format 'type_id=mongoengine.model.class'.
Upon platform initialization all the MongoEngine models should be loaded and have the appropriate signals attached to support setting the creation time, last_updated time, and moving content into the server content directory.
Deliverables:
- Entry point for the models ('pulp.unit_models')
- Server loads the entry point during server initialization and keeps the map of models in memory
- Platform method to get a model by type_id
- When server registers a model from the entry point it ensures that the following signals are registered:
- pulp.server.db.model.ContentUnit.post_init_signal
- pulp.server.db.model.ContentUnit.pre_save_signal
- pulp.server.db.model.ContentUnit.post_save_signal
- All models registered in this fashion have their indexes created by pulp-manage-db
Related issues
Actions
Create entry point to load unit models
ref #853