Bug 36131 - (decorators-rewrite) UMC-Server: rewrite decorators
(decorators-rewrite)
UMC-Server: rewrite decorators
Status: NEW
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 5.0
Other Linux
: P5 normal with 3 votes (vote)
: ---
Assigned To: UMC maintainers
:
: 34277 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-10 19:50 CEST by Florian Best
Modified: 2022-06-24 13:56 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
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): Cleanup, Debt Technical, Roadmap discussion (moved)
Max CVSS v3 score:
best: Patch_Available+


Attachments
decorators.py - recursive to svn 54221 (21.65 KB, text/x-python)
2014-10-10 19:50 CEST, Florian Best
Details
patch (relative to svn r71715) (22.27 KB, patch)
2016-08-18 16:27 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2014-10-10 19:50:28 CEST
Created attachment 6158 [details]
decorators.py - recursive to svn 54221

Attached is a rewrite of univention.managment.console.modules.decorators which split every functionality into simple small functions for reusability.
The new version has some advantages, e.g. that it is possible to use the new decorator '@threaded' and that they are working together with other decorators, e.g. @LDAP_Connection. It allows lot of code branches in UDM to use the decorators now. It has also the advantage that error in thread are handled the same as non-threaded methods.
In my tests every function which currently uses some of the decorators still works as before.
Comment 1 Florian Best univentionstaff 2014-10-10 19:51:46 CEST
*** Bug 34277 has been marked as a duplicate of this bug. ***
Comment 2 Florian Best univentionstaff 2014-10-10 19:56:22 CEST
Many - not all - cases where Bug #30258 is needed are also fixed. But it would be much more easier to implement Bug #30258 without touching that much functions as in the suggested patch there.
Comment 3 Florian Best univentionstaff 2016-04-27 11:50:42 CEST
This would have been helpful in the Google Apps for Work / Office 365 wizard and is especially helpful in UCS@school :(.
Comment 4 Alexander Kläser univentionstaff 2016-04-28 09:34:15 CEST
Well... if it is needed, would it not make sense to commit, maybe as decorators2.py :) ?
Comment 5 Florian Best univentionstaff 2016-04-28 10:16:36 CEST
(In reply to Alexander Kläser from comment #4)
> Well... if it is needed, would it not make sense to commit, maybe as
> decorators2.py :) ?
I don't think so. We don't get rid of the duplication otherwise.
Comment 6 Florian Best univentionstaff 2016-08-18 16:27:32 CEST
Created attachment 7894 [details]
patch (relative to svn r71715)

rebased patch.