Fix openstack plugin identity error 15/18715/1
authorBin Yang <bin.yang@windriver.com>
Fri, 13 Oct 2017 06:42:56 +0000 (14:42 +0800)
committerBin Yang <bin.yang@windriver.com>
Fri, 13 Oct 2017 06:42:56 +0000 (14:42 +0800)
Change-Id: I358d32cdbb12698aa4e6fa3517c2465888bf68de
Issue-Id: MULTICLOUD-115
Signed-off-by: Bin Yang <bin.yang@windriver.com>
newton/newton/proxy/views/identityV3.py

index 3fa124c..048d5a0 100644 (file)
@@ -59,11 +59,11 @@ class Tokens(APIView):
             #keystone v3 API
             if not tenant_name and request.data.get("auth") \
                     and request.data["auth"].get("scope")\
-                    and request["auth"]["scope"].get("project"):
-                if request["auth"]["scope"]["project"].get("name"):
-                    tenant_name = request["auth"]["scope"]["project"].get("name")
+                    and request.data["auth"]["scope"].get("project"):
+                if request.data["auth"]["scope"]["project"].get("name"):
+                    tenant_name = request.data["auth"]["scope"]["project"].get("name")
                 else:
-                    tenant_id = request["auth"]["scope"]["project"].get("id")
+                    tenant_id = request.data["auth"]["scope"]["project"].get("id")