diff options
author | ying.yunlong <ying.yunlong@zte.com.cn> | 2018-01-23 16:49:58 +0800 |
---|---|---|
committer | yunlong ying <ying.yunlong@zte.com.cn> | 2018-01-23 08:58:24 +0000 |
commit | 6bd6774bc2c0f365cbb3b118105dfb0875a67947 (patch) | |
tree | 402909ca615073690f67fc2b775646c5ccc1cf2b | |
parent | d6f316907011b84fa4f1af198830dcb219b7c702 (diff) |
Add vfc-vnfmgr vnfcofig schema
Change-Id: I92072fb193ac36221863b0ac4345557a7c559655
Issue-ID: VFC-670
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r-- | mgr/mgr/vnfreg/serializers.py | 20 |
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) |