diff options
Diffstat (limited to 'share/newton_base')
-rw-r--r-- | share/newton_base/proxy/identityV3.py | 20 | ||||
-rw-r--r-- | share/newton_base/registration/registration.py | 4 |
2 files changed, 20 insertions, 4 deletions
diff --git a/share/newton_base/proxy/identityV3.py b/share/newton_base/proxy/identityV3.py index 5d502831..6539943b 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["version"]["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=""): @@ -161,8 +167,8 @@ class Tokens(APIView): v2_version_detail = { "version": { - "status": "stable", - "updated": "2014-04-17T00:00:00Z", + "status": "deprecated", + "updated": "2016-08-04T00:00:00Z", "media-types": [ { "base": "application/json", @@ -171,7 +177,10 @@ v2_version_detail = { ], "id": "v2.0", "links": [ - ] + ], + "type": "text/html", + "rel": "describedby" + } } @@ -189,6 +198,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["version"]["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=""): diff --git a/share/newton_base/registration/registration.py b/share/newton_base/registration/registration.py index 53893b36..5656c6b6 100644 --- a/share/newton_base/registration/registration.py +++ b/share/newton_base/registration/registration.py @@ -463,7 +463,7 @@ class RegistryHelper(MultiCloudAAIHelper): self._update_resoure( cloud_owner, cloud_region_id, tenant['id'], tenant_info, "tenant") - return (0, "succeed") + return 0, "succeed" except VimDriverNewtonException as e: self._logger.error( "VimDriverNewtonException: status:%s, response:%s" @@ -489,6 +489,8 @@ class RegistryHelper(MultiCloudAAIHelper): cloud_owner, cloud_region_id, tenant['id'], tenant_info, "tenant") + return 0, "succeed" + except Exception as ex: self._logger.error(traceback.format_exc()) return ( |