summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2018-01-30 17:26:16 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2018-01-30 17:26:16 +0800
commitc9b587044da34bcf787211580a63678d3c4389a9 (patch)
tree7676b81befa8ebfe55d18dbbd299909663cb31df /res
parent7d53102e9d32052a22140a62c70e5713876c2df9 (diff)
Update vfc-vnfres schema
Change-Id: Ie5412444e6a475c43fff9411f7f90e0cfde3c4b9 Issue-ID: VFC-679 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'res')
-rw-r--r--res/res/resources/serializers.py44
1 files changed, 22 insertions, 22 deletions
diff --git a/res/res/resources/serializers.py b/res/res/resources/serializers.py
index c32a55b..2c3f7cb 100644
--- a/res/res/resources/serializers.py
+++ b/res/res/resources/serializers.py
@@ -20,26 +20,26 @@ class ResourceSerializer(serializers.Serializer):
vimId = serializers.CharField(help_text="vimId", required=True)
-class virtualStorageResourceInfoSerializer(serializers.Serializer):
+class VirtualStorageResourceInfoSerializer(serializers.Serializer):
virtualStorageInstanceId = serializers.CharField(help_text="virtualStorageInstanceId", required=True)
virtualStorageDescId = serializers.CharField(help_text="virtualStorageDescId", required=True, allow_null=True)
storageResource = ResourceSerializer(help_text="storageResource", required=True)
-class virtualLinkResourceInfoSerializer(serializers.Serializer):
+class VirtualLinkResourceInfoSerializer(serializers.Serializer):
virtualLinkInstanceId = serializers.IntegerField(help_text="virtualLinkInstanceId", required=True, allow_null=True)
virtualLinkDescId = serializers.IntegerField(help_text="virtualLinkDescId", required=True, allow_null=True)
networkResource = ResourceSerializer(help_text="networkResource", required=True, allow_null=True)
-class vnfcResourceInfoSerializer(serializers.Serializer):
+class VnfcResourceInfoSerializer(serializers.Serializer):
vnfcInstanceId = serializers.IntegerField(help_text="vnfcInstanceId", required=True, allow_null=True)
vduId = serializers.IntegerField(help_text="vduId", required=True, allow_null=True)
storageResourceIds = serializers.IntegerField(help_text="storageResourceIds", required=True, allow_null=True)
computeResource = ResourceSerializer(help_text="computeResource", required=True, allow_null=True)
-class accessInfoSerializer(serializers.Serializer):
+class AccessInfoSerializer(serializers.Serializer):
tenant = serializers.CharField(help_text="tenant", required=True)
username = serializers.CharField(help_text="username", required=True)
password = serializers.CharField(help_text="password", required=True)
@@ -72,24 +72,24 @@ class VmResponseSerializer(serializers.Serializer):
nodeId = serializers.CharField(help_text="nodeId", required=False, allow_null=True)
-class vimInfoSerializer(serializers.Serializer):
+class VimInfoSerializer(serializers.Serializer):
vimInfoId = serializers.CharField(help_text="vimInfoId", required=False, allow_null=True)
vimId = serializers.CharField(help_text="vimId", required=False, allow_null=True)
interfaceEndpoint = serializers.CharField(help_text="interfaceEndpoint", required=False, allow_null=True)
interfaceInfo = InterfaceInfoSerializer(help_text="vimInfoId", required=False, allow_null=True)
- accessInfo = accessInfoSerializer(help_text="accessInfo", required=False, allow_null=True)
+ accessInfo = AccessInfoSerializer(help_text="accessInfo", required=False, allow_null=True)
-class monitoringParametersSerializer(serializers.Serializer):
+class MonitoringParametersSerializer(serializers.Serializer):
pass
-class linkPortsSerializer(serializers.Serializer):
+class LinkPortsSerializer(serializers.Serializer):
resourceId = serializers.CharField(help_text="resourceId", required=True)
vimId = serializers.CharField(help_text="vimId", required=False)
-class resourceHandleSerializer(serializers.Serializer):
+class ResourceHandleSerializer(serializers.Serializer):
resourceId = serializers.CharField(help_text="resourceId", required=True)
vimId = serializers.CharField(help_text="vimId", required=False)
resourceProviderId = serializers.CharField(help_text="resourceProviderId", required=False)
@@ -97,11 +97,11 @@ class resourceHandleSerializer(serializers.Serializer):
class ExtVirtualLinkInfoSerializer(serializers.Serializer):
extVirtualLinkId = serializers.CharField(help_text="extVirtualLinkId", required=True)
- resourceHandle = resourceHandleSerializer(help_text="iPAddress", required=True)
- linkPorts = linkPortsSerializer(help_text="iPAddress", many=True, allow_null=True)
+ resourceHandle = ResourceHandleSerializer(help_text="iPAddress", required=True)
+ linkPorts = LinkPortsSerializer(help_text="iPAddress", many=True, allow_null=True)
-class l3AddressDataSerializer(serializers.Serializer):
+class L3AddressDataSerializer(serializers.Serializer):
iPAddressType = serializers.ChoiceField(help_text="iPAddressType", choices=['IPv4', 'IPv6'], required=True)
iPAddress = serializers.CharField(help_text="iPAddress", required=True)
@@ -109,10 +109,10 @@ class l3AddressDataSerializer(serializers.Serializer):
class NetworkAddressSerializer(serializers.Serializer):
addressType = serializers.ChoiceField(help_text="addressType", choices=['MAC', 'IP'], required=True)
l2AddressData = serializers.CharField(help_text="l2AddressData", required=False)
- l3AddressData = l3AddressDataSerializer(help_text="addresses", required=False)
+ l3AddressData = L3AddressDataSerializer(help_text="addresses", required=False)
-class extCpInfoSerializer(serializers.Serializer):
+class ExtCpInfoSerializer(serializers.Serializer):
cpInstanceId = serializers.CharField(help_text="cpInstanceId", required=False, allow_null=True)
cpdId = serializers.IntegerField(help_text="cpdId", required=True)
numDynamicAddresses = serializers.IntegerField(help_text="numDynamicAddresses", required=False, allow_null=True)
@@ -124,19 +124,19 @@ class ScaleInfoSerializer(serializers.Serializer):
scaleLevel = serializers.IntegerField(help_text="scaleLevel", required=True, allow_null=True)
-class instantiatedVnfInfoSerializer(serializers.Serializer):
+class InstantiatedVnfInfoSerializer(serializers.Serializer):
flavourId = serializers.CharField(help_text="flavour Id", required=True, allow_null=True)
vnfState = serializers.ChoiceField(help_text="vnf State", choices=['STARTED', 'STOPPED'], required=True, allow_null=True)
localizationLanguage = serializers.CharField(help_text="localizationLanguage", required=True, allow_null=True)
scaleStatus = ScaleInfoSerializer(help_text="scaleStatus", many=True)
- extCpInfo = extCpInfoSerializer(help_text="extCpInfo", many=True)
+ extCpInfo = ExtCpInfoSerializer(help_text="extCpInfo", many=True)
extVirtualLink = ExtVirtualLinkInfoSerializer(help_text="extVirtualLink", many=True)
- monitoringParameters = monitoringParametersSerializer(help_text="monitoringParameters", allow_null=True)
+ monitoringParameters = serializers.DictField(help_text="monitoringParameters", child=serializers.CharField(allow_blank=True), required=False, allow_null=True)
vmInfo = VmResponseSerializer(help_text="vmInfo", many=True, allow_null=True)
- vimInfo = vimInfoSerializer(help_text="vimInfo", many=True, required=False, allow_null=True)
- vnfcResourceInfo = vnfcResourceInfoSerializer(help_text="vnfcResourceInfo", many=True)
- virtualLinkResourceInfo = virtualLinkResourceInfoSerializer(help_text="virtualLinkResourceInfo", many=True)
- virtualStorageResourceInfo = virtualStorageResourceInfoSerializer(help_text="virtualStorageResourceInfo", many=True)
+ vimInfo = VimInfoSerializer(help_text="vimInfo", many=True, required=False, allow_null=True)
+ vnfcResourceInfo = VnfcResourceInfoSerializer(help_text="vnfcResourceInfo", many=True)
+ virtualLinkResourceInfo = VirtualLinkResourceInfoSerializer(help_text="virtualLinkResourceInfo", many=True)
+ virtualStorageResourceInfo = VirtualStorageResourceInfoSerializer(help_text="virtualStorageResourceInfo", many=True)
class VnfInfoSerializer(serializers.Serializer):
@@ -153,7 +153,7 @@ class VnfInfoSerializer(serializers.Serializer):
instantiationState = serializers.CharField(help_text="instantiationState", required=False, allow_null=True)
extensions = serializers.CharField(help_text="extensions", required=False, allow_null=True)
metadata = serializers.CharField(help_text="metadata", required=False, allow_null=True)
- instantiatedVnfInfo = instantiatedVnfInfoSerializer(help_text="instantiatedVnfInfo", required=True)
+ instantiatedVnfInfo = InstantiatedVnfInfoSerializer(help_text="instantiatedVnfInfo", required=True)
class VnfsInfoSerializer(serializers.Serializer):