summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)