SURFscz / SRAM-deploy

Deploy scripts for the SCZ
Apache License 2.0
5 stars 5 forks source link

ldifparser should sort entries #484

Closed baszoetekouw closed 8 months ago

baszoetekouw commented 9 months ago

It would be nice if ldifparser could sort the entires in a sensible way. That makes it a lot easier to inspect the diffs as a humas.
For bonus points, also add an option that removes "transient" fields like createTimestamp, entryCSN, entryUUID, modifiersName and modifiersTimestamp.

baszoetekouw commented 8 months ago

This doesn't work correctly yet. To be specific, I would expect for ldifparser to sort by dn in such a way that all info for a service is clustered, and with a service, all info about a CO is clustered, etc.

Concretely, I would expect this command:

sudo slapcat -n1 | /opt/ldapmonitor/ldifparser.py |grep -v '^ '| awk -F, '{print $(NF-4) }'

to output a sorted list.

baszoetekouw commented 8 months ago

ok, after actually deploying this to test/acc it works like a charm 🥇