From abe29f7f444df41b10b6cb75cd582c7f90a36b5e Mon Sep 17 00:00:00 2001 From: tianxing <15210838572@139.com> Date: Fri, 15 Mar 2019 16:24:44 +0800 Subject: [PATCH] fix the serializer bug of nslcm Change-Id: I89b2eeabebc0ecc7462c32e13799fddec43488bd Issue-ID: VFC-1270 Signed-off-by: tianxing <15210838572@139.com> --- lcm/ns/serializers/create_ns_serializers.py | 23 ++++++++++++----------- lcm/ns/serializers/pub_serializers.py | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lcm/ns/serializers/create_ns_serializers.py b/lcm/ns/serializers/create_ns_serializers.py index 8de7fe5b..ad5899f1 100644 --- a/lcm/ns/serializers/create_ns_serializers.py +++ b/lcm/ns/serializers/create_ns_serializers.py @@ -15,6 +15,7 @@ from rest_framework import serializers from lcm.ns.serializers.pub_serializers import Links, ipAddressesSerializer, CpProtocolDataSerializer +from resource_handle import ResourceHandleSerializer class ContextSerializer(serializers.Serializer): @@ -63,17 +64,17 @@ class PnfInfoSerializer(serializers.Serializer): required=True, many=True) -class ResourceHandleSerializer(serializers.Serializer): - vimId = serializers.CharField(help_text="Identifier of the VIM under whose control this resource is" - "placed.", required=False, allow_null=True) - resourceProviderId = serializers.CharField(help_text="Identifier of the entity responsible for the" - "management of the resource", required=False, - allow_null=True) - resourceId = serializers.CharField(help_text="Identifier of the resource in the scope of the VIM or the " - "resource provider.", required=True) - vimLevelResourceType = serializers.CharField(help_text="Type of the resource in the scope of the VIM or" - "the resource provider", - required=False, allow_null=True) +# class ResourceHandleSerializer(serializers.Serializer): +# vimId = serializers.CharField(help_text="Identifier of the VIM under whose control this resource is" +# "placed.", required=False, allow_null=True) +# resourceProviderId = serializers.CharField(help_text="Identifier of the entity responsible for the" +# "management of the resource", required=False, +# allow_null=True) +# resourceId = serializers.CharField(help_text="Identifier of the resource in the scope of the VIM or the " +# "resource provider.", required=True) +# vimLevelResourceType = serializers.CharField(help_text="Type of the resource in the scope of the VIM or" +# "the resource provider", +# required=False, allow_null=True) class NsVirtualLinkInfoSerializer(serializers.Serializer): diff --git a/lcm/ns/serializers/pub_serializers.py b/lcm/ns/serializers/pub_serializers.py index 7150cdd1..0e184deb 100644 --- a/lcm/ns/serializers/pub_serializers.py +++ b/lcm/ns/serializers/pub_serializers.py @@ -13,7 +13,7 @@ # limitations under the License. from rest_framework import serializers -from lcm.ns.serializers.common_Link import LinkSerializer +from link import LinkSerializer from lcm.ns_pnfs.serializers.pnf_serializer import PnfInstanceSerializer -- 2.16.6