diff options
| author | Jan Cholasta <jcholast@redhat.com> | 2016-06-15 08:02:30 +0200 |
|---|---|---|
| committer | Jan Cholasta <jcholast@redhat.com> | 2016-06-15 14:03:51 +0200 |
| commit | 448af06234030d171cd0cee654f970456d53e9e6 (patch) | |
| tree | 4fc177dbf886d4459b72b0e755e99242f8910ac4 | |
| parent | 365d9737639f38e4252bdb0203760739ca7b1edc (diff) | |
| download | freeipa-448af06234030d171cd0cee654f970456d53e9e6.tar.gz freeipa-448af06234030d171cd0cee654f970456d53e9e6.tar.xz freeipa-448af06234030d171cd0cee654f970456d53e9e6.zip | |
dns, passwd: fix outputs of `dns_resolve` and `passwd` commands
Use proper output type for the `value` output of the commands.
https://fedorahosted.org/freeipa/ticket/4739
Reviewed-By: David Kupka <dkupka@redhat.com>
| -rw-r--r-- | API.txt | 4 | ||||
| -rw-r--r-- | ipalib/output.py | 6 | ||||
| -rw-r--r-- | ipaserver/plugins/dns.py | 2 | ||||
| -rw-r--r-- | ipaserver/plugins/passwd.py | 2 |
4 files changed, 10 insertions, 4 deletions
@@ -1053,7 +1053,7 @@ arg: Str('hostname') option: Str('version?') output: Output('result', type=[<type 'bool'>]) output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>]) -output: PrimaryKey('value') +output: Output('value', type=[<type 'unicode'>]) command: dnsconfig_mod args: 0,11,3 option: Str('addattr*', cli_name='addattr') @@ -3317,7 +3317,7 @@ option: Password('otp?', confirm=False) option: Str('version?') output: Output('result', type=[<type 'bool'>]) output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>]) -output: PrimaryKey('value') +output: Output('value', type=[<type 'unicode'>]) command: permission_add args: 1,21,3 arg: Str('cn', cli_name='name') diff --git a/ipalib/output.py b/ipalib/output.py index d8841129e..19dd9adad 100644 --- a/ipalib/output.py +++ b/ipalib/output.py @@ -211,3 +211,9 @@ standard_boolean = ( ) standard_value = standard_boolean + +simple_value = ( + summary, + Output('result', bool, _('True means the operation was successful')), + Output('value', unicode, flags=['no_display']), +) diff --git a/ipaserver/plugins/dns.py b/ipaserver/plugins/dns.py index db1790793..5df363cc2 100644 --- a/ipaserver/plugins/dns.py +++ b/ipaserver/plugins/dns.py @@ -3965,7 +3965,7 @@ class dns_resolve(Command): NO_CLI = True - has_output = output.standard_value + has_output = output.simple_value msg_summary = _('Found \'%(value)s\'') takes_args = ( diff --git a/ipaserver/plugins/passwd.py b/ipaserver/plugins/passwd.py index c4e220815..8f6b80d12 100644 --- a/ipaserver/plugins/passwd.py +++ b/ipaserver/plugins/passwd.py @@ -97,7 +97,7 @@ class passwd(Command): ), ) - has_output = output.standard_value + has_output = output.simple_value msg_summary = _('Changed password for "%(value)s"') def execute(self, principal, password, current_password, **options): |
