summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2018-02-12 15:28:50 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2018-02-12 15:28:50 +0800
commitfc4d2ca170880a94ecd50a0b876361dfe61a3038 (patch)
treea63c26dc32e9c8a1a4380516b770f8ba8ec2def9
parent834ea30c777cbb481e24200f168128e4885fd7bd (diff)
Add vfc-ztevnfmdriver instantiation schema
Change-Id: I96e11bfc0faddb4ac00fab747aac7a6bcc8aa3e6 Issue-ID: VFC-736 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r--zte/vmanager/driver/interfaces/serializers.py71
1 files changed, 71 insertions, 0 deletions
diff --git a/zte/vmanager/driver/interfaces/serializers.py b/zte/vmanager/driver/interfaces/serializers.py
index bb6a9141..09dbc084 100644
--- a/zte/vmanager/driver/interfaces/serializers.py
+++ b/zte/vmanager/driver/interfaces/serializers.py
@@ -15,6 +15,77 @@
from rest_framework import serializers
+class additionalParamSerializer(serializers.Serializer):
+ sdncontroller = serializers.CharField(
+ help_text="sdncontroller",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ NatIpRange = serializers.CharField(
+ help_text="NatIpRange",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ m6000_mng_ip = serializers.CharField(
+ help_text="m6000_mng_ip",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ externalPluginManageNetworkName = serializers.CharField(
+ help_text="externalPluginManageNetworkName",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ location = serializers.CharField(
+ help_text="location",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ externalManageNetworkName = serializers.CharField(
+ help_text="externalManageNetworkName",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ sfc_data_network = serializers.CharField(
+ help_text="sfc_data_network",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ externalDataNetworkName = serializers.CharField(
+ help_text="externalDataNetworkName",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ inputs = serializers.DictField(
+ help_text='inputs',
+ child=serializers.CharField(allow_blank=True),
+ required=False,
+ allow_null=True)
+
+
+class InstantiateVnfRequestSerializer(serializers.Serializer):
+ vnfInstanceName = serializers.CharField(
+ help_text="vnfInstanceName",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ vnfPackageId = serializers.CharField(
+ help_text="vnfPackageId",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ vnfDescriptorId = serializers.CharField(
+ help_text="vnfDescriptorId",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ additionalParam = serializers.DictField(
+ help_text="additionalParam",
+ child=additionalParamSerializer(help_text='additionalParam'),
+ required=True,
+ allow_null=True)
+
+
class TerminateVnfRequestSerializer(serializers.Serializer):
terminationType = serializers.CharField(
help_text="terminationType",