From 135ccf89de866ea2cdda96993ed2743394e1e716 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Mon, 21 Nov 2011 10:50:27 -0500 Subject: Parse comma-separated lists of values in all parameter types. This can be enabled for a specific parameter by setting the "csv" option to True. Remove "List" parameter type and replace all occurences of it with appropriate multi-valued parameter ("Str" in most cases) with csv enabled. Add new parameter type "Any", capable of holding values of any type. This is needed by the "batch" command, as "Str" is not suitable type for the "methods" parameter. ticket 2007 --- ipalib/plugins/aci.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ipalib/plugins/aci.py') diff --git a/ipalib/plugins/aci.py b/ipalib/plugins/aci.py index 04f25f289..7ace05eb4 100644 --- a/ipalib/plugins/aci.py +++ b/ipalib/plugins/aci.py @@ -120,7 +120,7 @@ targetattr REPLACES the current attributes, it does not add to them. from ipalib import api, crud, errors from ipalib import Object, Command -from ipalib import Flag, Int, List, Str, StrEnum +from ipalib import Flag, Int, Str, StrEnum from ipalib.aci import ACI from ipalib import output from ipalib import _, ngettext @@ -430,18 +430,20 @@ class aci(Object): doc=_('User group ACI grants access to'), flags=('virtual_attribute',), ), - List('permissions', validate_permissions, + Str('permissions+', validate_permissions, cli_name='permissions', label=_('Permissions'), doc=_('comma-separated list of permissions to grant' \ '(read, write, add, delete, all)'), + csv=True, normalizer=_normalize_permissions, flags=('virtual_attribute',), ), - List('attrs?', + Str('attrs*', cli_name='attrs', label=_('Attributes'), doc=_('Comma-separated list of attributes'), + csv=True, flags=('virtual_attribute',), ), StrEnum('type?', -- cgit