Bug 36011 - Import/export mechanism for UDM objects
Import/export mechanism for UDM objects
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 4.2
All Linux
: P5 enhancement (vote)
: ---
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-26 18:03 CEST by Philipp Hahn
Modified: 2022-06-15 09:54 CEST (History)
6 users (show)

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?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2016091521000637
Bug group (optional): External feedback, Roadmap discussion (moved)
Max CVSS v3 score:


Attachments
Convert an UDM object to the command line creating it (980 bytes, text/x-shellscript)
2014-09-26 18:03 CEST, Philipp Hahn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2014-09-26 18:03:36 CEST
Created attachment 6136 [details]
Convert an UDM object to the command line creating it

Ticket #2014092221000314: UCS technical training 2014-09

A export/import mechanism from/to LDAP was requested, which alloes exporting UDM object (e.g. users) on one domain and import them on a different one.

See toolshed/udm2sh
Comment 1 Florian Best univentionstaff 2016-09-26 11:18:18 CEST
Nice script, thanks!
Comment 2 Florian Best univentionstaff 2016-09-26 14:10:46 CEST
It would be nice if one could use the attached script to apply this to the output of "udm $MODULE list".
Currently it would produce the following output (for my 2 objects):

# udm computers/ipmanagedclient list | ./conv.sh 
udm computers/ipmanagedclient create \
  --position ''"$(ucr get ldap/base)" \
  --set name=fooudm computers/ipmanagedclient create \
  --position ''"$(ucr get ldap/base)" \
  --set name=bar
Comment 3 Florian Best univentionstaff 2019-08-25 13:21:14 CEST
This can only be a nice development tool but not for production use.
If one wants to export and import objects one need to operate on LDAP directly.
Because: not all LDAP attributes are mapped to properties, e.g. the krb5Key of a user or computer object.
Comment 4 Daniel Tröder univentionstaff 2019-08-26 08:31:59 CEST
For most use cases the reporting tool in the LDAP browser is sufficient for exporting CSV. A simple cmdline tool that is easier to configure might be appreciated.
For importing from CSV, this tool is very easy to use, and sufficient for most use cases: https://github.com/univention/udm_import
Comment 5 Philipp Hahn univentionstaff 2019-08-26 11:53:53 CEST
(In reply to Daniel Tröder from comment #4)
> For most use cases the reporting tool in the LDAP browser is sufficient for
> exporting CSV. A simple cmdline tool that is easier to configure might be
> appreciated.
> For importing from CSV, this tool is very easy to use, and sufficient for
> most use cases: https://github.com/univention/udm_import

Please not CSV - it's a non-"format" because there are so many subtile differences in its handling.
Use LDIF if you want a text format, which is standardized and does not produce "Yet Another UCS specific" format.

But the original bug was about a mechanism to create a UDM command line, which is most useful for transferring extended attribute definitions between domains.
Comment 6 Daniel Tröder univentionstaff 2019-08-27 09:00:37 CEST
CSV is so successful, because it is very user friendly: it can be edited by both humans (text editors) and office suites. So it enables users to interact with the data in a workflow.
The format is generally under-specified, but for _most_ use cases sufficient.

The biggest problem is ofc missing support for types and nested structures. Unfortunately I don't know of any file format that supports nested structures and for which a globally known graphical representation exists - like the "table".
While trees are generally understood, they are hard to display and edit, and the difficulty rises very fast with the depth.
Comment 7 Ingo Steuwer univentionstaff 2020-07-03 20:51:25 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.