From: fujinhua Date: Wed, 28 Feb 2018 02:17:57 +0000 (+0800) Subject: Add ZoneInfo serializer X-Git-Tag: v1.1.0~130 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=23c258a7d72ec9669794a0f93c11148ccf2eea31;p=vfc%2Fnfvo%2Flcm.git Add ZoneInfo serializer Change-Id: Ifd8022425412ebc6803e09c12b22530a26a067b3 Issue-ID: VFC-779 Signed-off-by: fujinhua --- diff --git a/lcm/v2/serializers.py b/lcm/v2/serializers.py index 8fa57a5a..89592624 100644 --- a/lcm/v2/serializers.py +++ b/lcm/v2/serializers.py @@ -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 + )