From faaca046de09ac2ca87824cde8e1100877e798dc Mon Sep 17 00:00:00 2001 From: Bin Yang Date: Tue, 7 May 2019 02:37:15 +0000 Subject: Feed links to identity version query Change-Id: I90ae5c73b01e3960491759868399847be7ee0135 Issue-ID: MULTICLOUD-605 Signed-off-by: Bin Yang --- share/newton_base/proxy/identityV3.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'share') 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=""): -- cgit 1.2.3-korg