From 473f4fc32d98c3c6c66b031353edd47da3ec5553 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Wed, 3 May 2017 16:48:35 -0500 Subject: [PATCH] Fix shell saving OpenStackConfig object When this was brough over from OSC we did not save the OpenStackConfig object created in shell.initialize_app(). Others have come to rely on it being in shell.cloud_config so save it. Change-Id: I1a82cd94febb1775bcd9fae05d5d5ed860c5baa7 --- osc_lib/shell.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osc_lib/shell.py b/osc_lib/shell.py index 6882770..e204d63 100644 --- a/osc_lib/shell.py +++ b/osc_lib/shell.py @@ -375,7 +375,7 @@ class OpenStackShell(app.App): # Ignore the default value of interface. Only if it is set later # will it be used. try: - cc = cloud_config.OSC_Config( + self.cloud_config = cloud_config.OSC_Config( override_defaults={ 'interface': None, 'auth_type': self._auth_type, @@ -393,7 +393,7 @@ class OpenStackShell(app.App): # NOTE(dtroyer): Need to do this with validate=False to defer the # auth plugin handling to ClientManager.setup_auth() - self.cloud = cc.get_one_cloud( + self.cloud = self.cloud_config.get_one_cloud( cloud=self.options.cloud, argparse=self.options, validate=False, @@ -401,7 +401,7 @@ class OpenStackShell(app.App): self.log_configurator.configure(self.cloud) self.dump_stack_trace = self.log_configurator.dump_trace - self.log.debug("defaults: %s", cc.defaults) + self.log.debug("defaults: %s", self.cloud_config.defaults) self.log.debug("cloud cfg: %s", strutils.mask_password(self.cloud.config))