Bug 57063 - Hook for ox-contexts fails with ox-connector
Hook for ox-contexts fails with ox-connector
Status: NEW
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2024-02-15 13:09 CET by Tobias Wenzel
Modified: 2024-02-15 14:20 CET (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.046
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 Tobias Wenzel univentionstaff 2024-02-15 13:09:41 CET
After switching to the ox-connector the hook create_new_ox_contexts_kelvin.py fails with the following traceback

2024-02-14 11:41:41 ERROR [223][8b4705a805] While responding to PATCH http://mneme.univention-summit.de/ucsschool/kelvin/v1/users/adam.becher: 'UdmObjectProperties' object has no attribute 'hostname'
AttributeError: 'UdmObjectProperties' object has no attribute 'hostname'

the hook tries to read udm props from the default context to create a new context using the same values.

the old integration:

root@dn1:~# udm oxmail/oxcontext list

DN: cn=context10,cn=open-xchange,dc=training,dc=ucs
  contextid: 10
  hostname: dn1.training.ucs
  name: context10
  oxDBServer: dn1.training.ucs
  oxQuota: 47413
  oxadmindaemonversion: None
  oxgroupwareversion: None
  oxguiversion: None
  oxintegrationversion: 12.0.30A~5.0.0.202210111056


now:


root@dn1:~# udm oxmail/oxcontext list

DN: cn=context10,cn=open-xchange,dc=training,dc=ucs
  contextid: 10
  name: context10
  oxQuota: 39684


This should be fixed (backwards-compatible of course)