diff options
author | Jan Cholasta <jcholast@redhat.com> | 2016-05-25 12:20:31 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2016-06-03 09:00:34 +0200 |
commit | 43dc424041e6766dbadd46f6f3982d85e69049cc (patch) | |
tree | 6502f9025824889e611d38b1fd735e28d9aebff7 /ipalib | |
parent | f35beca68ceaab34ec1bed86be5ae49a0a931658 (diff) | |
download | freeipa-43dc424041e6766dbadd46f6f3982d85e69049cc.tar.gz freeipa-43dc424041e6766dbadd46f6f3982d85e69049cc.tar.xz freeipa-43dc424041e6766dbadd46f6f3982d85e69049cc.zip |
rpc: respect API config in RPCClient.create_connection
When connecting rpcclient, get the default values of the `verbose`,
`fallback` and `delegate` options from API config rather than hard-code
them.
https://fedorahosted.org/freeipa/ticket/4739
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/rpc.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ipalib/rpc.py b/ipalib/rpc.py index 67b503b69..120b28501 100644 --- a/ipalib/rpc.py +++ b/ipalib/rpc.py @@ -861,8 +861,14 @@ class RPCClient(Connectible): return session_url - def create_connection(self, ccache=None, verbose=0, fallback=True, - delegate=False, nss_dir=None): + def create_connection(self, ccache=None, verbose=None, fallback=None, + delegate=None, nss_dir=None): + if verbose is None: + verbose = self.api.env.verbose + if fallback is None: + fallback = self.api.env.fallback + if delegate is None: + delegate = self.api.env.delegate try: rpc_uri = self.env[self.env_rpc_uri_key] principal = get_principal() |