diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2018-02-28 10:17:57 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2018-02-28 10:17:57 +0800 |
commit | 23c258a7d72ec9669794a0f93c11148ccf2eea31 (patch) | |
tree | ae86b2542930b906620777200798b0da03d60556 | |
parent | 45796e0731c662853f3bfdd19c45c9bba92b26c9 (diff) |
Add ZoneInfo serializer
Change-Id: Ifd8022425412ebc6803e09c12b22530a26a067b3
Issue-ID: VFC-779
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r-- | lcm/v2/serializers.py | 33 |
1 files changed, 33 insertions, 0 deletions
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 + ) |