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/batch.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ipalib/plugins/batch.py') diff --git a/ipalib/plugins/batch.py b/ipalib/plugins/batch.py index 72d7fe39..4c5a6bd1 100644 --- a/ipalib/plugins/batch.py +++ b/ipalib/plugins/batch.py @@ -47,7 +47,7 @@ And then a nested response for each IPA command method sent in the request from ipalib import api, errors from ipalib import Command -from ipalib import Str, List +from ipalib.parameters import Str, Any from ipalib.output import Output from ipalib import output from ipalib.text import _ @@ -58,10 +58,10 @@ class batch(Command): NO_CLI = True takes_args = ( - List('methods?', - doc=_('Nested Methods to execute'), - ), - ) + Any('methods*', + doc=_('Nested Methods to execute'), + ), + ) take_options = ( Str('version', @@ -71,7 +71,7 @@ class batch(Command): flags=['no_option', 'no_output'], default=API_VERSION, autofill=True, - ) + ), ) has_output = ( -- cgit