summaryrefslogtreecommitdiffstats
path: root/mgr
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2018-01-23 16:49:58 +0800
committeryunlong ying <ying.yunlong@zte.com.cn>2018-01-23 08:58:24 +0000
commit6bd6774bc2c0f365cbb3b118105dfb0875a67947 (patch)
tree402909ca615073690f67fc2b775646c5ccc1cf2b /mgr
parentd6f316907011b84fa4f1af198830dcb219b7c702 (diff)
Add vfc-vnfmgr vnfcofig schema
Change-Id: I92072fb193ac36221863b0ac4345557a7c559655 Issue-ID: VFC-670 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'mgr')
-rw-r--r--mgr/mgr/vnfreg/serializers.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/mgr/mgr/vnfreg/serializers.py b/mgr/mgr/vnfreg/serializers.py
index c47edcd..d0febdb 100644
--- a/mgr/mgr/vnfreg/serializers.py
+++ b/mgr/mgr/vnfreg/serializers.py
@@ -33,3 +33,23 @@ class ErrorSerializer(serializers.Serializer):
class NoneSerializer(serializers.Serializer):
pass
+
+
+class CpSerializer(serializers.Serializer):
+ cpId = serializers.CharField(help_text="the cps id of vnf", required=True)
+ cpdId = serializers.CharField(help_text="the cpds id of vnf", required=True)
+
+
+class SpecificDataSerializer(serializers.Serializer):
+ autoScalable = serializers.CharField(help_text="the autoScalable of vnf", required=True)
+ autoHealable = serializers.CharField(help_text="the autoHealable of vnf", required=True)
+
+
+class ConfigDataSerializer(serializers.Serializer):
+ cp = CpSerializer(help_text="the cps of vnf", many=True)
+ vnfSpecificData = SpecificDataSerializer(help_text="the vnfSpecificData of vnf", required=True)
+
+
+class VnfConfigSerializer(serializers.Serializer):
+ vnfInstanceId = serializers.CharField(help_text="the instance id of vnf", required=True)
+ vnfConfigurationData = ConfigDataSerializer(help_text="the ConfigDataSerializer of vnf", required=True)