Modify hard code for packages 37/29237/1
authorfengyuanxing <feng.yuanxing@zte.com.cn>
Fri, 26 Jan 2018 02:39:51 +0000 (10:39 +0800)
committerfengyuanxing <feng.yuanxing@zte.com.cn>
Fri, 26 Jan 2018 02:39:51 +0000 (10:39 +0800)
Change-Id: I86dfe1c64337aecf8c76fe17d544238e8729a110
Issue-ID: VFC-685
Signed-off-by: fengyuanxing <feng.yuanxing@zte.com.cn>
catalog/packages/views.py

index 2ba2619..a0d0d13 100644 (file)
@@ -37,12 +37,12 @@ logger = logging.getLogger(__name__)
     operation_description="On distribute NS package",
     request_body=NsPackageDistributeRequestSerializer(),
     responses={
-        202: openapi.Response(
+        status.HTTP_202_ACCEPTED: openapi.Response(
             'return code',
             openapi.Schema(
                 type=openapi.TYPE_STRING,
                 pattern='CSAR(\w+) distributed successfully.')),
-        500: openapi.Response(
+        status.HTTP_500_INTERNAL_SERVER_ERROR: openapi.Response(
             'error message',
             openapi.Schema(
                 type=openapi.TYPE_STRING,
@@ -52,8 +52,8 @@ logger = logging.getLogger(__name__)
     operation_description="Query NS packages",
     request_body=no_body,
     responses={
-        200: NsPackagesSerializer,
-        500: openapi.Response(
+        status.HTTP_200_OK: NsPackagesSerializer,
+        status.HTTP_500_INTERNAL_SERVER_ERROR: openapi.Response(
             'error message',
             openapi.Schema(
                 type=openapi.TYPE_STRING,