mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user