Add ZoneInfo serializer 07/33307/1
authorfujinhua <fu.jinhua@zte.com.cn>
Wed, 28 Feb 2018 02:17:57 +0000 (10:17 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Wed, 28 Feb 2018 02:17:57 +0000 (10:17 +0800)
Change-Id: Ifd8022425412ebc6803e09c12b22530a26a067b3
Issue-ID: VFC-779
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
lcm/v2/serializers.py

index 8fa57a5..8959262 100644 (file)
@@ -82,6 +82,31 @@ class VimConnectionInfoSerializer(serializers.Serializer):
     )
 
 
+class ZoneInfoSerializer(serializers.Serializer):
+    id = serializers.CharField(
+        help_text="The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the Grant structure.",
+        required=True
+    )
+    zoneId = serializers.CharField(
+        help_text="The identifier of the resource zone, as managed by the resource management layer(typically, the VIM).",
+        required=False,
+        allow_null=True,
+        allow_blank=True
+    )
+    vimConnectionId = serializers.CharField(
+        help_text="Identifier of the connection to the VIM that manages the resource zone.",
+        required=False,
+        allow_null=True,
+        allow_blank=True
+    )
+    resourceProviderId = serializers.CharField(
+        help_text="Identifies the entity responsible for the management the resource zone.",
+        required=False,
+        allow_null=True,
+        allow_blank=True
+    )
+
+
 class GrantSerializer(serializers.Serializer):
     id = serializers.CharField(
         help_text="Identifier of the grant.",
@@ -97,3 +122,11 @@ class GrantSerializer(serializers.Serializer):
         allow_null=True,
         allow_blank=True
     )
+    vimConnections = VimConnectionInfoSerializer(
+        help_text="Provides information regarding VIM connections that are approved to be used by the VNFM to allocate resources.",
+        many=True
+    )
+    zones = ZoneInfoSerializer(
+        help_text="Identifies resource zones where the resources are approved to be allocated by the VNFM.",
+        many=True
+    )