Revert "Change default endpoint for Keystone v3 to public"
This reverts commit d3b11d674d
.
This is causing auth_token middleware tests to fail. The error is
like:
EndpointNotFound: public endpoint for identity service in east
region not found
So this is going to potentially affect customers.
Change-Id: I5ad917e48c9b140709dd3bf95e89c07ea58d6a66
This commit is contained in:
@@ -232,7 +232,7 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
|
|||||||
|
|
||||||
self.stub_auth(json=self.TEST_RESPONSE_DICT)
|
self.stub_auth(json=self.TEST_RESPONSE_DICT)
|
||||||
self.stub_url('GET', [fake_url], json=fake_resp,
|
self.stub_url('GET', [fake_url], json=fake_resp,
|
||||||
base_url=self.TEST_PUBLIC_IDENTITY_ENDPOINT)
|
base_url=self.TEST_ADMIN_IDENTITY_ENDPOINT)
|
||||||
|
|
||||||
# Creating a HTTPClient not using session is deprecated.
|
# Creating a HTTPClient not using session is deprecated.
|
||||||
with self.deprecations.expect_deprecations_here():
|
with self.deprecations.expect_deprecations_here():
|
||||||
@@ -336,7 +336,7 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
|
|||||||
|
|
||||||
self.stub_auth(json=self.TEST_RESPONSE_DICT)
|
self.stub_auth(json=self.TEST_RESPONSE_DICT)
|
||||||
self.stub_url('GET', [fake_url], json=fake_resp,
|
self.stub_url('GET', [fake_url], json=fake_resp,
|
||||||
base_url=self.TEST_PUBLIC_IDENTITY_ENDPOINT)
|
base_url=self.TEST_ADMIN_IDENTITY_ENDPOINT)
|
||||||
|
|
||||||
# Creating a HTTPClient not using session is deprecated.
|
# Creating a HTTPClient not using session is deprecated.
|
||||||
with self.deprecations.expect_deprecations_here():
|
with self.deprecations.expect_deprecations_here():
|
||||||
|
@@ -257,13 +257,3 @@ class KeystoneClientTest(utils.TestCase):
|
|||||||
|
|
||||||
self.assertEqual('identity', cl._adapter.service_type)
|
self.assertEqual('identity', cl._adapter.service_type)
|
||||||
self.assertEqual((3, 0), cl._adapter.version)
|
self.assertEqual((3, 0), cl._adapter.version)
|
||||||
|
|
||||||
def test_client_params_default_interface(self):
|
|
||||||
opts = {'auth': token_endpoint.Token('a', 'b'),
|
|
||||||
'service_name': uuid.uuid4().hex,
|
|
||||||
}
|
|
||||||
|
|
||||||
sess = session.Session()
|
|
||||||
cl = client.Client(session=sess, **opts)
|
|
||||||
|
|
||||||
self.assertEqual('public', cl._adapter.interface)
|
|
||||||
|
@@ -48,7 +48,6 @@ class UnauthenticatedTestCase(utils.TestCase):
|
|||||||
class TestCase(UnauthenticatedTestCase):
|
class TestCase(UnauthenticatedTestCase):
|
||||||
|
|
||||||
TEST_ADMIN_IDENTITY_ENDPOINT = "http://127.0.0.1:35357/v3"
|
TEST_ADMIN_IDENTITY_ENDPOINT = "http://127.0.0.1:35357/v3"
|
||||||
TEST_PUBLIC_IDENTITY_ENDPOINT = "http://127.0.0.1:5000/v3"
|
|
||||||
|
|
||||||
TEST_SERVICE_CATALOG = [{
|
TEST_SERVICE_CATALOG = [{
|
||||||
"endpoints": [{
|
"endpoints": [{
|
||||||
@@ -98,7 +97,7 @@ class TestCase(UnauthenticatedTestCase):
|
|||||||
"name": "glance"
|
"name": "glance"
|
||||||
}, {
|
}, {
|
||||||
"endpoints": [{
|
"endpoints": [{
|
||||||
"url": TEST_PUBLIC_IDENTITY_ENDPOINT,
|
"url": "http://127.0.0.1:5000/v3",
|
||||||
"region": "RegionOne",
|
"region": "RegionOne",
|
||||||
"interface": "public"
|
"interface": "public"
|
||||||
}, {
|
}, {
|
||||||
|
@@ -187,11 +187,6 @@ EndpointPolicyManager`
|
|||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
"""Initialize a new client for the Keystone v3 API."""
|
"""Initialize a new client for the Keystone v3 API."""
|
||||||
# NOTE(Roxana Gherle): Keystone V3 APIs has no admin versus public
|
|
||||||
# distinction. They are both going through the same endpoint, so
|
|
||||||
# set a public default here instead of picking up an admin default in
|
|
||||||
# httpclient.HTTPClient
|
|
||||||
kwargs.setdefault('interface', 'public')
|
|
||||||
super(Client, self).__init__(**kwargs)
|
super(Client, self).__init__(**kwargs)
|
||||||
|
|
||||||
if not kwargs.get('session'):
|
if not kwargs.get('session'):
|
||||||
|
Reference in New Issue
Block a user