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 | |
| parent | f35beca68ceaab34ec1bed86be5ae49a0a931658 (diff) | |
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>
| -rwxr-xr-x | client/ipa-client-install | 3 | ||||
| -rw-r--r-- | ipalib/rpc.py | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/client/ipa-client-install b/client/ipa-client-install index 1606d1d2f..2c5b20769 100755 --- a/client/ipa-client-install +++ b/client/ipa-client-install @@ -2794,7 +2794,8 @@ def install(options, env, fstore, statestore): # Now, let's try to connect to the server's RPC interface connected = False try: - api.Backend.rpcclient.connect(nss_dir=tmp_db.secdir) + api.Backend.rpcclient.connect(delegate=False, + nss_dir=tmp_db.secdir) connected = True root_logger.debug("Try RPC connection") api.Backend.rpcclient.forward('ping') 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() |
