From 445574f34ba5773cb7e9ba77cca5773edc7cf6d5 Mon Sep 17 00:00:00 2001 From: "ying.yunlong" Date: Fri, 9 Feb 2018 15:13:39 +0800 Subject: Modify vfc-vnflcm schemas Change-Id: Iadcc3847c67c2890c4819ab67b3a7c8124d2a130 Issue-ID: VFC-682 Signed-off-by: ying.yunlong --- lcm/lcm/nf/vnfs/serializers.py | 21 ++++++++++----------- lcm/lcm/settings.py | 2 -- 2 files changed, 10 insertions(+), 13 deletions(-) (limited to 'lcm') diff --git a/lcm/lcm/nf/vnfs/serializers.py b/lcm/lcm/nf/vnfs/serializers.py index 50879a19..b7fe9e6f 100644 --- a/lcm/lcm/nf/vnfs/serializers.py +++ b/lcm/lcm/nf/vnfs/serializers.py @@ -337,13 +337,6 @@ class ExtVirtualLinkSerizlizer(serializers.Serializer): allow_null=True) -class ExtVirtualLinksSerializer(serializers.ListSerializer): - child = ExtVirtualLinkSerizlizer( - help_text="extVirtualLink", - required=False, - allow_null=True) - - class AdditionalParamsSerializer(serializers.Serializer): inputs = serializers.DictField( help_text="inputs", @@ -352,8 +345,11 @@ class AdditionalParamsSerializer(serializers.Serializer): allow_blank=True), required=False, allow_null=True) - extVirtualLinks = ExtVirtualLinksSerializer( - help_text="extVirtualLinks", required=False, allow_null=True) + extVirtualLinks = serializers.ListSerializer( + help_text="extVirtualLinks", + child=ExtVirtualLinkSerizlizer(help_text="extVirtualLinks", required=False, allow_null=True), + required=False, + allow_null=True) class InstantiateVnfRequestSerializer(serializers.Serializer): @@ -372,8 +368,11 @@ class InstantiateVnfRequestSerializer(serializers.Serializer): required=True, max_length=255, allow_null=True) - extVirtualLinks = ExtVirtualLinksSerializer( - help_text="extVirtualLinks", required=False, allow_null=True) + extVirtualLinks = serializers.ListSerializer( + help_text="extVirtualLinks", + child=ExtVirtualLinkSerizlizer(help_text="extVirtualLinks", required=False, allow_null=True), + required=False, + allow_null=True) additionalParams = AdditionalParamsSerializer( help_text="additionalParams", required=False, allow_null=True) diff --git a/lcm/lcm/settings.py b/lcm/lcm/settings.py index 9de0b9df..85e89819 100644 --- a/lcm/lcm/settings.py +++ b/lcm/lcm/settings.py @@ -71,8 +71,6 @@ REST_FRAMEWORK = { 'DEFAULT_PARSER_CLASSES': ( 'rest_framework.parsers.JSONParser', 'rest_framework.parsers.MultiPartParser', - # 'rest_framework.parsers.FormParser', - # 'rest_framework.parsers.FileUploadParser', ) } -- cgit 1.2.3-korg