|
25 | 25 | import six |
26 | 26 |
|
27 | 27 | import openstackclient |
28 | | -from openstackclient.common import client_config as cloud_config |
29 | 28 | from openstackclient.common import clientmanager |
30 | 29 |
|
31 | 30 |
|
@@ -133,37 +132,7 @@ def _load_commands(self): |
133 | 132 | def initialize_app(self, argv): |
134 | 133 | super(OpenStackShell, self).initialize_app(argv) |
135 | 134 |
|
136 | | - # Argument precedence is really broken in multiple places |
137 | | - # so we're just going to fix it here until o-c-c and osc-lib |
138 | | - # get sorted out. |
139 | | - # TODO(dtroyer): remove when os-client-config and osc-lib are fixed |
140 | | - |
141 | | - # First, throw away what has already been done with o-c-c and |
142 | | - # use our own. |
143 | | - try: |
144 | | - self.cloud_config = cloud_config.OSC_Config( |
145 | | - override_defaults={ |
146 | | - 'interface': None, |
147 | | - 'auth_type': self._auth_type, |
148 | | - }, |
149 | | - ) |
150 | | - except (IOError, OSError): |
151 | | - self.log.critical("Could not read clouds.yaml configuration file") |
152 | | - self.print_help_if_requested() |
153 | | - raise |
154 | | - |
155 | | - if not self.options.debug: |
156 | | - self.options.debug = None |
157 | | - |
158 | | - # NOTE(dtroyer): Need to do this with validate=False to defer the |
159 | | - # auth plugin handling to ClientManager.setup_auth() |
160 | | - self.cloud = self.cloud_config.get_one_cloud( |
161 | | - cloud=self.options.cloud, |
162 | | - argparse=self.options, |
163 | | - validate=False, |
164 | | - ) |
165 | | - |
166 | | - # Then, re-create the client_manager with the correct arguments |
| 135 | + # Re-create the client_manager with our subclass |
167 | 136 | self.client_manager = clientmanager.ClientManager( |
168 | 137 | cli_options=self.cloud, |
169 | 138 | api_version=self.api_version, |
|
0 commit comments