[Freeipa-devel] [PATCHES] 0183-0185 Drop CSV support

Martin Kosek mkosek at redhat.com
Fri Feb 22 16:33:45 UTC 2013


On 02/22/2013 03:05 PM, Petr Viktorin wrote:
> On 02/22/2013 02:36 PM, Martin Kosek wrote:
>> On 02/22/2013 02:01 PM, Martin Kosek wrote:
>>> On 02/21/2013 06:08 PM, Petr Viktorin wrote:
>>>> These patches remove CSV parsing from the client.
>>>>
>>>> Ticket: https://fedorahosted.org/freeipa/ticket/3352
>>>> Design: http://freeipa.org/page/V3/Drop_CSV
>>>>
>>>>
>>>> The design page also talks about adding a warning for the user when they seem
>>>> to use CSV, but this will need the JSON transport so it's not included in
>>>> these
>>>> patches.
>>>>
>>>> The "csv" flag is left on parameters so when that warning is added, we know
>>>> for
>>>> which params to show it.
>>>>
>>>
>>> Generally, this works fine. This finally allows us to easily add records with
>>> quote or comma:
>>>
>>> # ipa dnsrecord-add example.com txt1 --txt-rec="foo, bar"
>>>    Record name: txt1
>>>    TXT record: foo, bar
>>> # ipa dnsrecord-add example.com txt1 --txt-rec='"bar,bar"'
>>>    Record name: txt1
>>>    TXT record: foo, bar, "bar,bar"
>>> # ipa dnsrecord-show example.com txt1 --all --raw
>>>    dn: idnsname=txt1,idnsname=example.com,cn=dns,dc=example,dc=com
>>>    idnsname: txt1
>>>    txtrecord: foo, bar
>>>    txtrecord: "bar,bar"
>>>    objectclass: top
>>>    objectclass: idnsrecord
>>>
>>>
>>>
>>> Just couple minor remarks:
>>>
>>> 1) Can we then update the csv flag description? It is now a bit misleading
>>> given its new function
>>>
>>>         - csv: this multivalue attribute is given in CSV format
> 
> I have reworded that in patch 184:
> 
> -      - csv: this multivalue attribute is given in CSV format
> +      - csv: this multivalue attribute used to be given in CSV format in CLI
> 
>>> 2) We need to also update our help, for example selfservice online help
>>> presents a CSV formatted option use:
>>>
>>>     ipa selfservice-add --permissions=write --attrs=street,postalCode,l,c,st
>>> "Users manage their own      address"
>>>
>>> Btw if we suggest the curly braces shortcut, we may also want to write that it
>>> applies for BASH shell only...
>>>
>>> Few other examples I saw:
>>>     ipa group-add-member --users=test1,test2 localadmins
>>>
> 
> Attaching patch for that.
> I used the Bash shortcut when there were more than two items.
> I grepped through the sources to find examples that need changing, hopefully
> I've caught them all.
> 
>> Just discovered another issue... We now crash when adding permissions/acis with
>> csv:
>>
>> # ipa permission-add --attrs=member --permissions=read,write --type=group foo2
>> ipa: ERROR: an internal error has occurred
>>
>> We should report some meaningful error, otherwise users used to add permissions
>> with csv values would be confused.
> 
> See ticket #3420, patch 0182.
> 

Thanks for the fixes. ACK. Pushed to master.

Martin




More information about the Freeipa-devel mailing list