summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2019-05-07 02:37:15 +0000
committerBin Yang <bin.yang@windriver.com>2019-05-07 02:37:15 +0000
commitfaaca046de09ac2ca87824cde8e1100877e798dc (patch)
tree8ab03035220359656fc21dd1392923e0a12fbbda /share
parentcf13965c16921b375c1491bfd16eadbc71ae0a5b (diff)
Feed links to identity version query
Change-Id: I90ae5c73b01e3960491759868399847be7ee0135 Issue-ID: MULTICLOUD-605 Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'share')
-rw-r--r--share/newton_base/proxy/identityV3.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/share/newton_base/proxy/identityV3.py b/share/newton_base/proxy/identityV3.py
index 5d502831..b31efc0c 100644
--- a/share/newton_base/proxy/identityV3.py
+++ b/share/newton_base/proxy/identityV3.py
@@ -62,6 +62,12 @@ class Tokens(APIView):
self._logger.debug("data> %s" % request.data)
self._logger.info("RESP with status> %s" % status.HTTP_200_OK)
+
+ # compose the links
+ v3_version_detail["links"] = [{
+ "href": request.META.get("REQUEST_URI", ""),
+ "rel": "self"
+ }]
return Response(data=v3_version_detail, status=status.HTTP_200_OK)
def post(self, request, vimid=""):
@@ -189,6 +195,11 @@ class TokensV2(Tokens):
self._logger.debug("TokensV2--get::META> %s" % request.META)
self._logger.info("RESP with status> %s" % status.HTTP_200_OK)
+ # compose the links
+ v2_version_detail["links"] = [{
+ "href": request.META.get("REQUEST_URI", ""),
+ "rel": "self"
+ }]
return Response(data=v2_version_detail, status=status.HTTP_200_OK)
def post(self, request, vimid=""):