diff options
| author | Martin Babinsky <mbabinsk@redhat.com> | 2016-07-12 13:44:49 +0200 |
|---|---|---|
| committer | Petr Vobornik <pvoborni@redhat.com> | 2016-07-13 18:46:31 +0200 |
| commit | a1a7ecdc7bf6686adf8558cedd3964f9e4805469 (patch) | |
| tree | 8b7f9d43169dea0f7dfd0c62af5ddb1e526a0674 /ipaclient/plugins | |
| parent | 6c74bd2bcca46b586b07c3acd9670dae6e1f07b9 (diff) | |
| download | freeipa-a1a7ecdc7bf6686adf8558cedd3964f9e4805469.tar.gz freeipa-a1a7ecdc7bf6686adf8558cedd3964f9e4805469.tar.xz freeipa-a1a7ecdc7bf6686adf8558cedd3964f9e4805469.zip | |
vault-add: set the default vault type on the client side if none was given
`vault-add` commands does much processing depending on the vault type even
before the request is forwarded to remote server. Since default values for
parameters are now filled only on server side, the client-side logic would
fail if the vault type was not explicitly given. In this case we have to
retrieve and use the default vault type from schema.
https://fedorahosted.org/freeipa/ticket/6047
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipaclient/plugins')
| -rw-r--r-- | ipaclient/plugins/vault.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ipaclient/plugins/vault.py b/ipaclient/plugins/vault.py index bf0242fc4..a3ce6fecb 100644 --- a/ipaclient/plugins/vault.py +++ b/ipaclient/plugins/vault.py @@ -221,6 +221,11 @@ class vault_add(Local): def forward(self, *args, **options): vault_type = options.get('ipavaulttype') + + if vault_type is None: + internal_cmd = self.api.Command.vault_add_internal + vault_type = internal_cmd.params.ipavaulttype.default + password = options.get('password') password_file = options.get('password_file') public_key = options.get('ipavaultpublickey') |
