From 640c3ce8693968970dc506adeb56d0fe60718fea Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sun, 26 Feb 2017 10:40:40 -0600 Subject: [PATCH] Pass ssl values through to OCC In preparation for being able to consume Sessions directly via set_session_constructor in occ, we need to make sure ssl values are in the occ config dict. Change-Id: Iab6cc6e1bf2a683d4ee2ac110c98c93dbc696cfa --- osc_lib/clientmanager.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/osc_lib/clientmanager.py b/osc_lib/clientmanager.py index 04bee04..75bd0a7 100644 --- a/osc_lib/clientmanager.py +++ b/osc_lib/clientmanager.py @@ -127,6 +127,22 @@ class ClientManager(object): if self.cert and self._cli_options.key: self.cert = self.cert, self._cli_options.key + # TODO(mordred) The logic above to set all of these is duplicated in + # os-client-config but needs more effort to tease apart and ensure that + # values are being passed in. For now, let osc_lib do it and just set + # the values in occ.config + self._cli_options.config['verify'] = self.verify + self._cli_options.config['cacert'] = self.cacert + # Attack of the killer passthrough values + self._cli_options.config['cert'] = self._cli_options.cert + self._cli_options.config['key'] = self._cli_options.key + + # TODO(mordred) We also don't have any support for setting or passing + # in api_timeout, which is set in occ defaults but we skip occ defaults + # so set it here by hand and later we should potentially expose this + # directly to osc + self._cli_options.config['api_timeout'] = None + # Get logging from root logger root_logger = logging.getLogger('') LOG.setLevel(root_logger.getEffectiveLevel())