mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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
This commit is contained in:
committed by
Martin Kosek
parent
2ac9d4816a
commit
135ccf89de
@@ -24,7 +24,7 @@ import re
|
||||
|
||||
from ipalib import api, errors, output
|
||||
from ipalib import Command
|
||||
from ipalib import Flag, Bool, Int, List, Str, StrEnum
|
||||
from ipalib import Flag, Bool, Int, Str, StrEnum
|
||||
from ipalib.plugins.baseldap import *
|
||||
from ipalib import _, ngettext
|
||||
from ipalib.util import validate_zonemgr, normalize_zonemgr, validate_hostname
|
||||
@@ -1040,16 +1040,16 @@ class dnsrecord_cmd_w_record_options(Command):
|
||||
validator = _record_validators.get(rec_type)
|
||||
normalizer = _record_normalizers.get(rec_type)
|
||||
if validator:
|
||||
return List(
|
||||
'%srecord?' % rec_type.lower(), validator, normalizer=normalizer,
|
||||
return Str(
|
||||
'%srecord*' % rec_type.lower(), validator, normalizer=normalizer,
|
||||
cli_name='%s_rec' % rec_type.lower(), doc=doc,
|
||||
label='%s record' % rec_type, attribute=True
|
||||
label='%s record' % rec_type, csv=True, attribute=True
|
||||
)
|
||||
else:
|
||||
return List(
|
||||
'%srecord?' % rec_type.lower(), cli_name='%s_rec' % rec_type.lower(),
|
||||
return Str(
|
||||
'%srecord*' % rec_type.lower(), cli_name='%s_rec' % rec_type.lower(),
|
||||
normalizer=normalizer, doc=doc, label='%s record' % rec_type,
|
||||
attribute=True
|
||||
csv=True, attribute=True
|
||||
)
|
||||
|
||||
def prompt_record_options(self, rec_type_list):
|
||||
|
||||
Reference in New Issue
Block a user