diff options
author | Jan Cholasta <jcholast@redhat.com> | 2016-06-29 18:11:41 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2016-06-30 16:32:20 +0200 |
commit | 1a03bd322df65ecb9302f0cd70ec2b9bbfa3812e (patch) | |
tree | 5c3da13f3dd52f077325258c8a618389e9cf12cb | |
parent | e4ec4796a38f2143a9df200d55edb990684d67db (diff) | |
download | freeipa-1a03bd322df65ecb9302f0cd70ec2b9bbfa3812e.tar.gz freeipa-1a03bd322df65ecb9302f0cd70ec2b9bbfa3812e.tar.xz freeipa-1a03bd322df65ecb9302f0cd70ec2b9bbfa3812e.zip |
cert: fix CLI output of cert_remove_hold
cert_remove_hold uses output params instead of exceptions to convey
unsuccessful result. Move the output params to the client side before
the command is fixed to use exceptions.
https://fedorahosted.org/freeipa/ticket/4739
Reviewed-By: David Kupka <dkupka@redhat.com>
-rw-r--r-- | ipaclient/plugins/cert.py | 14 | ||||
-rw-r--r-- | ipaserver/plugins/cert.py | 8 |
2 files changed, 13 insertions, 9 deletions
diff --git a/ipaclient/plugins/cert.py b/ipaclient/plugins/cert.py index de4318b68..37e894efb 100644 --- a/ipaclient/plugins/cert.py +++ b/ipaclient/plugins/cert.py @@ -23,7 +23,7 @@ from ipaclient.frontend import MethodOverride from ipalib import errors from ipalib import x509 from ipalib import util -from ipalib.parameters import File +from ipalib.parameters import File, Flag, Str from ipalib.plugable import Registry from ipalib.text import _ @@ -55,6 +55,18 @@ class cert_show(MethodOverride): @register(override=True) +class cert_remove_hold(MethodOverride): + has_output_params = ( + Flag('unrevoked', + label=_('Unrevoked'), + ), + Str('error_string', + label=_('Error'), + ), + ) + + +@register(override=True) class cert_find(MethodOverride): takes_options = ( File( diff --git a/ipaserver/plugins/cert.py b/ipaserver/plugins/cert.py index 526360bb6..1007408ef 100644 --- a/ipaserver/plugins/cert.py +++ b/ipaserver/plugins/cert.py @@ -842,14 +842,6 @@ class cert_revoke(PKQuery, CertMethod, VirtualCommand): class cert_remove_hold(PKQuery, CertMethod, VirtualCommand): __doc__ = _('Take a revoked certificate off hold.') - has_output_params = ( - Flag('unrevoked', - label=_('Unrevoked'), - ), - Str('error_string', - label=_('Error'), - ), - ) operation = "certificate remove hold" def get_options(self): |