Univention Bugzilla – Bug 54755
Add pyhook support to computer import script
Last modified: 2023-05-26 11:51:51 CEST
* The scripts `import_{computer,group,inventory_number,networks,printer,router}` and `rename_class` execute shell hooks in 4.4. * In 5.0 we will remove the support for that. * We need those hooks for at least `import_computer` ToDo: - migrate import computers from UDM calls to ucs school lib - create tests - remove shell hook support from the other scripts - extract import computers from the big script Out of Scope: the other import scripts
To make sure there are no misunderstandings: The "import_computers" script will receive only Python-hooks support. There is and there will be no software in UCS@school 5.0 with shell hook support.
This was implemented & reviewed in the gitlab issue + MR. The changes include: - UCS@school Python hooks can now be executed during the computer_import. - The test was adapted to executed python hooks (instead of shell hooks). - Shell hook support was removed of the import scripts as it is deprecated. - The code for executing it was removed from the ucsschool-lib. - The mentions of shell hook support were removed of the documentation. - Tests for shell hooks were removed. - The release notes for 5.0 were adapted. As discussed, the changes were merged to 5.0 [5.0] 43d9b07ae Bug #54755: advisories [5.0] 2060fa26d Bug #54755: advisories [5.0] 7141e8df0 Bug #54755: changelogs [5.0] 341d6e0af Bug #54755: Merge branch 'twenzel/5.0/54755_add_pyhook_support_to_computer_import_script' into 5.0 [5.0] 07cb1d001 Bug #54755: remove depr. zone in import [5.0] 544d8bf2a Bug #54755: adapt tests & remove tests for shell hooks [5.0] 6fac940cc Bug #54755: remove shell hook support from ucs-school-import [5.0] fd764ff38 Bug #54755: replace verify school ou call [5.0] f3981a987 Bug #54755: move import_computer to separate file [5.0] cbec8fdc4 Bug #54755: remove tests for memberserver as they are not supported [5.0] f3b44f934 Bug #54755: migrate UDM calls to UCS@school lib calls and built with Package: ucs-school-import Version: 18.0.16A~5.0.0.202205310915 Branch: ucs_5.0-0 Scope: ucs-school-5.0 Package: ucs-test-ucsschool Version: 7.3.44A~5.0.0.202205310922 Branch: ucs_5.0-0 Scope: ucs-school-5.0 Package: ucs-school-lib Version: 13.0.17A~5.0.0.202205310903 Branch: ucs_5.0-0 Scope: ucs-school-5.0
OK - yaml OK - packages OK - documentation OK - jenkins tests
Mabye this fixed one of Bug #14722 Bug #15021 Bug #23501 Bug #54475 Bug #54771.
FYI: there is still `/usr/share/ucs-school-import/scripts/create_dc` to create computer (slave) objects via the legacy import. See also Bug #46766.
(In reply to Florian Best from comment #5) > Mabye this fixed one of Bug #14722 Bug #15021 Bug #23501 Bug #54475 Bug > #54771. Bug 15021 - Rechner-Import ohne IP-Adresse nicht möglich -> I did not test this, but I don't think this is fixed. Bug 23501 - Import von mehreren MAC-Adressen -> so far only one mac + ip address is possible. Bug 54475 - import_computer fails with traceback -> I have not tested this explicitly, but yes, this should be fixed. Bug 54771 - change print to proper logging in import_computer -> not fixed
UCS@school 5.0 v2 has been released. https://docs.software-univention.de/changelog-ucsschool-5.0v2-de.html If this error occurs again, please clone this bug.