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:
Brant Knudson
2016-01-13 15:18:19 -06:00
parent 7327067f98
commit 5e1cfbb7de
4 changed files with 3 additions and 19 deletions

View File

@@ -232,7 +232,7 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
self.stub_auth(json=self.TEST_RESPONSE_DICT)
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.
with self.deprecations.expect_deprecations_here():
@@ -336,7 +336,7 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
self.stub_auth(json=self.TEST_RESPONSE_DICT)
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.
with self.deprecations.expect_deprecations_here():

View File

@@ -257,13 +257,3 @@ class KeystoneClientTest(utils.TestCase):
self.assertEqual('identity', cl._adapter.service_type)
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)

View File

@@ -48,7 +48,6 @@ class UnauthenticatedTestCase(utils.TestCase):
class TestCase(UnauthenticatedTestCase):
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 = [{
"endpoints": [{
@@ -98,7 +97,7 @@ class TestCase(UnauthenticatedTestCase):
"name": "glance"
}, {
"endpoints": [{
"url": TEST_PUBLIC_IDENTITY_ENDPOINT,
"url": "http://127.0.0.1:5000/v3",
"region": "RegionOne",
"interface": "public"
}, {

View File

@@ -187,11 +187,6 @@ EndpointPolicyManager`
def __init__(self, **kwargs):
"""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)
if not kwargs.get('session'):