mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
parent
e4ec4796a3
commit
1a03bd322d
@ -23,7 +23,7 @@ from ipaclient.frontend import MethodOverride
|
|||||||
from ipalib import errors
|
from ipalib import errors
|
||||||
from ipalib import x509
|
from ipalib import x509
|
||||||
from ipalib import util
|
from ipalib import util
|
||||||
from ipalib.parameters import File
|
from ipalib.parameters import File, Flag, Str
|
||||||
from ipalib.plugable import Registry
|
from ipalib.plugable import Registry
|
||||||
from ipalib.text import _
|
from ipalib.text import _
|
||||||
|
|
||||||
@ -54,6 +54,18 @@ class cert_show(MethodOverride):
|
|||||||
return super(cert_show, self).forward(*keys, **options)
|
return super(cert_show, self).forward(*keys, **options)
|
||||||
|
|
||||||
|
|
||||||
|
@register(override=True)
|
||||||
|
class cert_remove_hold(MethodOverride):
|
||||||
|
has_output_params = (
|
||||||
|
Flag('unrevoked',
|
||||||
|
label=_('Unrevoked'),
|
||||||
|
),
|
||||||
|
Str('error_string',
|
||||||
|
label=_('Error'),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@register(override=True)
|
@register(override=True)
|
||||||
class cert_find(MethodOverride):
|
class cert_find(MethodOverride):
|
||||||
takes_options = (
|
takes_options = (
|
||||||
|
@ -842,14 +842,6 @@ class cert_revoke(PKQuery, CertMethod, VirtualCommand):
|
|||||||
class cert_remove_hold(PKQuery, CertMethod, VirtualCommand):
|
class cert_remove_hold(PKQuery, CertMethod, VirtualCommand):
|
||||||
__doc__ = _('Take a revoked certificate off hold.')
|
__doc__ = _('Take a revoked certificate off hold.')
|
||||||
|
|
||||||
has_output_params = (
|
|
||||||
Flag('unrevoked',
|
|
||||||
label=_('Unrevoked'),
|
|
||||||
),
|
|
||||||
Str('error_string',
|
|
||||||
label=_('Error'),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
operation = "certificate remove hold"
|
operation = "certificate remove hold"
|
||||||
|
|
||||||
def get_options(self):
|
def get_options(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user