File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,24 +175,17 @@ def initialize_app(self, argv):
175175 def prepare_to_run_command (self , cmd ):
176176 """Set up auth and API versions"""
177177
178- # TODO(dtroyer): Move this to osc-lib
179- # NOTE(dtroyer): If auth is not required for a command, force fake
180- # token auth so KSA plugins are happy
181-
182- kwargs = {}
183- if not cmd .auth_required :
184- # Build fake token creds to keep ksa and o-c-c hushed
185- kwargs ['auth_type' ] = 'token_endpoint'
186- kwargs ['auth' ] = {}
187- kwargs ['auth' ]['token' ] = 'x'
188- kwargs ['auth' ]['url' ] = 'x'
178+ # TODO(dtroyer): Move this to osc-lib, remove entire method when 1.4.0
179+ # release is minimum version is in global-requirements
180+ # NOTE(dtroyer): If auth is not required for a command, skip
181+ # get_one_Cloud()'s validation to avoid loading plugins
182+ validate = cmd .auth_required
189183
190184 # Validate auth options
191185 self .cloud = self .cloud_config .get_one_cloud (
192186 cloud = self .options .cloud ,
193187 argparse = self .options ,
194- validate = True ,
195- ** kwargs
188+ validate = validate ,
196189 )
197190 # Push the updated args into ClientManager
198191 self .client_manager ._cli_options = self .cloud
You can’t perform that action at this time.
0 commit comments