summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--VERSION4
-rw-r--r--ipaclient/remote_plugins/schema.py4
-rw-r--r--ipaserver/plugins/schema.py27
3 files changed, 15 insertions, 20 deletions
diff --git a/VERSION b/VERSION
index fed0c7414..faf10e3e8 100644
--- a/VERSION
+++ b/VERSION
@@ -90,5 +90,5 @@ IPA_DATA_VERSION=20100614120000
# #
########################################################
IPA_API_VERSION_MAJOR=2
-IPA_API_VERSION_MINOR=192
-# Last change: schema: remove redundant information
+IPA_API_VERSION_MINOR=193
+# Last change: schema: remove `no_cli` from command schema
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)))
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'},