diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2018-11-16 11:45:17 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2018-11-16 11:45:17 +0800 |
commit | 2b329ceee9157530fa9d300c4cae06dadf9fb649 (patch) | |
tree | bfeef62133391d0c41b0b415aa9450c7eedd47fa /gvnfmadapter | |
parent | 44992c1b357b531c524e6c74e6d6ab3e96bb3f5d (diff) |
Fix grant and problem swagger
Change-Id: Ie6b0f19042069ec8510a72e69cbcd0c82d5d8ad4
Issue-ID: VFC-1163
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'gvnfmadapter')
-rw-r--r-- | gvnfmadapter/driver/interfaces/serializers/grant.py | 4 | ||||
-rw-r--r-- | gvnfmadapter/driver/interfaces/serializers/response.py | 2 | ||||
-rw-r--r-- | gvnfmadapter/driver/interfaces/views.py | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/gvnfmadapter/driver/interfaces/serializers/grant.py b/gvnfmadapter/driver/interfaces/serializers/grant.py index f36d5ed..169fcb3 100644 --- a/gvnfmadapter/driver/interfaces/serializers/grant.py +++ b/gvnfmadapter/driver/interfaces/serializers/grant.py @@ -17,7 +17,7 @@ from driver.interfaces.serializers.link import LinkSerializer from rest_framework import serializers -class VimConnectionInfoSerializer(serializers.Serializer): +class VimConnectionSerializer(serializers.Serializer): id = serializers.CharField( help_text="The identifier of the VIM Connection. This identifier is managed by the NFVO.", required=True @@ -335,7 +335,7 @@ class GrantSerializer(serializers.Serializer): help_text="Identifier of the related VNF lifecycle management operation occurrence.", required=True, ) - vimConnections = VimConnectionInfoSerializer( + vimConnections = VimConnectionSerializer( help_text="Provides information regarding VIM connections that are approved to be used by the VNFM to allocate resources.", many=True, required=False diff --git a/gvnfmadapter/driver/interfaces/serializers/response.py b/gvnfmadapter/driver/interfaces/serializers/response.py index adcbaa0..a14c311 100644 --- a/gvnfmadapter/driver/interfaces/serializers/response.py +++ b/gvnfmadapter/driver/interfaces/serializers/response.py @@ -15,7 +15,7 @@ from rest_framework import serializers -class ProblemDetailsSerializer(serializers.Serializer): +class ProblemDetailSerializer(serializers.Serializer): type = serializers.CharField(help_text="Type", required=False, allow_null=True) title = serializers.CharField(help_text="Title", required=False, allow_null=True) status = serializers.IntegerField(help_text="Status", required=True) diff --git a/gvnfmadapter/driver/interfaces/views.py b/gvnfmadapter/driver/interfaces/views.py index 689446a..c9b79d1 100644 --- a/gvnfmadapter/driver/interfaces/views.py +++ b/gvnfmadapter/driver/interfaces/views.py @@ -36,7 +36,7 @@ from driver.pub.utils import restcall from driver.pub.utils.restcall import req_by_msb from driver.interfaces.serializers.operate_request import VnfOperateRequestSerializer from driver.interfaces.serializers.heal_request import HealVnfRequestSerializerToVnfm, VnfHealRequestSerializer -from driver.interfaces.serializers.response import ProblemDetailsSerializer +from driver.interfaces.serializers.response import ProblemDetailSerializer logger = logging.getLogger(__name__) @@ -309,8 +309,8 @@ class VnfOperateView(APIView): request_body=VnfOperateRequestSerializer(), responses={ status.HTTP_202_ACCEPTED: "Success", - status.HTTP_404_NOT_FOUND: ProblemDetailsSerializer(), - status.HTTP_409_CONFLICT: ProblemDetailsSerializer(), + status.HTTP_404_NOT_FOUND: ProblemDetailSerializer(), + status.HTTP_409_CONFLICT: ProblemDetailSerializer(), status.HTTP_500_INTERNAL_SERVER_ERROR: "Internal error" } ) @@ -349,8 +349,8 @@ class VnfHealView(APIView): request_body=VnfHealRequestSerializer(), responses={ status.HTTP_202_ACCEPTED: "Success", - status.HTTP_404_NOT_FOUND: ProblemDetailsSerializer(), - status.HTTP_409_CONFLICT: ProblemDetailsSerializer(), + status.HTTP_404_NOT_FOUND: ProblemDetailSerializer(), + status.HTTP_409_CONFLICT: ProblemDetailSerializer(), status.HTTP_500_INTERNAL_SERVER_ERROR: "Internal error" } ) |