summaryrefslogtreecommitdiffstats
path: root/share/newton_base/openoapi
diff options
context:
space:
mode:
authorHaibin Huang <haibin.huang@intel.com>2018-11-22 08:40:06 +0000
committerHaibin Huang <haibin.huang@intel.com>2018-11-22 11:27:54 +0000
commite6815a7940c20c14ca670e5393b296d3b3dce888 (patch)
treedd74851f7befbe165ff910b00748fa891d9bed1f /share/newton_base/openoapi
parent3c2647db5715ac56c08ca252aad37ad3fcd9c9b7 (diff)
Add server action for windriver APIv1
Change-Id: Iebab7cdf4b9e9190a32e3ce05aaca6fbb4901b76 Issue-ID: MULTICLOUD-414 Signed-off-by: Haibin Huang <haibin.huang@intel.com>
Diffstat (limited to 'share/newton_base/openoapi')
-rw-r--r--share/newton_base/openoapi/server.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/share/newton_base/openoapi/server.py b/share/newton_base/openoapi/server.py
index c4ef3f12..0c2382ae 100644
--- a/share/newton_base/openoapi/server.py
+++ b/share/newton_base/openoapi/server.py
@@ -567,3 +567,10 @@ class ServerAction(APIView):
logger.error(traceback.format_exc())
return Response(data={'error': str(e)},
status=status.HTTP_500_INTERNAL_SERVER_ERROR)
+
+class APIv1ServerAction(ServerAction):
+ def post(self, request, cloud_owner="", cloud_region_id="", tenantid="", serverid=""):
+ self._logger.info("%s, %s" % (cloud_owner, cloud_region_id))
+
+ vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
+ return super(APIv1ServerAction, self).post(request, vimid, tenantid, serverid)