mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
@@ -166,6 +166,16 @@ class metaobject_find(MetaSearch):
|
||||
@register()
|
||||
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"),
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user