summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2018-01-30 09:53:38 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2018-01-30 10:06:58 +0800
commit25b4a690e673d9155d4ef478f65a03c74e3cf3d1 (patch)
tree1fe93a344f9c3e3b171dc4f2da3d741442cf4b59 /lcm
parentb75f4b2d8f22ab0f0f885a9d48730ae3d2e7e9ff (diff)
Add vfc-vnflcm instantiate req schema
Change-Id: Ie0066e8f7111fbb09798a5901ab2e522bb6c85a2 Issue-ID: VFC-682 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'lcm')
-rw-r--r--lcm/lcm/nf/vnfs/serializers.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/lcm/lcm/nf/vnfs/serializers.py b/lcm/lcm/nf/vnfs/serializers.py
index ae2866aa..df9bd7e5 100644
--- a/lcm/lcm/nf/vnfs/serializers.py
+++ b/lcm/lcm/nf/vnfs/serializers.py
@@ -98,6 +98,7 @@ class NetworkAddressSerializer(serializers.Serializer):
class extCpInfoSerializer(serializers.Serializer):
cpInstanceId = serializers.CharField(help_text="cpInstanceId", required=True)
cpdId = serializers.IntegerField(help_text="cpdId", required=True)
+ numDynamicAddresses = serializers.IntegerField(help_text="numDynamicAddresses", required=False, allow_null=True)
addresses = NetworkAddressSerializer(help_text="addresses", many=True, allow_null=True)
@@ -132,3 +133,27 @@ class VnfInfoSerializer(serializers.Serializer):
class VnfsInfoSerializer(serializers.ListSerializer):
child = VnfInfoSerializer()
+
+
+class emptySerializer(serializers.Serializer):
+ pass
+
+
+class extVirtualLinksSerializer(serializers.Serializer):
+ vlInstanceId = serializers.CharField(help_text="vlInstanceId", required=True)
+ resourceId = serializers.CharField(help_text="resourceId", required=True)
+ vim = vimInfoSerializer(help_text="vim", required=True)
+ extCps = extCpInfoSerializer(help_text="extCps", many=True)
+
+
+class additionalParamsSerializer(serializers.Serializer):
+ inputs = emptySerializer(help_text="inputs", required=True)
+ extVirtualLinks = extVirtualLinksSerializer(help_text="extVirtualLinks", many=True, allow_null=True)
+
+
+class InstantiateVnfRequestSerializer(serializers.Serializer):
+ flavourId = serializers.CharField(help_text="flavourId", required=True)
+ instantiationLevelId = serializers.CharField(help_text="instantiationLevelId", required=True, allow_null=True)
+ localizationLanguage = serializers.CharField(help_text="localizationLanguage", required=True, allow_null=True)
+ extVirtualLinks = extVirtualLinksSerializer(help_text="extVirtualLinks", many=True, allow_null=True)
+ additionalParams = additionalParamsSerializer(help_text="additionalParams", required=True, allow_null=True)