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 /ipaclient/remote_plugins | |
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 'ipaclient/remote_plugins')
-rw-r--r-- | ipaclient/remote_plugins/schema.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipaclient/remote_plugins/schema.py b/ipaclient/remote_plugins/schema.py index 1a9dcd183..c21da5ff0 100644 --- a/ipaclient/remote_plugins/schema.py +++ b/ipaclient/remote_plugins/schema.py @@ -293,8 +293,8 @@ def _create_command(schema): command['obj_name'] = str(schema['obj_class']) if 'attr_name' in schema: command['attr_name'] = str(schema['attr_name']) - if 'no_cli' in schema: - command['NO_CLI'] = schema['no_cli'] + if 'exclude' in schema and u'cli' in schema['exclude']: + command['NO_CLI'] = True command['takes_args'] = tuple( _create_param(s) for s in schema['params'] if s.get('positional', s.get('required', True))) |