From b32eb9864c7fd9757dd0192af05af6e48699b42b Mon Sep 17 00:00:00 2001 From: Haibin Huang Date: Thu, 22 Nov 2018 08:11:52 +0000 Subject: Add server action for windriver APIv0 Change-Id: Ib6dca8c162644ba99ea04f5dd9c87ffde34bda8e Issue-ID: MULTICLOUD-414 Signed-off-by: Haibin Huang --- share/newton_base/openoapi/server.py | 2 +- windriver/titanium_cloud/requests/urls.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/newton_base/openoapi/server.py b/share/newton_base/openoapi/server.py index be79c466..c4ef3f12 100644 --- a/share/newton_base/openoapi/server.py +++ b/share/newton_base/openoapi/server.py @@ -555,7 +555,7 @@ class ServerAction(APIView): endpoint_filter=self.service, headers={"Content-Type": "application/json", "Accept": "application/json"}) - resp_body = resp.json() + resp_body = {} return Response(data=resp_body, status=resp.status_code) except VimDriverKiloException as e: diff --git a/windriver/titanium_cloud/requests/urls.py b/windriver/titanium_cloud/requests/urls.py index ff1a7fb2..73cc1543 100644 --- a/windriver/titanium_cloud/requests/urls.py +++ b/windriver/titanium_cloud/requests/urls.py @@ -34,10 +34,10 @@ urlpatterns = [ image.Images.as_view()), url(r'^volumes(/(?P[0-9a-zA-Z_-]+))?', volume.Volumes.as_view()), - url(r'^servers(/(?P[0-9a-zA-Z_-]+))?', - server.Servers.as_view()), url(r'^servers(/(?P[0-9a-zA-Z_-]+))/action/?$', server.ServerAction.as_view()), + url(r'^servers(/(?P[0-9a-zA-Z_-]+))?', + server.Servers.as_view()), url(r'^ports(/(?P[0-9a-zA-Z_-]+))?', vport.Vports.as_view()), url(r'^flavors(/(?P[0-9a-zA-Z_-]+))?', -- cgit 1.2.3-korg