Merge "s3token: Fix usage of removed Identity v2 API"

This commit is contained in:
Zuul 2024-09-06 16:11:18 +00:00 committed by Gerrit Code Review
commit 6f500026c8
2 changed files with 3 additions and 3 deletions

View File

@ -118,7 +118,7 @@ class S3Token(object):
def _json_request(self, creds_json):
headers = {'Content-Type': 'application/json'}
try:
response = requests.post('%s/v2.0/s3tokens' % self._request_uri,
response = requests.post('%s/v3/s3tokens' % self._request_uri,
headers=headers, data=creds_json,
verify=self._verify,
timeout=CONF.s3_token.timeout)

View File

@ -42,7 +42,7 @@ class FakeApp(object):
class S3TokenMiddlewareTestBase(utils.TestCase):
TEST_WWW_AUTHENTICATE_URI = 'https://fakehost/identity'
TEST_URL = '%s/v2.0/s3tokens' % (TEST_WWW_AUTHENTICATE_URI, )
TEST_URL = '%s/v3/s3tokens' % (TEST_WWW_AUTHENTICATE_URI, )
def setUp(self):
super(S3TokenMiddlewareTestBase, self).setUp()
@ -101,7 +101,7 @@ class S3TokenMiddlewareTestGood(S3TokenMiddlewareTestBase):
host = 'fakehost'
port = 35357
self.requests_mock.post(
'%s://%s:%s/v2.0/s3tokens' % (protocol, host, port),
'%s://%s:%s/v3/s3tokens' % (protocol, host, port),
status_code=201, json=GOOD_RESPONSE)
self.middleware = (