Bug 41172 - udm-cli --remove doesn't work with singlevalue attribute name
udm-cli --remove doesn't work with singlevalue attribute name
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM - CLI
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 4.1-2-errata
Assigned To: Daniel Tröder
Florian Best
:
: 7463 28995 (view as bug list)
Depends on: 20899
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-28 17:28 CEST by Nico Stöckigt
Modified: 2016-06-15 16:20 CEST (History)
9 users (show)

See Also:
What kind of report is it?: ---
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
make udm cope with wrong command (remove instead of set) (904 bytes, patch)
2016-05-02 09:13 CEST, Daniel Tröder
Details | Diff
patch (1.59 KB, patch)
2016-05-19 10:21 CEST, Florian Best
Details | Diff
patch (1.21 KB, patch)
2016-06-14 11:47 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Stöckigt univentionstaff 2016-04-28 17:28:00 CEST
+++ This bug was initially created as a clone of Bug #20899 +++

reported at Ticket#: 2016042821000407

when removing an e-mail address of a user using udm cli, the following error is shown:

root@mucs:~$ udm users/user modify --dn="uid=user1,cn=users,dc=univention,dc=local" --remove mailCanonicalInternalPrimaryMailAddress

Invalid syntax: Internal primary mail address: Not a valid email address! (No "@"-character to separate local-part and domain-part)

--

DN: uid=user1,cn=users,dc=univention,dc=local
ARG: None
  mailPrimaryAddress: user1@univention.local
  mailAlternativeAddress: user.1@univention.local
  mailCanonicalInternalAlternativeMailAddress: user.one@univention.local
  mailCanonicalPublicPrimaryMailAddress: user.one@univention.public
  mailCanonicalPublicAlternativeMailAddress: user.one@univention.public
  mailCanonicalInternalPrimaryMailAddress: user.one@univention.local
--8<--
Comment 1 Daniel Tröder univentionstaff 2016-05-02 09:13:17 CEST
Created attachment 7633 [details]
make udm cope with wrong command (remove instead of set)

Only tested with:
udm users/user modify --dn=uid=test5,dc=uni,dc=dtr --remove firstname
udm users/user modify --dn=uid=test5,dc=uni,dc=dtr --remove mailPrimaryAddress
Comment 2 Jens Thorp-Hansen univentionstaff 2016-05-19 08:33:13 CEST
happened again at Ticket#2016051921000146
Comment 3 Florian Best univentionstaff 2016-05-19 10:21:17 CEST
Created attachment 7669 [details]
patch
Comment 4 Florian Best univentionstaff 2016-05-19 10:21:51 CEST
(In reply to Daniel Tröder from comment #1)
> Created attachment 7633 [details]
> make udm cope with wrong command (remove instead of set)
This patch doesn't respect e.g. --remove foo=bar.
Comment 5 Daniel Tröder univentionstaff 2016-05-19 12:52:43 CEST
The UDM command line tool now supports the use of '--remove' on single value attributes.

Code change: r69396 + r69399
Advisory: r69400
Comment 6 Florian Best univentionstaff 2016-05-27 10:58:52 CEST
*** Bug 28995 has been marked as a duplicate of this bug. ***
Comment 7 Florian Best univentionstaff 2016-05-27 11:01:45 CEST
*** Bug 7463 has been marked as a duplicate of this bug. ***
Comment 8 Florian Best univentionstaff 2016-06-10 09:34:11 CEST
REOPEN: svn r69396 was not reverted after applying patch from attachment 7669 [details]
Comment 9 Daniel Tröder univentionstaff 2016-06-10 12:35:55 CEST
r69396 was reverted in r70077 and package univention-directory-manager-modules was rebuild in scope errata4.1-2 (new version 11.0.3-7.1399.201606101231).
Advisory: r70078
Comment 10 Florian Best univentionstaff 2016-06-14 11:47:00 CEST
The following doesn't work:
udm users/user modify --dn ... --remove mailAlternativeAddress
Comment 11 Florian Best univentionstaff 2016-06-14 11:47:17 CEST
Created attachment 7740 [details]
patch
Comment 12 Daniel Tröder univentionstaff 2016-06-14 14:58:33 CEST
Patch tested and applied in r70162, rebuild and advisory updated (r70163).
Comment 13 Florian Best univentionstaff 2016-06-15 09:31:10 CEST
OK: YAML
OK: --remove singleValue
OK: --remove singleValue=foo
OK: --remove multiValue
OK: --remove multiValue=foo
Comment 14 Janek Walkenhorst univentionstaff 2016-06-15 16:20:37 CEST
<http://errata.software-univention.de/ucs/4.1/199.html>