From 8cc8b6fb1023fa4aeafac0df01cfacff4ebf537a Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Mon, 20 Jun 2016 12:56:28 +0200 Subject: 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 --- ipaclient/remote_plugins/schema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipaclient/remote_plugins') 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))) -- cgit