Refactor #765: Convert Pulp to use MongoEngine
Orphan listing and removal does not work with mongoengine converted models
If you have an orphan in your repo and attempt to list it and then remove it and both will fail. For example if testing against the in-development puppet conversion to mongoengine then you can run the following commands to cause these failures.
pulp-admin login -u admin -p admin
pulp-admin puppet repo create --repo-id=forge --feed=http://forge.puppetlabs.com --queries torssh
pulp-admin puppet repo sync run --repo-id forge
pulp-admin puppet repo remove --repo-id forge --str-eq="name=torssh"
pulp-admin orphan list
pulp-admin orphan remove --all
I expect 1 puppet orphan to be shown when the list occurs and for the remove to work correctly.