diff options
Diffstat (limited to 'share/newton_base/openoapi/network.py')
-rw-r--r-- | share/newton_base/openoapi/network.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/share/newton_base/openoapi/network.py b/share/newton_base/openoapi/network.py index 2206143a..0f4a2df1 100644 --- a/share/newton_base/openoapi/network.py +++ b/share/newton_base/openoapi/network.py @@ -45,7 +45,11 @@ class Networks(APIView): logger.debug("With data = %s" % request.data) pass try: - query = VimDriverUtils.get_query_part(request) + querystr = VimDriverUtils.get_query_part(request) + query = "project_id=%s" % (tenantid) + if querystr: + query += "&" + querystr + content, status_code = self._get_networks(query, vimid, tenantid, networkid) logger.info("response with status = %s" % status_code) return Response(data=content, status=status_code) @@ -115,7 +119,7 @@ class Networks(APIView): pass try: #check if created already: check name - query = "name=%s" % request.data["name"] + query = "project_id=%s&name=%s" % (tenantid, request.data["name"]) content, status_code = self._get_networks(query, vimid, tenantid) existed = False if status_code == 200: |