Bug 49265 - [4.4] create import hook to modify configuration
[4.4] create import hook to modify configuration
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v2-errata
Assigned To: Daniel Tröder
Jürn Brodersen
:
Depends on: 49264
Blocks: 49267
  Show dependency treegraph
 
Reported: 2019-04-09 13:12 CEST by Daniel Tröder
Modified: 2019-05-28 14:17 CEST (History)
0 users

See Also:
What kind of report is it?: Feature Request
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 Daniel Tröder univentionstaff 2019-04-09 13:12:26 CEST
+++ This bug was initially created as a clone of Bug #49264 +++

When importing through the HTTP-API, it is not possible to choose from different configurations (like with the "-c" switch on the command line).

Create a hook to manipulate the configuration after reading the configuration files and applying the command line arguments.
Comment 1 Daniel Tröder univentionstaff 2019-04-09 16:12:26 CEST
A hook was added that allows to modify the configuration after reading the configuration files and applying the command line arguments. The base class is ucsschool.importer.utils.config_pyhook.ConfigPyHook.

[4.4] a77857464 Bug #49265: improve documentation
[4.4] e72ced615 Bug #49265: name function more aptly
[4.4] 78d8fe0e9 Bug #49265: cleanup noop code (attributes contain lazy object)
[4.4] f595cffd1 Bug #49265: prevent circular dependency
[4.4] a02223176 Bug #49265: create configuration hook
[4.4] 25df3a640 Bug #49265, Bug #49267: test configuration hook
[4.4] fd7388a9b Bug #49265, Bug #49267: changelog
[4.4] 4b5b7a0d4 Bug #49265, Bug #49267: advisory

ucs-school-import (17.0.6-4)
Comment 2 Daniel Tröder univentionstaff 2019-04-09 16:14:33 CEST
[4.4] a289df2bf Bug #49267: add hook to sequence diagram

a289df2bf was mislabeled and belongs to this bug.
Comment 3 Jürn Brodersen univentionstaff 2019-04-10 18:12:03 CEST
What I tested (using the http api):
Added a hook and imported -> OK
Added additional a config hook and imported -> OK (different configs are used)
246_import_user_config_pyhook -> OK

YAML -> OK
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2019-05-28 14:17:42 CEST
UCS@school 4.4 v2 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.4v2-de.html

If this error occurs again, please clone this bug.