Univention Bugzilla – Bug 32401
ucs_registerUDMHook library function
Last modified: 2014-03-20 16:24:19 CET
A function ucs_registerUDMHook schould be implemented in univention-lib which * takes the name of an existing UDM hook file * creates an univentionUDMHook object in UDM * saves the given file to the UDM property "univentionUDMHook" * sets the UDM property "univentionUDMHookFilename" * sets some other attributes useful to track creator package and version number. * The creator package (.deb) and version number is detected automatically. * The cn schould reflect <basename of the file>_<version number>.
The string <AppID>_<AppVersion> should be stored in an attribute univentionAppIdentifier as tracking reference e.g. for Bug 32418.
ucs_unregisterUDMHook is also required (e.g. for unjoinscripts), to remove the object in case no App is registered any longer for it.
Implemented in shell-univention-lib. Changelog comitted.
Now merged into more general functions: ucs_registerLDAPExtension "$@" --udm_hook <filename> ucs_unregisterLDAPExtension "$@" --udm_hook <objectname>
univention-lib/python$ pyflakes ldap_extension.py ldap_extension.py:291: undefined name 'name' ldap_extension.py:295: undefined name 'name' ldap_extension.py:976: local variable 'objects' is assigned to but never used
Fixed with r44253 (In reply to Sönke Schwardt-Krummrich from comment #5) > univention-lib/python$ pyflakes ldap_extension.py > ldap_extension.py:291: undefined name 'name' > ldap_extension.py:295: undefined name 'name' I decided to remove "name" from the output string. > ldap_extension.py:976: local variable 'objects' is assigned to but never used Removed the variable.
ucs_registerLDAPExtension does not write UNIVENTION_APP_IDENTIFIER to LDAP. Setting the app identifier via UDM CLI seems to work flawlessly → found by ucs-test 04_register_and_verify_test_app_id → REOPEN ucs_registerLDAPExtension does not write version start and version end to LDAP. Setting the range via UDM CLI seems to work flawlessly → found by ucs-test 05_register_and_verify_version_start_end → REOPEN ucs_registerLDAPExtension does not compare the package versions correctly. The new package always seems to have a lower package version number. → found by ucs-tests 10_update_extension_via_package, 11_update_extension_via_package_expected_fail and 12_update_extension_via_other_packagename → REOPEN
* ucs_registerLDAPExtension does not write UNIVENTION_APP_IDENTIFIER to LDAP. The environment variable needs to be exported. I updated the API documentation for this. * ucs_registerLDAPExtension does not write version start and version end to LDAP. Ok, adjusted, this was only done for ldapacl extensions. * ucs_registerLDAPExtension does not compare the package versions correctly. Hmm, 11_update_extension_via_package_expected_fail works for me, is see the message: ERROR: Registered package version 7.8.6.6 is newer, refusing registration. and the object is not updated.
The auto tests were passed.
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".