summaryrefslogtreecommitdiffstats
path: root/ipaserver/plugins/schema.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-06-16 13:21:57 +0200
committerJan Cholasta <jcholast@redhat.com>2016-06-20 16:39:12 +0200
commit91faf3ecd7708409350c8c5961833cbde202b2b2 (patch)
tree14a9284589bf4ff908a936d367a0371369405123 /ipaserver/plugins/schema.py
parentec1b3e71b2688eed2264b7b24d9e8fcff938967f (diff)
downloadfreeipa-91faf3ecd7708409350c8c5961833cbde202b2b2.tar.gz
freeipa-91faf3ecd7708409350c8c5961833cbde202b2b2.tar.xz
freeipa-91faf3ecd7708409350c8c5961833cbde202b2b2.zip
schema: remove output_params
Since output params are copied from object plugins, remove them from command schema and include object name instead. One exception to this are the output params used for failed members in member add/remove commands. Move these to the client side, as they will be replaced by warnings. 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.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/ipaserver/plugins/schema.py b/ipaserver/plugins/schema.py
index ca662a686..32803a053 100644
--- a/ipaserver/plugins/schema.py
+++ b/ipaserver/plugins/schema.py
@@ -167,6 +167,16 @@ class metaobject_find(MetaSearch):
class command(metaobject):
takes_params = metaobject.takes_params + (
Str(
+ 'obj_class?',
+ label=_("Method of"),
+ flags={'no_search'},
+ ),
+ Str(
+ 'attr_name?',
+ label=_("Method name"),
+ flags={'no_search'},
+ ),
+ Str(
'args_param*',
label=_("Arguments"),
flags={'no_search'},
@@ -176,11 +186,6 @@ class command(metaobject):
label=_("Options"),
flags={'no_search'},
),
- Str(
- 'output_params_param*',
- label=_("Output parameters"),
- flags={'no_search'},
- ),
Bool(
'no_cli?',
label=_("Exclude from CLI"),
@@ -210,6 +215,10 @@ class command(metaobject):
else:
obj['topic_topic'] = topic['name']
+ if isinstance(cmd, Method):
+ obj['obj_class'] = unicode(cmd.obj_name)
+ obj['attr_name'] = unicode(cmd.attr_name)
+
if cmd.NO_CLI:
obj['no_cli'] = True
@@ -220,10 +229,6 @@ class command(metaobject):
obj['options_param'] = tuple(
unicode(n) for n in cmd.options if n != 'version')
- if len(cmd.output_params):
- obj['output_params_param'] = tuple(
- unicode(n) for n in cmd.output_params)
-
return obj
def _retrieve(self, name, **kwargs):