Add vfc-vnflcm extCp schema 79/33379/2
authorying.yunlong <ying.yunlong@zte.com.cn>
Wed, 28 Feb 2018 08:12:45 +0000 (16:12 +0800)
committeryunlong ying <ying.yunlong@zte.com.cn>
Wed, 28 Feb 2018 08:13:58 +0000 (08:13 +0000)
Change-Id: Ida6c771f33bd734dd462dae043f5cf085b509f1d
Issue-ID: VFC-780
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
lcm/lcm/v2/serializers.py

index 7a3d448..3aaad31 100644 (file)
@@ -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):