diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2016-05-13 16:53:44 -0500 |
|---|---|---|
| committer | Steve Martinelli <s.martinelli@gmail.com> | 2016-07-22 20:49:18 +0000 |
| commit | f38c51c1b90576e6b13ac6086386884c09f5813a (patch) | |
| tree | 754631042127867cb092c95cf9e189d99df3e168 /openstackclient/shell.py | |
| parent | 719c5d79ced34687944eb0bf458f36070817a7b9 (diff) | |
| download | python-openstackclient-f38c51c1b90576e6b13ac6086386884c09f5813a.tar.gz | |
Rework clientmanager
* Add compatibility for plugin v2 interface removed from osc-lib
* ClientManager.is_network_endpoint_enabled() is wrapper for
new is_service_available()
Change-Id: I6f26ce9e4d0702f50c7949bacfbeeb0f98cddb5d
Diffstat (limited to 'openstackclient/shell.py')
| -rw-r--r-- | openstackclient/shell.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/openstackclient/shell.py b/openstackclient/shell.py index ed729e53..b4f2df43 100644 --- a/openstackclient/shell.py +++ b/openstackclient/shell.py @@ -26,6 +26,7 @@ from cliff import app from cliff import command from cliff import complete from cliff import help +from osc_lib.cli import client_config as cloud_config from osc_lib.command import timing from osc_lib import exceptions as exc from osc_lib import logs @@ -38,8 +39,6 @@ from openstackclient.common import clientmanager from openstackclient.common import commandmanager from openstackclient.i18n import _ -from os_client_config import config as cloud_config - osprofiler_profiler = importutils.try_import("osprofiler.profiler") @@ -309,6 +308,9 @@ class OpenStackShell(app.App): tenant_id = getattr(self.options, 'tenant_id', None) tenant_name = getattr(self.options, 'tenant_name', None) + # Save default domain + self.default_domain = self.options.default_domain + # handle some v2/v3 authentication inconsistencies by just acting like # both the project and tenant information are both present. This can # go away if we stop registering all the argparse options together. @@ -325,7 +327,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.OpenStackConfig( + cc = cloud_config.OSC_Config( override_defaults={ 'interface': None, 'auth_type': auth_type, @@ -368,9 +370,6 @@ class OpenStackShell(app.App): if self.verify and self.cloud.cacert: self.verify = self.cloud.cacert - # Save default domain - self.default_domain = self.options.default_domain - # Loop through extensions to get API versions for mod in clientmanager.PLUGIN_MODULES: default_version = getattr(mod, 'DEFAULT_API_VERSION', None) @@ -429,7 +428,6 @@ class OpenStackShell(app.App): self.client_manager = clientmanager.ClientManager( cli_options=self.cloud, - verify=self.verify, api_version=self.api_version, pw_func=prompt_for_password, ) |
