Bug 37285 - udm remove --filter print misleading message
udm remove --filter print misleading message
Product: UCS
Classification: Unclassified
Component: UDM - CLI
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.2-1-errata
Assigned To: Johannes Keiser
Florian Best
Depends on:
  Show dependency treegraph
Reported: 2014-12-10 11:39 CET by Philipp Hahn
Modified: 2017-07-27 00:19 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 1: Cosmetic issue or missing function but workaround exists
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.011
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
hahn: Patch_Available+


Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2014-12-10 11:39:49 CET
$ udm containes/cn create --set name=foo
Object created: cn=foo,dc=phahn,dc=pt
$ udm containes/cn remove --filter name=foo
Object removed:

"udm remove" should print the DN of the matched object.

diff --git a/branches/ucs-4.0/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admincli/admin.py b/branches/ucs-4.0/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admincli/admin.py
index 2580e44..a37d306 100755
--- a/branches/ucs-4.0/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admincli/admin.py
+++ b/branches/ucs-4.0/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admincli/admin.py
@@ -765,7 +765,7 @@ def _doit(arglist):
                                        return out + ["OPERATION FAILED"]
-#+++# ACTION CREATE #+++#
+       #+++# ACTION CREATE #+++#
        if action == 'create' or action == 'new':
                        if hasattr(module,'operations') and module.operations:
                                if not 'add' in module.operations:
@@ -902,7 +902,7 @@ def _doit(arglist):
                                out.append('Object created: %s' % _2utf8( dn ) )
-#+++# ACTION MODIFY #+++#
+       #+++# ACTION MODIFY #+++#
        elif action == 'modify' or action == 'edit' or action == 'move':
                if not dn:
                        out.append('E: DN is missing')
@@ -1107,7 +1107,7 @@ def _doit(arglist):
                        except univention.admin.uexceptions.primaryGroupUsed:
                                out.append('E: object in use')
                                return out + ["OPERATION FAILED"]
-               out.append( 'Object removed: %s'% _2utf8( dn ) )
+               out.append('Object removed: %s'% _2utf8(dn or object.dn))
        elif action == 'list' or action == 'lookup':
Comment 1 Johannes Keiser univentionstaff 2017-06-30 16:08:52 CEST
Applied rebased patch:

r 80696
univention-directory-manager-modules (12.0.17-40) 
* Bug #37285: Applied patch from Philipp Hahn - Print DN of object removed
with udm remove --filter

YAML: r 80697
Comment 2 Florian Best univentionstaff 2017-06-30 16:53:37 CEST
OK: the DN of the removed object is printed
Comment 3 Janek Walkenhorst univentionstaff 2017-07-05 13:06:16 CEST