-
Notifications
You must be signed in to change notification settings - Fork 126
RFE: Support for add and delete operations in ldif.LDIFParser.parse_change_records() #567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Duplicate of #483 |
Also needs to handle modrdn IIRC |
@quanah: Excuse me. I hadn't seen your issue. It's my first code contribution to larger projects and I was still focused on other things... I first extended the LDIFParser method in the PR and added two new handlers (handler_add, handler_delete), which have to be implemented by a derived parser. I also see the problem with the all_modify_changes list. Mainly because the order of operations in the LDIF file is relevant. Currently I had no need for the modrdn operations. But of course they would also have to be taken into account for a complete implementation. The PR is initially an implementation proposal. I'm open to suggestions for improvement... |
@fager I was noting the duplicate bit for tracking purposes. :) Really great you took this work on! |
Issue description:
LDIF files with multiple operations are not fully processed by ldif.LDIFParser.parse_change_records().
Operations of the change type "modify" are processed via handle_modify() but operations of the change type "add" or "delete" are counted but otherwise simply ignored.
Example of such an LDIF file:
Steps to reproduce:
Create your own LDIF parser and an import for the test file shown:
Start this test:
Operating system:
Fedora 39
Python version:
python-ldap version:
3.4.4
The text was updated successfully, but these errors were encountered: