summaryrefslogtreecommitdiffstats
path: root/ipaclient/plugins/vault.py
diff options
context:
space:
mode:
authorDavid Kupka <dkupka@redhat.com>2016-12-06 12:35:23 +0100
committerMartin Basti <mbasti@redhat.com>2016-12-14 11:50:35 +0100
commitd841a79dc104521f736469eff7154c2f4266082b (patch)
tree439864a2331d34b9cbf603f5dc215485e11bd98b /ipaclient/plugins/vault.py
parent19aba7c555edf065b9f2fa95142da81b92396264 (diff)
downloadfreeipa-d841a79dc104521f736469eff7154c2f4266082b.tar.gz
freeipa-d841a79dc104521f736469eff7154c2f4266082b.tar.xz
freeipa-d841a79dc104521f736469eff7154c2f4266082b.zip
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>
Diffstat (limited to 'ipaclient/plugins/vault.py')
-rw-r--r--ipaclient/plugins/vault.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/ipaclient/plugins/vault.py b/ipaclient/plugins/vault.py
index c099e9ee2..29157c7e1 100644
--- a/ipaclient/plugins/vault.py
+++ b/ipaclient/plugins/vault.py
@@ -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