Add Links Serializer 91/33491/1
authorfujinhua <fu.jinhua@zte.com.cn>
Thu, 1 Mar 2018 00:59:51 +0000 (08:59 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Thu, 1 Mar 2018 00:59:51 +0000 (08:59 +0800)
Change-Id: Ib335d3a114770e34b03795f895c3414738523b22
Issue-ID: VFC-779
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
lcm/v2/serializers.py

index e64c63d..50432b2 100644 (file)
@@ -383,6 +383,21 @@ class ExtManagedVirtualLinkDataSerializer(serializers.Serializer):
     )
 
 
+class LinksSerializer(serializers.Serializer):
+    self = serializers.CharField(
+        help_text="URI of this resource.",
+        required=True
+    )
+    vnfLcmOpOcc = serializers.CharField(
+        help_text="Related VNF lifecycle management operation occurrence.",
+        required=True
+    )
+    vnfInstance = serializers.CharField(
+        help_text="Related VNF instance.",
+        required=True
+    )
+
+
 class GrantSerializer(serializers.Serializer):
     id = serializers.CharField(
         help_text="Identifier of the grant.",
@@ -456,3 +471,7 @@ class GrantSerializer(serializers.Serializer):
         help_text="Information about internal VLs that are managed by other entities than the VNFM.",
         many=True
     )
+    links = LinksSerializer(
+        help_text="Links to resources related to this resource.",
+        required=True
+    )