summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2018-02-28 16:12:45 +0800
committeryunlong ying <ying.yunlong@zte.com.cn>2018-02-28 08:13:58 +0000
commit3067c076ef23cc64f800f0faf197030695d61f0b (patch)
tree0f8a05ef81c051c51be13b21c2d9c471b0db382d
parent2c462ad938b2c55b2bf9f1dc85a7bd5ebd5995ea (diff)
Add vfc-vnflcm extCp schema
Change-Id: Ida6c771f33bd734dd462dae043f5cf085b509f1d Issue-ID: VFC-780 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r--lcm/lcm/v2/serializers.py39
1 files changed, 39 insertions, 0 deletions
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):