The import/export_ldif functions are on the incorrect object in backend.py. Imports are tied to a single backend, so the act of importing/exporting should be attached to a backend, not backendS.
These should be marked deprecated and rewritten to encapsulate the logic of imports into the import task, and associated with the backend.
It's really likely these are not even used, grepping the code for import_ldif shows a single user and that is using the correct singular form. It's likely that these can just be removed.
Metadata Update from @firstyear:
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None
Okay, it looks like I'm wrong. The import_ldif is actually an import_ldifs plural, and the singular loops back to the many version. I think this needs a cleanup, but the import/export of multiple in a single command has been made part of the cli. I think we should re-examine this because it introduces some cli antipatterns like --ldif taking space separated filenames, taking multiple backends (when backend should be operating on a singular).
Another issue is that backends and ldifs now need the same amount to zip the request together.
I have said it in the past but I really think that we shouldn't do any looping in commands. Taht's the shells job. If we have multiple backends to import/export, it should be:
dsconf <instance> backend ldif export <backendname> <name>
Then the shell can loop through this for us. We shouldn't, because it introduces issues.
What if the filename has a space in it? This will immediately break --ldifs because we have to split on space. This would cause bugs.
Next week I will rewrite this to be a singular only interface for the cli and the objects.
Metadata Update from @mreynolds:
- Issue set to the milestone: 1.4.1
to comment on this ticket.