diff options
author | Jan Cholasta <jcholast@redhat.com> | 2016-06-20 12:56:28 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2016-06-20 16:39:12 +0200 |
commit | 8cc8b6fb1023fa4aeafac0df01cfacff4ebf537a (patch) | |
tree | dc8dc291fcaab9d25fb7b784942f216f0fe312f3 /ipaserver/plugins/schema.py | |
parent | cbe73c6d2816d590d4314c6d4207de2cfc7d274e (diff) | |
download | freeipa-8cc8b6fb1023fa4aeafac0df01cfacff4ebf537a.tar.gz freeipa-8cc8b6fb1023fa4aeafac0df01cfacff4ebf537a.tar.xz freeipa-8cc8b6fb1023fa4aeafac0df01cfacff4ebf537a.zip |
schema: remove `no_cli` from command schema
Instead, support excluding commands from specified contexts and exclude
commands with NO_CLI set from the 'cli' context.
https://fedorahosted.org/freeipa/ticket/4739
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaserver/plugins/schema.py')
-rw-r--r-- | ipaserver/plugins/schema.py | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/ipaserver/plugins/schema.py b/ipaserver/plugins/schema.py index 021646390..98b47cbbb 100644 --- a/ipaserver/plugins/schema.py +++ b/ipaserver/plugins/schema.py @@ -52,6 +52,16 @@ class BaseMetaObject(Object): label=_("Documentation"), flags={'no_search'}, ), + Str( + 'exclude*', + label=_("Exclude from"), + flags={'no_search'}, + ), + Str( + 'include*', + label=_("Include in"), + flags={'no_search'}, + ), ) def _get_obj(self, obj, **kwargs): @@ -176,11 +186,6 @@ class command(metaobject): label=_("Method name"), flags={'no_search'}, ), - Bool( - 'no_cli?', - label=_("Exclude from CLI"), - flags={'no_search'}, - ), ) def _iter_params(self, cmd): @@ -210,7 +215,7 @@ class command(metaobject): obj['attr_name'] = unicode(cmd.attr_name) if cmd.NO_CLI: - obj['no_cli'] = True + obj['exclude'] = [u'cli'] return obj @@ -469,16 +474,6 @@ class param(BaseParam): flags={'no_search'}, ), Str( - 'exclude*', - label=_("Exclude from"), - flags={'no_search'}, - ), - Str( - 'include*', - label=_("Include in"), - flags={'no_search'}, - ), - Str( 'label?', label=_("Label"), flags={'no_search'}, |