Add VimAsserts serializer 55/33355/1
authorfujinhua <fu.jinhua@zte.com.cn>
Wed, 28 Feb 2018 07:09:07 +0000 (15:09 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Wed, 28 Feb 2018 07:09:07 +0000 (15:09 +0800)
Change-Id: I50433e9ce29f84bde84db1119eb1ffc3cc2fbf29
Issue-ID: VFC-779
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
lcm/v2/serializers.py

index 37d0992..2e97d6d 100644 (file)
@@ -207,13 +207,23 @@ class VimSoftwareImageSerializer(serializers.Serializer):
     )
 
 
+class VimAssetsSerializer(serializers.Serializer):
+    computeResourceFlavours = VimComputeResourceFlavourSerializer(
+        help_text="Mappings between virtual compute descriptors defined in the VNFD and compute resource flavours managed in the VIM.",
+        many=True
+    )
+    softwareImages = VimSoftwareImageSerializer(
+        help_text="Mappings between software images defined in the VNFD and software images managed in the VIM.",
+        many=True
+    )
+
+
 class GrantSerializer(serializers.Serializer):
     id = serializers.CharField(
         help_text="Identifier of the grant.",
         required=True
     )
     vnfInstanceId = serializers.CharField(
-        help_text="Identifier of the related VNF instance.",
         required=True
     )
     vnfLcmOpOccId = serializers.CharField(
@@ -268,3 +278,8 @@ class GrantSerializer(serializers.Serializer):
         help_text="List of resources that are approved to be modified.",
         many=True
     )
+    vimAssets = VimAssetsSerializer(
+        help_text="Information about assets for the VNF that are managed by the NFVO in the VIM.",
+        required=False,
+        allow_null=True
+    )