List trusts, incorrect self link.
Fix the base_url method in trust controller to build off of the one in V3 controller. Closes-Bug: #1279398 Change-Id: If9b3114c9b2b9978237988fa3b52e0bede783057
This commit is contained in:
parent
6ed19c228f
commit
674bd23c21
|
@ -55,18 +55,12 @@ class TrustV3(controller.V3Controller):
|
|||
|
||||
@classmethod
|
||||
def base_url(cls, path=None):
|
||||
endpoint = CONF.public_endpoint % CONF
|
||||
"""Construct a path and pass it to V3Controller.base_url method."""
|
||||
|
||||
# allow a missing trailing slash in the config
|
||||
if endpoint[-1] != '/':
|
||||
endpoint += '/'
|
||||
|
||||
url = endpoint + 'v3/OS-TRUST'
|
||||
|
||||
if path:
|
||||
return url + path
|
||||
else:
|
||||
return url + '/' + cls.collection_name
|
||||
# NOTE(stevemar): Overriding path to /OS-TRUST/trusts so that
|
||||
# V3Controller.base_url handles setting the self link correctly.
|
||||
path = '/OS-TRUST/' + cls.collection_name
|
||||
return controller.V3Controller.base_url(path=path)
|
||||
|
||||
def _get_user_id(self, context):
|
||||
if 'token_id' in context:
|
||||
|
|
Loading…
Reference in New Issue