Add ExtVirtualLinkData Serializer 87/33387/1
authorfujinhua <fu.jinhua@zte.com.cn>
Wed, 28 Feb 2018 08:53:03 +0000 (16:53 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Wed, 28 Feb 2018 08:53:03 +0000 (16:53 +0800)
Change-Id: I1ac4e87d5c7b2a8e19a7408361e195c4d8880311
Issue-ID: VFC-779
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
lcm/v2/serializers.py

index 5e613bf..5dc9768 100644 (file)
@@ -325,6 +325,37 @@ class ExtLinkPortDataSerializer(serializers.Serializer):
     )
 
 
+class ExtVirtualLinkDataSerializer(serializers.Serializer):
+    id = serializers.CharField(
+        help_text="The identifier of the external VL instance.",
+        required=True
+    )
+    vimConnectionId = serializers.CharField(
+        help_text="Identifier of the VIM connection to manage this resource.",
+        required=False,
+        allow_null=True,
+        allow_blank=True
+    )
+    resourceProviderId = serializers.CharField(
+        help_text="Identifies the entity responsible for the management of this resource.",
+        required=False,
+        allow_null=True,
+        allow_blank=True
+    )
+    resourceId = serializers.CharField(
+        help_text="The identifier of the resource in the scope of the VIM or the resource provider.",
+        required=True
+    )
+    extCps = VnfExtCpDataSerializer(
+        help_text="External CPs of the VNF to be connected to this external VL.",
+        many=True
+    )
+    extLinkPorts = ExtLinkPortDataSerializer(
+        help_text="Externally provided link ports to be used to connect external connection points to this external VL.",
+        many=True
+    )
+
+
 class GrantSerializer(serializers.Serializer):
     id = serializers.CharField(
         help_text="Identifier of the grant.",