Add server action for windriver APIv0 77/73677/2
authorHaibin Huang <haibin.huang@intel.com>
Thu, 22 Nov 2018 08:11:52 +0000 (08:11 +0000)
committerBin Yang <bin.yang@windriver.com>
Tue, 27 Nov 2018 13:01:27 +0000 (13:01 +0000)
Change-Id: Ib6dca8c162644ba99ea04f5dd9c87ffde34bda8e
Issue-ID: MULTICLOUD-414
Signed-off-by: Haibin Huang <haibin.huang@intel.com>
(cherry picked from commit b32eb9864c7fd9757dd0192af05af6e48699b42b)

share/newton_base/openoapi/server.py
windriver/titanium_cloud/requests/urls.py

index be79c46..c4ef3f1 100644 (file)
@@ -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:
index ff1a7fb..73cc154 100644 (file)
@@ -34,10 +34,10 @@ urlpatterns = [
         image.Images.as_view()),
     url(r'^volumes(/(?P<volumeid>[0-9a-zA-Z_-]+))?',
         volume.Volumes.as_view()),
-    url(r'^servers(/(?P<serverid>[0-9a-zA-Z_-]+))?',
-        server.Servers.as_view()),
     url(r'^servers(/(?P<serverid>[0-9a-zA-Z_-]+))/action/?$',
         server.ServerAction.as_view()),
+    url(r'^servers(/(?P<serverid>[0-9a-zA-Z_-]+))?',
+        server.Servers.as_view()),
     url(r'^ports(/(?P<portid>[0-9a-zA-Z_-]+))?',
         vport.Vports.as_view()),
     url(r'^flavors(/(?P<flavorid>[0-9a-zA-Z_-]+))?',