mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipaclient.plugins: Use api_version from internally called commands
In client plugins make sure the api_version is 'inherited' from server command that is internally called. Otherwise the api_version is obtained from client API instance. When calling server command from client command 'version' is passed in options and it overrides the right one. Server then refuses to handle such call. https://fedorahosted.org/freeipa/ticket/6539 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
19aba7c555
commit
d841a79dc1
@@ -209,6 +209,10 @@ class vault_add(Local):
|
||||
|
||||
NO_CLI = classproperty(__NO_CLI_getter)
|
||||
|
||||
@property
|
||||
def api_version(self):
|
||||
return self.api.Command.vault_add_internal.api_version
|
||||
|
||||
def get_args(self):
|
||||
for arg in self.api.Command.vault_add_internal.args():
|
||||
yield arg
|
||||
@@ -415,6 +419,10 @@ class vault_mod(Local):
|
||||
|
||||
NO_CLI = classproperty(__NO_CLI_getter)
|
||||
|
||||
@property
|
||||
def api_version(self):
|
||||
return self.api.Command.vault_mod_internal.api_version
|
||||
|
||||
def get_args(self):
|
||||
for arg in self.api.Command.vault_mod_internal.args():
|
||||
yield arg
|
||||
@@ -602,6 +610,10 @@ class vault_archive(Local):
|
||||
|
||||
NO_CLI = classproperty(__NO_CLI_getter)
|
||||
|
||||
@property
|
||||
def api_version(self):
|
||||
return self.api.Command.vault_archive_internal.api_version
|
||||
|
||||
def get_args(self):
|
||||
for arg in self.api.Command.vault_archive_internal.args():
|
||||
yield arg
|
||||
@@ -855,6 +867,10 @@ class vault_retrieve(Local):
|
||||
|
||||
NO_CLI = classproperty(__NO_CLI_getter)
|
||||
|
||||
@property
|
||||
def api_version(self):
|
||||
return self.api.Command.vault_retrieve_internal.api_version
|
||||
|
||||
def get_args(self):
|
||||
for arg in self.api.Command.vault_retrieve_internal.args():
|
||||
yield arg
|
||||
|
||||
Reference in New Issue
Block a user