From: ying.yunlong Date: Wed, 28 Feb 2018 08:12:45 +0000 (+0800) Subject: Add vfc-vnflcm extCp schema X-Git-Tag: v1.1.0~42 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=vfc%2Fgvnfm%2Fvnflcm.git;a=commitdiff_plain;h=3067c076ef23cc64f800f0faf197030695d61f0b Add vfc-vnflcm extCp schema Change-Id: Ida6c771f33bd734dd462dae043f5cf085b509f1d Issue-ID: VFC-780 Signed-off-by: ying.yunlong --- diff --git a/lcm/lcm/v2/serializers.py b/lcm/lcm/v2/serializers.py index 7a3d4484..3aaad319 100644 --- a/lcm/lcm/v2/serializers.py +++ b/lcm/lcm/v2/serializers.py @@ -58,6 +58,41 @@ class ScaleInfoSerializer(serializers.Serializer): required=True) +class CpProtocolInfoSerializer(serializers.Serializer): + layerProtocol = serializers.ChoiceField( + help_text="The identifier of layer(s) and protocol(s) associated to the network address information.", + choices=["IP_OVER_ETHERNET"], + required=False, + allow_null=True) + ipOverEthernet = serializers.DictField( + help_text="IP addresses over Ethernet to assign to the extCP instance.", + child=serializers.CharField(allow_blank=True), + required=False, + allow_null=True) + + +class ExtCpInfoSerializer(serializers.Serializer): + id = serializers.CharField( + help_text="Identifier of the external CP instance and the related information instance.", + required=False, + max_length=255, + allow_null=True) + cpdId = serializers.CharField( + help_text="Identifier of the external CPD, VnfExtCpd, in the VNFD.", + required=True, + max_length=255, + allow_null=True) + cpProtocolInfo = CpProtocolInfoSerializer( + help_text="Network protocol information for this CP.", + required=False, + allow_null=True) + extLinkPortId = serializers.CharField( + help_text="Identifier of the 'extLinkPortInfo' structure inside the 'extVirtualLinkInfo' structure.", + required=False, + max_length=255, + allow_null=True) + + class instantiatedVnfInfoSerializer(serializers.Serializer): flavourId = serializers.CharField( help_text="Identifier of the VNF deployment flavour applied to this VNF instance.", @@ -73,6 +108,10 @@ class instantiatedVnfInfoSerializer(serializers.Serializer): help_text="Scale status of the VNF, one entry per aspect.", required=False, many=True) + extCpInfo = ExtCpInfoSerializer( + help_text="Information about the external CPs exposed by the VNF instance.", + required=False, + many=True) class VnfInstanceSerializer(serializers.Serializer):