Use the subcomand parsed args instead of the base
Pass the subcomand's arguments instead of the base ones to the endpoint creation call when quering the `/versions` endpoint. Passing the wrong arguments will end in the auth_requirement not being identified and an error 'Expected Endpoint' will be raised as no endpoint will be gotten from keystone. This patch also removes an unnecessary mock in the test code related to this fix. Depends-On Iefeb9bc123f8c65fecd0cba585ecd3eb349b23a6 Change-Id: I46088130b9175798e3719e43f48dc474fbc8a251 Closes-bug: #1504058
This commit is contained in:
@@ -654,7 +654,7 @@ class OpenStackImagesShell(object):
|
||||
|
||||
if not options.os_image_api_version and api_version == 2:
|
||||
switch_version = True
|
||||
client = self._get_versioned_client('2', options)
|
||||
client = self._get_versioned_client('2', args)
|
||||
|
||||
resp, body = client.http_client.get('/versions')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user