Univention Bugzilla – Bug 30560
Python UDM CLI wrapper for ucs-test
Last modified: 2014-11-20 15:38:10 CET
There should be an python UDM CLI wrapper that does an automatic cleanup on wrapper destruction.
A first version of the python wrapper has been comitted and is available as module univention.testing.udm The wrapper is only able to create new objects and to modify objects that have been created by the wrapper. Object deletion is not implemented yet.
Further implementation has been done: ===================================== - move/remove objects - pass options to the CLI - explicitly append/set/remove values - added variables containing useful container DNs (univention, temporary, default users, default groups) - wait for ldap replication by default
Current implementation works for now. For future issues, new bugs should be created. Eases QA.
OK: svn OK: python ucs-test/univention/testing/udm.py OK: ucs-test -vvvvE dangerous -s udm-users OK: 4.0.113-1.572.201309191234 OK: ChangeLog r44235 FYI: Sometimes there's a problem with the S4 connector: an already cleaned up objects seems to be re-created by the S4 connector and re-appears in the LDAP. # ./04_user_creation_kerberos_posix_options -fv ... Creating users/user object with {'username': 'xvq8yh6nnn' ... Done: replication complete. ... UCSTestUDM cleanup done # cat /var/log/univention/directory-logger.log DN: uid=xvq8yh6nnn,cn=users,dc=phahn,dc=qa START ID: 4019 Action: add New values: entryUUID: bd2e78fc-b499-1032-9096-79ac7e948f6c entryCSN: 20130918103510.746811Z#000000#000#000000 END START ID: 4024 Action: modify Old values: entryCSN: 20130918103510.746811Z#000000#000#000000 New values: entryCSN: 20130918103510.788793Z#000000#000#000000 END START DN: uid=xvq8yh6nnn,cn=users,dc=phahn,dc=qa ID: 4025 Action: delete Old values: entryCSN: 20130918103510.788793Z#000000#000#000000 END START DN: uid=xvq8yh6nnn,cn=users,dc=phahn,dc=qa ID: 4030 Action: add New values: entryUUID: e13e029e-b499-1032-909a-79ac7e948f6c entryCSN: 20130918103611.246616Z#000000#000#000000 END START ID: 4036 Action: modify Old values: entryCSN: 20130918103611.246616Z#000000#000#000000 New values: sambaPrimaryGroupSID: S-1-5-21-2380407053-2408578530-41361576-513 entryCSN: 20130918103611.506341Z#000000#000#000000 END START ID: 4038 Action: modify Old values: displayName: vejt63yflg modifyTimestamp: 20130918103611Z entryCSN: 20130918103611.506341Z#000000#000#000000 New values: modifyTimestamp: 20130918103717Z entryCSN: 20130918103717.071184Z#000000#000#000000 END # ldiff -f /tmp/2 /tmp/3 dn: uid=xvq8yh6nnn,cn=users,dc=phahn,dc=qa +userPassword: {crypt}$6$pFBSKk6sZrdCrKuu$m6g3C691bXX/pezu5mMhUoNGKRdyCIjzT.YoCwpoziIIyEBKXPFK8x.2msbdfpuyQrb8buEDAAoVwuMef3Nc60 -userPassword: {crypt}$6$okGSI4HxcKe4jOPc$32QvgnT/stC.6ozCq8DjSYtD4Gq3ErfQQLg3V8zmTng3DhPfJE8r0Xxq/CPzYYYImS/VDwcuRcTHWqBYxG7tR. +uidNumber: 3707 -uidNumber: 3706 +sambaSID: S-1-5-21-2380407053-2408578530-41361576-1325 +sambaPwdLastSet: 1379500571 +sambaPasswordHistory: 6862A799EC2368705805EC1BAD371A7A1BD53CADD318D2A6741ABF8CA5E916DB +sambaNTPassword: 17454473B5DA77B9D729BBFD1A428935 +sambaAcctFlags: [U ] +pwhistory: 970787d7a4a87df87c204a05f5100392efce842b1cefc701e2b1b0b11f6fedd05294c51959d4bd7186a53b9beecc07bdd4df082e42e96bad03a103e2f3adc488 -pwhistory: 4fabe865a8fd7354bd9bd0c712449429201e37964592b9fadc142803645f3cc1b704e3118dc4ee04df596b4cebe848bc30c9c0c58232bf49457a292c1f29a3fd +objectClass: univentionMail +objectClass: sambaSamAccount +objectClass: organizationalPerson +objectClass: inetOrgPerson -krb5Key: MEyhKzApoAMCARKhIgQgXsPt4FQVFkNpGWqLMDrOPJXSiSTWuPYKnik7xxav3JWiHTAboAMCAQOhFAQSUEhBSE4uUUF4dnE4eWg2bm5u +krb5Key: MEyhKzApoAMCARKhIgQgRNIqpqQM0f0A5pvtg+EvMlxP1kle8DjEO+Md09lJvmeiHTAboAMCAQOhFAQSUEhBSE4uUUF4dnE4eWg2bm5u +krb5Key: MEShIzAhoAMCARChGgQYH7mXbXydDqspgHo05c58QDeGzpteVP5uoh0wG6ADAgEDoRQEElBIQUhOLlFBeHZxOHloNm5ubg== -krb5Key: MEShIzAhoAMCARChGgQY6UwvKR8OMiVhulHsASmFYtoIGnD0s3YZoh0wG6ADAgEDoRQEElBIQUhOLlFBeHZxOHloNm5ubg== -krb5Key: MDyhGzAZoAMCARehEgQQyqEjnUTaft+Sa8459cZdD6IdMBugAwIBA6EUBBJQSEFITi5RQXh2cTh5aDZubm4= +krb5Key: MDyhGzAZoAMCARehEgQQF0VEc7Xad7nXKbv9GkKJNaIdMBugAwIBA6EUBBJQSEFITi5RQXh2cTh5aDZubm4= -krb5Key: MDyhGzAZoAMCARGhEgQQHWF8PW4IxMgQvwViDlFUzqIdMBugAwIBA6EUBBJQSEFITi5RQXh2cTh5aDZubm4= +krb5Key: MDyhGzAZoAMCARGhEgQQFmLmi2BnjNeH2ZWUqA5LN6IdMBugAwIBA6EUBBJQSEFITi5RQXh2cTh5aDZubm4= +krb5Key: MDShEzARoAMCAQOhCgQIrVcVIA74MSCiHTAboAMCAQOhFAQSUEhBSE4uUUF4dnE4eWg2bm5u -krb5Key: MDShEzARoAMCAQOhCgQIa6I4hVQH90WiHTAboAMCAQOhFAQSUEhBSE4uUUF4dnE4eWg2bm5u +krb5Key: MDShEzARoAMCAQKhCgQIrVcVIA74MSCiHTAboAMCAQOhFAQSUEhBSE4uUUF4dnE4eWg2bm5u -krb5Key: MDShEzARoAMCAQKhCgQIa6I4hVQH90WiHTAboAMCAQOhFAQSUEhBSE4uUUF4dnE4eWg2bm5u +krb5Key: MDShEzARoAMCAQGhCgQIrVcVIA74MSCiHTAboAMCAQOhFAQSUEhBSE4uUUF4dnE4eWg2bm5u -krb5Key: MDShEzARoAMCAQGhCgQIa6I4hVQH90WiHTAboAMCAQOhFAQSUEhBSE4uUUF4dnE4eWg2bm5u +displayName: vejt63yflg As you can see a new object with a different entryUUID and uidNumber is created by the S4 connector, which has all the Samba related attributes set, while the original one doesn't.
UCS 3.2 has been released: http://docs.univention.de/release-notes-3.2-en.html http://docs.univention.de/release-notes-3.2-de.html If this error occurs again, please use "Clone This Bug".