Bug 30560 - Python UDM CLI wrapper for ucs-test
Python UDM CLI wrapper for ucs-test
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: Framework
unspecified
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Lukas Walter
Philipp Hahn
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-22 12:41 CET by Sönke Schwardt-Krummrich
Modified: 2014-11-20 15:38 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2013-02-22 12:41:41 CET
There should be an python UDM CLI wrapper that does an automatic cleanup on wrapper destruction.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2013-02-22 12:46:11 CET
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.
Comment 2 Lukas Walter univentionstaff 2013-07-24 16:38:23 CEST
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
Comment 3 Lukas Walter univentionstaff 2013-08-28 10:51:33 CEST
Current implementation works for now.

For future issues, new bugs should be created.
Eases QA.
Comment 4 Philipp Hahn univentionstaff 2013-09-19 15:04:52 CEST
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.
Comment 5 Stefan Gohmann univentionstaff 2013-11-19 06:43:30 CET
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".