diff options
author | Jan Cholasta <jcholast@redhat.com> | 2011-11-21 10:50:27 -0500 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2011-11-30 17:08:35 +0100 |
commit | 135ccf89de866ea2cdda96993ed2743394e1e716 (patch) | |
tree | 1b3c7bef4d5653255b75014218d1d0be9b10d5bb /ipalib/plugins/dns.py | |
parent | 2ac9d4816a85822825257e16f4fcf74e15a8ea02 (diff) | |
download | freeipa.git-135ccf89de866ea2cdda96993ed2743394e1e716.tar.gz freeipa.git-135ccf89de866ea2cdda96993ed2743394e1e716.tar.xz freeipa.git-135ccf89de866ea2cdda96993ed2743394e1e716.zip |
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
Diffstat (limited to 'ipalib/plugins/dns.py')
-rw-r--r-- | ipalib/plugins/dns.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index b3a6abc6..7acb3df8 100644 --- a/ipalib/plugins/dns.py +++ b/ipalib/plugins/dns.py @@ -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): |