Add ExtManagedVirtualLinkData Serializer 91/33391/1
authorfujinhua <fu.jinhua@zte.com.cn>
Wed, 28 Feb 2018 09:06:07 +0000 (17:06 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Wed, 28 Feb 2018 09:06:07 +0000 (17:06 +0800)
Change-Id: Ib6718e931137032d7bc56163e7fd2283f38c485b
Issue-ID: VFC-779
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
lcm/v2/serializers.py

index 5dc9768..e64c63d 100644 (file)
@@ -356,6 +356,33 @@ class ExtVirtualLinkDataSerializer(serializers.Serializer):
     )
 
 
+class ExtManagedVirtualLinkDataSerializer(serializers.Serializer):
+    id = serializers.CharField(
+        help_text="The identifier of the externally-managed internal VL instance.",
+        required=True
+    )
+    virtualLinkDescId = serializers.CharField(
+        help_text="The identifier of the VLD in the VNFD for this VL.",
+        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
+    )
+
+
 class GrantSerializer(serializers.Serializer):
     id = serializers.CharField(
         help_text="Identifier of the grant.",
@@ -421,3 +448,11 @@ class GrantSerializer(serializers.Serializer):
         required=False,
         allow_null=True
     )
+    extVirtualLinks = ExtVirtualLinkDataSerializer(
+        help_text="Information about external VLs to connect the VNF to.",
+        many=True
+    )
+    extManagedVirtualLinks = ExtManagedVirtualLinkDataSerializer(
+        help_text="Information about internal VLs that are managed by other entities than the VNFM.",
+        many=True
+    )