aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFu Jinhua <fu.jinhua@zte.com.cn>2018-03-06 06:04:16 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-06 06:04:16 +0000
commit120ad59ff94c23e5dd9e2db97757f0763d5c64c5 (patch)
tree523910180b20ff0ac57f04170e22b8da8eab0f10
parent39c20b2c47a2cc5658681fbec665c88f10df9318 (diff)
parentdcf3e23577b0146056d532cd20325ba1a6889eb8 (diff)
Merge "Add Vim Constraint serializer"
-rw-r--r--lcm/v2/serializers.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/lcm/v2/serializers.py b/lcm/v2/serializers.py
index 69721cd0..2f7ae333 100644
--- a/lcm/v2/serializers.py
+++ b/lcm/v2/serializers.py
@@ -110,6 +110,18 @@ class PlacementConstraintSerializer(serializers.Serializer):
)
+class VimConstraintSerializer(serializers.Serializer):
+ sameResourceGroup = serializers.BooleanField(
+ help_text="Set to true when the constraint applies not only to the same VIM connection, but also to the same infrastructure resource group.",
+ required=False,
+ allow_null=True
+ )
+ resource = ConstraintResourceRefSerializer(
+ help_text="References to resources in the constraint rule.",
+ many=True
+ )
+
+
class GrantRequestSerializer(serializers.Serializer):
vnfInstanceId = serializers.CharField(
help_text="Identifier of the VNF instance which this grant request is related to.",
@@ -168,6 +180,10 @@ class GrantRequestSerializer(serializers.Serializer):
help_text="Placement constraints that the VNFM may send to the NFVO in order to influence the resource placement decision.",
many=True
)
+ vimConstraints = VimConstraintSerializer(
+ help_text="Used by the VNFM to require that multiple resources are managed through the same VIM connection.",
+ many=True
+ )
class VimConnectionInfoSerializer(serializers.Serializer):