diff options
Diffstat (limited to 'vio')
-rw-r--r-- | vio/vio/swagger/views/image/views.py | 4 | ||||
-rw-r--r-- | vio/vio/swagger/views/multivim.image.swagger.json | 2 | ||||
-rw-r--r-- | vio/vio/swagger/views/network/views.py | 3 | ||||
-rw-r--r-- | vio/vio/swagger/views/port/views.py | 4 | ||||
-rw-r--r-- | vio/vio/swagger/views/subnet/views.py | 3 |
5 files changed, 10 insertions, 6 deletions
diff --git a/vio/vio/swagger/views/image/views.py b/vio/vio/swagger/views/image/views.py index fd8592d..43ed3c5 100644 --- a/vio/vio/swagger/views/image/views.py +++ b/vio/vio/swagger/views/image/views.py @@ -125,10 +125,10 @@ class CreateListImagesView(APIView): rsp = image_utils.image_formatter(image) rsp.update(vim_rsp) rsp['returnCode'] = '1' - return Response(data=rsp, status=status.HTTP_202_ACCEPTED) + return Response(data=rsp, status=status.HTTP_201_ACCEPTED) except Exception as e: if hasattr(e, "http_status"): return Response(data={'error': str(e)}, status=e.http_status) else: return Response(data={'error': str(e)}, - status=status.HTTP_500_INTERNAL_SERVER_ERROR)
\ No newline at end of file + status=status.HTTP_500_INTERNAL_SERVER_ERROR) diff --git a/vio/vio/swagger/views/multivim.image.swagger.json b/vio/vio/swagger/views/multivim.image.swagger.json index 4604445..05c99ed 100644 --- a/vio/vio/swagger/views/multivim.image.swagger.json +++ b/vio/vio/swagger/views/multivim.image.swagger.json @@ -51,7 +51,7 @@ } ], "responses": { - "200": { + "201": { "description": "successful operation", "schema": { "$ref": "#/definitions/VimImageInfo" diff --git a/vio/vio/swagger/views/network/views.py b/vio/vio/swagger/views/network/views.py index b420e5c..0e6de17 100644 --- a/vio/vio/swagger/views/network/views.py +++ b/vio/vio/swagger/views/network/views.py @@ -49,7 +49,8 @@ class CreateNetworkView(APIView): else: resp = net.create_network(vimid, tenantid, body) resp['returnCode'] = 1 - return Response(data=resp, status=status.HTTP_202_ACCEPTED) + return Response(data=resp, status=status.HTTP_201_CREATED) + return Response(data=resp, status=status.HTTP_200_OK) except Exception as e: if hasattr(e, "http_status"): return Response(data={'error': str(e)}, status=e.http_status) diff --git a/vio/vio/swagger/views/port/views.py b/vio/vio/swagger/views/port/views.py index 3019003..6fdd0fd 100644 --- a/vio/vio/swagger/views/port/views.py +++ b/vio/vio/swagger/views/port/views.py @@ -49,7 +49,9 @@ class CreatePortView(APIView): else: resp = port.create_port(vimid, tenantid, body) resp['returnCode'] = 1 - return Response(data=resp, status=status.HTTP_202_ACCEPTED) + return Response(data=resp, status=status.HTTP_201_CREATED) + return Response(data=resp, status=status.HTTP_200_OK) + except Exception as e: if hasattr(e, "http_status"): return Response(data={'error': str(e)}, status=e.http_status) diff --git a/vio/vio/swagger/views/subnet/views.py b/vio/vio/swagger/views/subnet/views.py index 06d7548..8b0fc28 100644 --- a/vio/vio/swagger/views/subnet/views.py +++ b/vio/vio/swagger/views/subnet/views.py @@ -49,7 +49,8 @@ class CreateSubnetView(APIView): else: resp = subnet.create_subnet(vimid, tenantid, body) resp['returnCode'] = 1 - return Response(data=resp, status=status.HTTP_202_ACCEPTED) + return Response(data=resp, status=status.HTTP_201_CREATED) + return Response(data=resp, status=status.HTTP_200_OK) except Exception as e: if hasattr(e, "http_status"): return Response(data={'error': str(e)}, status=e.http_status) |