From: yangyan Date: Tue, 26 Mar 2019 07:35:33 +0000 (+0800) Subject: fix serializer bug X-Git-Tag: 1.3.0~108 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=c52d182d9708a0c95d3af733c15b2c5f266f0583;p=vfc%2Fnfvo%2Flcm.git fix serializer bug Change-Id: I283598ef88cbf3c9ec7deeb8fd962eb46985968b Issue-ID: VFC-1317 Signed-off-by: yangyan --- diff --git a/lcm/ns/serializers/sol/ext_managed_virtual_link_info.py b/lcm/ns/serializers/sol/ext_managed_virtual_link_info.py index 72a98cee..3e6bbb77 100644 --- a/lcm/ns/serializers/sol/ext_managed_virtual_link_info.py +++ b/lcm/ns/serializers/sol/ext_managed_virtual_link_info.py @@ -29,12 +29,16 @@ class VnfLinkPortInfo(serializers.Serializer): allow_null=False) cpInstanceId = serializers.CharField( help_text="When the link port is used for external connectivity by the VNF, \ - this attribute represents the identifier of the external CP of the VNF to be connected to this link port.", + this attribute represents the identifier of the external CP of the VNF to be connected to this \ + link port.", max_length=255, required=False, allow_null=True, allow_blank=True) - cpInstanceType = serializers.ChoiceField(required=False, choices=['VNFC_CP', 'EXT_CP'], help_text="Type of the CP instance that is identified by cpInstanceId."), + cpInstanceType = serializers.ChoiceField( + required=False, + choices=['VNFC_CP', 'EXT_CP'], + help_text="Type of the CP instance that is identified by cpInstanceId.") class ExtManagedVirtualLinkInfo(serializers.Serializer): diff --git a/lcm/ns/serializers/sol/ns_instance.py b/lcm/ns/serializers/sol/ns_instance.py index 6140654e..f8e3d824 100644 --- a/lcm/ns/serializers/sol/ns_instance.py +++ b/lcm/ns/serializers/sol/ns_instance.py @@ -19,9 +19,10 @@ from lcm.ns.serializers.sol.pub_serializers import LinkSerializer from lcm.ns.serializers.sol.cp_serializers import CpProtocolDataSerializer, CpProtocolInfoSerializer, VnfExtCpInfoSerializer from lcm.ns.serializers.sol.resource_handle import ResourceHandleSerializer from lcm.ns.serializers.sol.ext_virtual_link_info import ExtVirtualLinkInfoSerializer -from lcm.ns.serializers.sol.ext_managed_virtual_link_info import ExtManagedVirtualLinkInfo +from lcm.ns.serializers.sol.ext_managed_virtual_link_info import ExtManagedVirtualLinkInfo, VnfLinkPortInfo from lcm.ns.serializers.sol.pub_serializers import AffinityOrAntiAffinityRuleSerializer + INSTANTIATION_STATE = [ "NOT_INSTANTIATED", "INSTANTIATED" @@ -110,24 +111,24 @@ class VnfcResourceInfoSerializer(serializers.Serializer): allow_null=True) -class VnfLinkPortInfo(serializers.Serializer): - id = serializers.CharField( - help_text="Identifier of this link port as provided by the entity that has created the link port.", - max_length=255, - required=True, - allow_null=False, - allow_blank=False) - resourceHandle = ResourceHandleSerializer( - help_text="Reference to the virtualised network resource realizing this link port.", - required=True, - allow_null=False) - cpInstanceId = serializers.CharField( - help_text="When the link port is used for external connectivity by the VNF, \ - this attribute represents the identifier of the external CP of the VNF to be connected to this link port.", - max_length=255, - required=False, - allow_null=True, - allow_blank=True) +# class VnfLinkPortInfo(serializers.Serializer): +# id = serializers.CharField( +# help_text="Identifier of this link port as provided by the entity that has created the link port.", +# max_length=255, +# required=True, +# allow_null=False, +# allow_blank=False) +# resourceHandle = ResourceHandleSerializer( +# help_text="Reference to the virtualised network resource realizing this link port.", +# required=True, +# allow_null=False) +# cpInstanceId = serializers.CharField( +# help_text="When the link port is used for external connectivity by the VNF, \ +# this attribute represents the identifier of the external CP of the VNF to be connected to this link port.", +# max_length=255, +# required=False, +# allow_null=True, +# allow_blank=True) class VnfVirtualLinkResourceInfoSerializer(serializers.Serializer):