Actions
Issue #1215
closedPulp - Refactor #765: Convert Pulp to use MongoEngine
Unit removal --type doesn't work with mongoengine converted types
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.8.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
I was trying to do some orphan removal with --type for a converted mongoengine model (puppet in my case) and it didn't work for me
1. Assuming I have a puppet_module already orphaned
2. Try to remove it using orphan remove --type puppet_module as follow
[bmbouter@dhcp129-138 pulp]$ pulp-admin orphan remove --type puppet_module
You'll get the following error on the CLI:
The following resource(s) could not be found:
puppet_module (content_type_id)
Related issues
Actions
fixed orphan removal by type when the type uses mongoengine
Several places in the code, only two of which I touched here, need to know the unit key fields for a given type ID. I created a new controller function that takes care of finding that information regardless of whether the type is defined the new way (mongonengine) or old way. The next step will be to use that controller function in additional places, but that is beyond the scope of this bug fix.
fixes #1215