summaryrefslogtreecommitdiffstats
path: root/ipaclient
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-06-08 16:24:45 +0200
committerJan Cholasta <jcholast@redhat.com>2016-06-20 16:39:12 +0200
commitcbe73c6d2816d590d4314c6d4207de2cfc7d274e (patch)
tree3b8e6cee0be5aa8f68a057cdf0e75c7ed3239c36 /ipaclient
parentd0cfe37a7ebda848abd32fc46129e7844da5a9be (diff)
downloadfreeipa-cbe73c6d2816d590d4314c6d4207de2cfc7d274e.tar.gz
freeipa-cbe73c6d2816d590d4314c6d4207de2cfc7d274e.tar.xz
freeipa-cbe73c6d2816d590d4314c6d4207de2cfc7d274e.zip
schema: remove redundant information
Remove the `autofill` kwarg from param schema. On the server, include default value only if autofill is set. On the client, set autofill if param has a default value. Remove the `deprecated_cli_aliases`, `hint` and `sortorder` kwargs, and the `dnsrecord_extra`, `dnsrecord_part` and `suppress_empty` flags from param schema, as they are now handled exclusively on the client. Replace the `no_option` and `no_output` flags in param schema with exclusion of the param in 'cli' and 'webui' contexts. Remove the `no_display` flag from output schema, as it is now handled exclusively on the client. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaclient')
-rw-r--r--ipaclient/remote_plugins/schema.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/ipaclient/remote_plugins/schema.py b/ipaclient/remote_plugins/schema.py
index 25a2a7ec5..1a9dcd183 100644
--- a/ipaclient/remote_plugins/schema.py
+++ b/ipaclient/remote_plugins/schema.py
@@ -223,25 +223,20 @@ def _create_param(meta):
'sortorder'):
kwargs[key] = value
elif key in ('cli_metavar',
- 'cli_name',
- 'hint'):
+ 'cli_name'):
kwargs[key] = str(value)
elif key == 'confirm' and issubclass(cls, parameters.Password):
kwargs[key] = value
elif key == 'default':
default = value
+ kwargs['autofill'] = True
elif key == 'default_from_param':
kwargs['default_from'] = DefaultFrom(_nope,
*(str(k) for k in value))
- elif key in ('deprecated_cli_aliases',
- 'exclude',
+ kwargs['autofill'] = True
+ elif key in ('exclude',
'include'):
kwargs[key] = tuple(str(v) for v in value)
- elif key in ('dnsrecord_extra',
- 'dnsrecord_part',
- 'no_option',
- 'suppress_empty') and value:
- kwargs.setdefault('flags', set()).add(key)
if default is not None:
tmp = cls(str(meta['name']), **dict(kwargs, no_convert=False))