Fix identity v3 ext discovery

Change-Id: I98e46bde0c07be761197ddebaa981af2480e2268
This commit is contained in:
Martin Kopec 2018-05-21 12:01:01 +00:00
parent 130db00711
commit 82a82b7b41
2 changed files with 2 additions and 3 deletions

View File

@ -59,7 +59,6 @@ class IdentityService(VersionedService):
As keystone V3 uses a JSON Home to store the extensions. As keystone V3 uses a JSON Home to store the extensions.
This method implements a different discovery method. This method implements a different discovery method.
:param keystone_v3_url: Keystone V3 auth url
:return: A list with the discovered extensions :return: A list with the discovered extensions
""" """
try: try:
@ -70,7 +69,7 @@ class IdentityService(VersionedService):
LOG.error("Request on service '%s' with url '%s' failed", LOG.error("Request on service '%s' with url '%s' failed",
'identity', self.service_url) 'identity', self.service_url)
raise re raise re
ext_h = 'http://docs.openstack.org/api/openstack-identity/3/ext/' ext_h = 'https://docs.openstack.org/api/openstack-identity/3/ext/'
res = [x for x in json.loads(r.content)['resources'].keys()] res = [x for x in json.loads(r.content)['resources'].keys()]
ext = [ex for ex in res if 'ext' in ex] ext = [ex for ex in res if 'ext' in ex]
ext = [str(e).replace(ext_h, '').split('/')[0] for e in ext] ext = [str(e).replace(ext_h, '').split('/')[0] for e in ext]

View File

@ -202,7 +202,7 @@ class BaseServiceTest(base.BaseTestCase):
) )
class FakeRequestResponse(object): class FakeRequestResponse(object):
URL = 'http://docs.openstack.org/api/openstack-identity/3/ext/' URL = 'https://docs.openstack.org/api/openstack-identity/3/ext/'
FAKE_V3_EXTENSIONS = ( FAKE_V3_EXTENSIONS = (
{ {
'resources': { 'resources': {