aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFu Jinhua <fu.jinhua@zte.com.cn>2018-03-05 08:23:28 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-05 08:23:28 +0000
commit34d85acc5f265c8d16c4ec211d44f2b9797cb98e (patch)
tree194e6fffb32eaa824ac90d72a8de9b52df3e62f6
parent1c7da291e97e97ad1878e6c516f45a1640416bd8 (diff)
parent333c8930b780cfb8984c9bde2d4d3fc93bad77e0 (diff)
Merge "Add Resource Handle Serializer of Grant Req"
-rw-r--r--lcm/v2/serializers.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/lcm/v2/serializers.py b/lcm/v2/serializers.py
index d8efb3e1..417282ee 100644
--- a/lcm/v2/serializers.py
+++ b/lcm/v2/serializers.py
@@ -15,6 +15,31 @@
from rest_framework import serializers
+class ResourceHandleSerializer(serializers.Serializer):
+ vimConnectionId = serializers.CharField(
+ help_text="Identifier of the VIM connection to manage the resource.",
+ required=False,
+ allow_null=True,
+ allow_blank=True
+ )
+ resourceProviderId = serializers.CharField(
+ help_text="Identifier of the entity responsible for the management of the resource.",
+ required=False,
+ allow_null=True,
+ allow_blank=True
+ )
+ resourceId = serializers.CharField(
+ help_text="Identifier of the resource in the scope of the VIM or the resource provider.",
+ required=True
+ )
+ vimLevelResourceType = serializers.CharField(
+ help_text="Type of the resource in the scope of the VIM or the resource provider.",
+ required=False,
+ allow_null=True,
+ allow_blank=True
+ )
+
+
class ResourceDefinitionSerializer(serializers.Serializer):
id = serializers.CharField(
help_text="Identifier of this ResourceDefinition, unique at least within the scope of the GrantRequest.",
@@ -37,6 +62,11 @@ class ResourceDefinitionSerializer(serializers.Serializer):
allow_null=True,
allow_blank=True
)
+ resource = ResourceHandleSerializer(
+ help_text="Resource information for an existing resource.",
+ required=False,
+ allow_null=True
+ )
class GrantRequestSerializer(serializers.Serializer):