mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipalib: move File command arguments to ipaclient
File arguments are relevant only on the client, on the server they are the same as Str. Specify the arguments as Str in ipalib.plugins and override them with File in ipaclient.plugins. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
@@ -23,11 +23,21 @@ from ipaclient.frontend import CommandOverride
|
||||
from ipalib import errors
|
||||
from ipalib import x509
|
||||
from ipalib import util
|
||||
from ipalib.parameters import File
|
||||
from ipalib.plugable import Registry
|
||||
|
||||
register = Registry()
|
||||
|
||||
|
||||
@register(override=True)
|
||||
class cert_request(CommandOverride):
|
||||
def get_args(self):
|
||||
for arg in super(cert_request, self).get_args():
|
||||
if arg.name == 'csr':
|
||||
arg = arg.clone_retype(arg.name, File)
|
||||
yield arg
|
||||
|
||||
|
||||
@register(override=True)
|
||||
class cert_show(CommandOverride):
|
||||
def forward(self, *keys, **options):
|
||||
|
||||
Reference in New Issue
Block a user