summaryrefslogtreecommitdiffstats
path: root/mgr
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2019-04-05 09:23:15 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2019-04-05 09:36:23 +0800
commit266d472f0d7e6247ff2d5e87b4c483e5529b2c17 (patch)
treeee7472d999921ea75847977840c4902bd475b1fa /mgr
parentcef19a677b0320774b3b13d15911a11f4df821c0 (diff)
Update serializer for vnfmgr
Issue-ID: VFC-1306 Change-Id: I4de25ca58bf4463ebd379a925fee8dd372f1bd64 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'mgr')
-rw-r--r--mgr/mgr/vnfreg/serializers.py42
1 files changed, 28 insertions, 14 deletions
diff --git a/mgr/mgr/vnfreg/serializers.py b/mgr/mgr/vnfreg/serializers.py
index 42a1121..372eefe 100644
--- a/mgr/mgr/vnfreg/serializers.py
+++ b/mgr/mgr/vnfreg/serializers.py
@@ -20,27 +20,32 @@ class VnfInfoSerializer(serializers.Serializer):
help_text="ID of VNF instance",
required=True,
max_length=200,
- allow_null=True)
+ allow_null=True
+ )
ip = serializers.CharField(
help_text="Ip of VNF",
required=True,
max_length=200,
- allow_null=True)
+ allow_null=True
+ )
port = serializers.CharField(
help_text="Port of VNF",
required=True,
max_length=200,
- allow_null=True)
+ allow_null=True
+ )
username = serializers.CharField(
help_text="Username of VNF",
required=True,
max_length=255,
- allow_null=True)
+ allow_null=True
+ )
password = serializers.CharField(
help_text="Password of VNF",
required=True,
max_length=255,
- allow_null=True)
+ allow_null=True
+ )
class ResponseSerializer(serializers.Serializer):
@@ -48,7 +53,8 @@ class ResponseSerializer(serializers.Serializer):
help_text="ID of VNF instance",
required=True,
max_length=200,
- allow_null=False)
+ allow_null=False
+ )
class CpSerializer(serializers.Serializer):
@@ -56,12 +62,14 @@ class CpSerializer(serializers.Serializer):
help_text="ID of CP",
required=True,
max_length=200,
- allow_null=True)
+ allow_null=True
+ )
cpdId = serializers.CharField(
help_text="ID of CPD",
required=True,
max_length=200,
- allow_null=True)
+ allow_null=True
+ )
class SpecificDataSerializer(serializers.Serializer):
@@ -69,23 +77,27 @@ class SpecificDataSerializer(serializers.Serializer):
help_text="Auto scalable",
required=True,
max_length=200,
- allow_null=True)
+ allow_null=True
+ )
autoHealable = serializers.CharField(
help_text="Auto healable",
required=True,
max_length=200,
- allow_null=True)
+ allow_null=True
+ )
class ConfigDataSerializer(serializers.Serializer):
cp = CpSerializer(
help_text="CP list",
many=True,
- allow_null=True)
+ allow_null=True
+ )
vnfSpecificData = SpecificDataSerializer(
help_text="VNF specific data",
required=True,
- allow_null=True)
+ allow_null=True
+ )
class VnfConfigSerializer(serializers.Serializer):
@@ -93,8 +105,10 @@ class VnfConfigSerializer(serializers.Serializer):
help_text="ID of VNF instance",
required=True,
max_length=200,
- allow_null=True)
+ allow_null=True
+ )
vnfConfigurationData = ConfigDataSerializer(
help_text="VNF configuration data",
required=True,
- allow_null=True)
+ allow_null=True
+ )