Skip to content

Commit 40f7481

Browse files
author
Eric Fried
committed
Remove redundant OpenStackShell.prepare_to_run_command
osc-lib's OpenStackShell.prepare_to_run_command has been a superset of python-openstackclient's since at least osc-lib 1.4.0. We require 1.14.0 now, so the redundant override can be removed. Change-Id: I5658e3df5af1100e139623505d0375588edae63c
1 parent f1d742f commit 40f7481

1 file changed

Lines changed: 0 additions & 26 deletions

File tree

openstackclient/shell.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -139,32 +139,6 @@ def initialize_app(self, argv):
139139
pw_func=shell.prompt_for_password,
140140
)
141141

142-
def prepare_to_run_command(self, cmd):
143-
"""Set up auth and API versions"""
144-
145-
# TODO(dtroyer): Move this to osc-lib, remove entire method when 1.4.0
146-
# release is minimum version is in global-requirements
147-
# NOTE(dtroyer): If auth is not required for a command, skip
148-
# get_one_Cloud()'s validation to avoid loading plugins
149-
validate = cmd.auth_required
150-
151-
# Force skipping auth for commands that do not need it
152-
# NOTE(dtroyer): This is here because ClientManager does not have
153-
# visibility into the Command object to get
154-
# auth_required. It needs to move into osc-lib
155-
self.client_manager._auth_required = cmd.auth_required
156-
157-
# Validate auth options
158-
self.cloud = self.cloud_config.get_one_cloud(
159-
cloud=self.options.cloud,
160-
argparse=self.options,
161-
validate=validate,
162-
)
163-
# Push the updated args into ClientManager
164-
self.client_manager._cli_options = self.cloud
165-
166-
return super(OpenStackShell, self).prepare_to_run_command(cmd)
167-
168142

169143
def main(argv=None):
170144
if argv is None:

0 commit comments

Comments
 (0)