Fix a bug in check_vim_capacity 57/41657/1
authorEthan Lynn <ethanlynnl@vmware.com>
Mon, 9 Apr 2018 06:26:55 +0000 (14:26 +0800)
committerEthan Lynn <ethanlynnl@vmware.com>
Mon, 9 Apr 2018 06:28:35 +0000 (14:28 +0800)
Use json to convert dict to json

Change-Id: Ibb0dc6cfd34c6760d15b1fbbdb76855215f77cdc
Issue-ID: MULTICLOUD-166
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
multivimbroker/multivimbroker/forwarder/views.py

index 4f6e6ef..89e222a 100644 (file)
@@ -113,7 +113,7 @@ class CheckCapacity(BaseServer):
         for vim in body.get("VIMs", []):
             url = request.get_full_path().replace(
                 "check_vim_capacity", "%s/capacity_check" % vim)
-            resp = self.send(vim, url, str(newbody), "POST")
+            resp = self.send(vim, url, json.dumps(newbody), "POST")
             if int(resp.status_code) != status.HTTP_200_OK:
                 continue
             try: