summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/res/resources/serializers.py405
1 files changed, 284 insertions, 121 deletions
diff --git a/res/res/resources/serializers.py b/res/res/resources/serializers.py
index 4897fa1..8530648 100644
--- a/res/res/resources/serializers.py
+++ b/res/res/resources/serializers.py
@@ -19,27 +19,41 @@ class ResourceSerializer(serializers.Serializer):
resourceId = serializers.CharField(
help_text="resourceId",
required=True,
+ max_length=255,
allow_null=True)
vimId = serializers.CharField(
help_text="vimId",
required=True,
+ max_length=255,
allow_null=True)
class VirtualStorageResourceInfoSerializer(serializers.Serializer):
virtualStorageInstanceId = serializers.CharField(
- help_text="virtualStorageInstanceId", required=False, allow_null=True)
+ help_text="virtualStorageInstanceId",
+ required=False,
+ max_length=255,
+ allow_null=True)
virtualStorageDescId = serializers.CharField(
- help_text="virtualStorageDescId", required=False, allow_null=True)
+ help_text="virtualStorageDescId",
+ required=False,
+ max_length=255,
+ allow_null=True)
storageResource = ResourceSerializer(
help_text="storageResource", required=False, allow_null=True)
class VirtualLinkResourceInfoSerializer(serializers.Serializer):
- virtualLinkInstanceId = serializers.IntegerField(
- help_text="virtualLinkInstanceId", required=False, allow_null=True)
- virtualLinkDescId = serializers.IntegerField(
- help_text="virtualLinkDescId", required=False, allow_null=True)
+ virtualLinkInstanceId = serializers.CharField(
+ help_text="virtualLinkInstanceId",
+ required=False,
+ max_length=255,
+ allow_null=True)
+ virtualLinkDescId = serializers.CharField(
+ help_text="virtualLinkDescId",
+ required=False,
+ max_length=255,
+ allow_null=True)
networkResource = ResourceSerializer(
help_text="networkResource",
required=False,
@@ -47,14 +61,19 @@ class VirtualLinkResourceInfoSerializer(serializers.Serializer):
class VnfcResourceInfoSerializer(serializers.Serializer):
- vnfcInstanceId = serializers.IntegerField(
- help_text="vnfcInstanceId", required=False, allow_null=True)
- vduId = serializers.IntegerField(
+ vnfcInstanceId = serializers.CharField(
+ help_text="vnfcInstanceId",
+ required=False,
+ max_length=255,
+ allow_null=True)
+ vduId = serializers.CharField(
help_text="vduId",
+ required=False, max_length=255, allow_null=True)
+ storageResourceIds = serializers.CharField(
+ help_text="storageResourceIds",
required=False,
+ max_length=255,
allow_null=True)
- storageResourceIds = serializers.IntegerField(
- help_text="storageResourceIds", required=False, allow_null=True)
computeResource = ResourceSerializer(
help_text="computeResource",
required=False,
@@ -64,27 +83,22 @@ class VnfcResourceInfoSerializer(serializers.Serializer):
class AccessInfoSerializer(serializers.Serializer):
tenant = serializers.CharField(
help_text="tenant",
- required=False,
- allow_null=True)
+ required=False, max_length=255, allow_null=True)
username = serializers.CharField(
help_text="username",
- required=False,
- allow_null=True)
+ required=False, max_length=255, allow_null=True)
password = serializers.CharField(
help_text="password",
- required=False,
- allow_null=True)
+ required=False, max_length=255, allow_null=True)
class InterfaceInfoSerializer(serializers.Serializer):
vimType = serializers.CharField(
help_text="vimType",
- required=False,
- allow_null=True)
+ required=False, max_length=255, allow_null=True)
apiVersion = serializers.CharField(
help_text="apiVersion",
- required=False,
- allow_null=True)
+ required=False, max_length=255, allow_null=True)
protocolType = serializers.ChoiceField(
help_text="protocolType", choices=[
'http', 'https'], required=False, allow_null=True)
@@ -93,79 +107,76 @@ class InterfaceInfoSerializer(serializers.Serializer):
class VmResponseSerializer(serializers.Serializer):
vmid = serializers.CharField(
help_text="vmid",
- required=True,
- allow_null=True)
+ required=True, max_length=255, allow_null=True)
vimid = serializers.CharField(
help_text="the vim id",
- required=True,
- allow_null=True)
+ required=True, max_length=255, allow_null=True)
resouceid = serializers.CharField(
help_text="the resouce id",
- required=True,
- allow_null=True)
+ required=True, max_length=255, allow_null=True)
tenant = serializers.CharField(
help_text="tenant",
- required=True,
- allow_null=True)
+ required=True, max_length=255, allow_null=True)
instid = serializers.CharField(
help_text="the inst id",
- required=True,
- allow_null=True)
+ required=True, max_length=255, allow_null=True)
vmname = serializers.CharField(
help_text="vmname",
- required=True,
- allow_null=True)
+ required=True, max_length=255, allow_null=True)
insttype = serializers.IntegerField(
help_text="insttype", required=True, allow_null=True)
operationalstate = serializers.CharField(
- help_text="operationalstate", required=True, allow_null=True)
+ help_text="operationalstate",
+ required=True,
+ max_length=255,
+ allow_null=True)
is_predefined = serializers.IntegerField(
help_text="is_predefined", required=True, allow_null=True)
security_groups = serializers.CharField(
- help_text="security_groups", required=True, allow_null=True)
+ help_text="security_groups",
+ required=True,
+ max_length=255,
+ allow_null=True)
flavor_id = serializers.CharField(
help_text="flavor_id",
+ required=True, max_length=255, allow_null=True)
+ availability_zone = serializers.CharField(
+ help_text="availability_zone",
required=True,
+ max_length=255,
allow_null=True)
- availability_zone = serializers.CharField(
- help_text="availability_zone", required=True, allow_null=True)
server_group = serializers.CharField(
help_text="server_group",
- required=True,
- allow_null=True)
+ required=True, max_length=255, allow_null=True)
volume_array = serializers.CharField(
help_text="volume_array",
- required=True,
- allow_null=True)
+ required=True, max_length=255, allow_null=True)
metadata = serializers.CharField(
help_text="metadata",
- required=True,
- allow_null=True)
+ required=True, max_length=255, allow_null=True)
nic_array = serializers.CharField(
help_text="nic_array",
- required=True,
- allow_null=True)
+ required=True, max_length=255, allow_null=True)
create_time = serializers.CharField(
help_text="create_time",
- required=False,
- allow_null=True)
+ required=False, max_length=255, allow_null=True)
nodeId = serializers.CharField(
help_text="nodeId",
- required=False,
- allow_null=True)
+ required=False, max_length=255, allow_null=True)
class VimInfoSerializer(serializers.Serializer):
vimInfoId = serializers.CharField(
help_text="vimInfoId",
- required=False,
- allow_null=True)
+ required=False, max_length=255, allow_null=True)
vimId = serializers.CharField(
help_text="vimId",
+ required=False, max_length=255, allow_null=True)
+ interfaceEndpoint = serializers.CharField(
+ help_text="interfaceEndpoint",
required=False,
+ max_length=255,
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(
@@ -175,20 +186,42 @@ class VimInfoSerializer(serializers.Serializer):
class LinkPortsSerializer(serializers.Serializer):
- resourceId = serializers.CharField(help_text="resourceId", required=True)
- vimId = serializers.CharField(help_text="vimId", required=False)
+ resourceId = serializers.CharField(
+ help_text="resourceId",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ vimId = serializers.CharField(
+ help_text="vimId",
+ required=False,
+ max_length=255,
+ allow_null=True)
class ResourceHandleSerializer(serializers.Serializer):
- resourceId = serializers.CharField(help_text="resourceId", required=True)
- vimId = serializers.CharField(help_text="vimId", required=False)
+ resourceId = serializers.CharField(
+ help_text="resourceId",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ vimId = serializers.CharField(
+ help_text="vimId",
+ required=False,
+ max_length=255,
+ allow_null=True)
resourceProviderId = serializers.CharField(
- help_text="resourceProviderId", required=False)
+ help_text="resourceProviderId",
+ required=False,
+ max_length=255,
+ allow_null=True)
class ExtVirtualLinkInfoSerializer(serializers.Serializer):
extVirtualLinkId = serializers.CharField(
- help_text="extVirtualLinkId", required=True)
+ help_text="extVirtualLinkId",
+ required=True,
+ max_length=255,
+ allow_null=True)
resourceHandle = ResourceHandleSerializer(
help_text="iPAddress", required=True)
linkPorts = LinkPortsSerializer(
@@ -199,7 +232,11 @@ class L3AddressDataSerializer(serializers.Serializer):
iPAddressType = serializers.ChoiceField(
help_text="iPAddressType", choices=[
'IPv4', 'IPv6'], required=True)
- iPAddress = serializers.CharField(help_text="iPAddress", required=True)
+ iPAddress = serializers.CharField(
+ help_text="iPAddress",
+ required=True,
+ max_length=255,
+ allow_null=True)
class NetworkAddressSerializer(serializers.Serializer):
@@ -207,7 +244,10 @@ class NetworkAddressSerializer(serializers.Serializer):
help_text="addressType", choices=[
'MAC', 'IP'], required=True)
l2AddressData = serializers.CharField(
- help_text="l2AddressData", required=False)
+ help_text="l2AddressData",
+ required=False,
+ max_length=255,
+ allow_null=True)
l3AddressData = L3AddressDataSerializer(
help_text="addresses", required=False)
@@ -215,9 +255,11 @@ class NetworkAddressSerializer(serializers.Serializer):
class ExtCpInfoSerializer(serializers.Serializer):
cpInstanceId = serializers.CharField(
help_text="cpInstanceId",
- required=False,
+ required=False, max_length=255, allow_null=True)
+ cpdId = serializers.IntegerField(
+ help_text="cpdId",
+ required=True,
allow_null=True)
- cpdId = serializers.IntegerField(help_text="cpdId", required=True)
numDynamicAddresses = serializers.IntegerField(
help_text="numDynamicAddresses", required=False, allow_null=True)
addresses = NetworkAddressSerializer(
@@ -227,8 +269,7 @@ class ExtCpInfoSerializer(serializers.Serializer):
class ScaleInfoSerializer(serializers.Serializer):
aspectId = serializers.CharField(
help_text="aspectId",
- required=True,
- allow_null=True)
+ required=True, max_length=255, allow_null=True)
scaleLevel = serializers.IntegerField(
help_text="scaleLevel", required=True, allow_null=True)
@@ -236,8 +277,7 @@ class ScaleInfoSerializer(serializers.Serializer):
class InstantiatedVnfInfoSerializer(serializers.Serializer):
flavourId = serializers.CharField(
help_text="flavour Id",
- required=True,
- allow_null=True)
+ required=True, max_length=255, allow_null=True)
vnfState = serializers.ChoiceField(
help_text="vnf State",
choices=[
@@ -246,7 +286,10 @@ class InstantiatedVnfInfoSerializer(serializers.Serializer):
required=True,
allow_null=True)
localizationLanguage = serializers.CharField(
- help_text="localizationLanguage", required=True, allow_null=True)
+ help_text="localizationLanguage",
+ required=True,
+ max_length=255,
+ allow_null=True)
scaleStatus = ScaleInfoSerializer(help_text="scaleStatus", many=True)
extCpInfo = ExtCpInfoSerializer(help_text="extCpInfo", many=True)
extVirtualLink = ExtVirtualLinkInfoSerializer(
@@ -273,41 +316,60 @@ class InstantiatedVnfInfoSerializer(serializers.Serializer):
class VnfInfoSerializer(serializers.Serializer):
vnfInstanceId = serializers.CharField(
- help_text="vnf Instance Id", required=True)
+ help_text="vnf Instance Id",
+ required=True,
+ max_length=255,
+ allow_null=True)
vnfInstanceName = serializers.CharField(
- help_text="vnf Instance Name", required=True)
+ help_text="vnf Instance Name",
+ required=True,
+ max_length=255,
+ allow_null=True)
vnfInstanceDescription = serializers.CharField(
- help_text="vnfInstanceDescription", required=True, allow_null=True)
+ help_text="vnfInstanceDescription",
+ required=True,
+ max_length=255,
+ allow_null=True)
onboardedVnfPkgInfoId = serializers.CharField(
- help_text="onboarded Vnf Pkg Info Id", required=False, allow_null=True)
+ help_text="onboarded Vnf Pkg Info Id",
+ required=False,
+ max_length=255,
+ allow_null=True)
vnfdId = serializers.CharField(
help_text="vnfdId",
- required=True,
- allow_null=True)
+ required=True, max_length=255, allow_null=True)
vnfdVersion = serializers.CharField(
help_text="vnfd Version",
- required=False,
- allow_null=True)
+ required=False, max_length=255, allow_null=True)
vnfSoftwareVersion = serializers.CharField(
- help_text="vnfSoftwareVersion", required=True, allow_null=True)
+ help_text="vnfSoftwareVersion",
+ required=True,
+ max_length=255,
+ allow_null=True)
vnfProvider = serializers.CharField(
help_text="vnf Provider",
+ required=False, max_length=255, allow_null=True)
+ vnfProductName = serializers.CharField(
+ help_text="vnfProductName",
required=False,
+ max_length=255,
allow_null=True)
- vnfProductName = serializers.CharField(
- help_text="vnfProductName", required=False, allow_null=True)
vnfConfigurableProperties = serializers.CharField(
- help_text="vnfConfigurableProperties", required=False, allow_null=True)
+ help_text="vnfConfigurableProperties",
+ required=False,
+ max_length=255,
+ allow_null=True)
instantiationState = serializers.CharField(
- help_text="instantiationState", required=False, allow_null=True)
- extensions = serializers.CharField(
- help_text="extensions",
+ help_text="instantiationState",
required=False,
+ max_length=255,
allow_null=True)
+ extensions = serializers.CharField(
+ help_text="extensions",
+ required=False, max_length=255, allow_null=True)
metadata = serializers.CharField(
help_text="metadata",
- required=False,
- allow_null=True)
+ required=False, max_length=255, allow_null=True)
instantiatedVnfInfo = InstantiatedVnfInfoSerializer(
help_text="instantiatedVnfInfo", required=True)
@@ -321,23 +383,48 @@ class VmInfoSerializer(serializers.Serializer):
class FlavorResponseSerializer(serializers.Serializer):
- flavourid = serializers.CharField(help_text="flavourid", required=True)
- vimid = serializers.CharField(help_text="the vim id", required=True)
+ flavourid = serializers.CharField(
+ help_text="flavourid",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ vimid = serializers.CharField(
+ help_text="the vim id",
+ required=True,
+ max_length=255,
+ allow_null=True)
resouceid = serializers.CharField(
- help_text="the resouce id", required=True)
+ help_text="the resouce id",
+ required=True,
+ max_length=255,
+ allow_null=True)
tenant = serializers.CharField(
help_text="tenant",
+ required=True, max_length=255, allow_null=True)
+ instid = serializers.CharField(
+ help_text="the inst id",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ name = serializers.CharField(
+ help_text="name",
required=True,
+ max_length=255,
+ allow_null=True)
+ extraspecs = serializers.CharField(
+ help_text="extraspecs",
+ required=True,
+ max_length=255,
allow_null=True)
- instid = serializers.CharField(help_text="the inst id", required=True)
- name = serializers.CharField(help_text="name", required=True)
- extraspecs = serializers.CharField(help_text="extraspecs", required=True)
create_time = serializers.CharField(
help_text="create_time",
+ required=True, max_length=255, allow_null=True)
+ memory = serializers.IntegerField(
+ help_text="memory", required=True, allow_null=True)
+ vcpu = serializers.IntegerField(
+ help_text="vcpu",
required=True,
allow_null=True)
- memory = serializers.IntegerField(help_text="memory", required=True)
- vcpu = serializers.IntegerField(help_text="vcpu", required=True)
class FlavorInfoSerializer(serializers.Serializer):
@@ -346,14 +433,33 @@ class FlavorInfoSerializer(serializers.Serializer):
class NetworkResponseSerializer(serializers.Serializer):
- networkid = serializers.CharField(help_text="networkid", required=True)
- vimid = serializers.CharField(help_text="the vim id", required=True)
+ networkid = serializers.CharField(
+ help_text="networkid",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ vimid = serializers.CharField(
+ help_text="the vim id",
+ required=True,
+ max_length=255,
+ allow_null=True)
resouceid = serializers.CharField(
- help_text="the resouce id", required=True)
+ help_text="the resouce id",
+ required=True,
+ max_length=255,
+ allow_null=True)
insttype = serializers.IntegerField(
- help_text="the inst type", required=True)
- instid = serializers.CharField(help_text="the inst id", required=True)
- name = serializers.CharField(help_text="name", required=True)
+ help_text="the inst type", required=True, allow_null=True)
+ instid = serializers.CharField(
+ help_text="the inst id",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ name = serializers.CharField(
+ help_text="name",
+ required=True,
+ max_length=255,
+ allow_null=True)
class NetworkInfoSerializer(serializers.Serializer):
@@ -363,17 +469,42 @@ class NetworkInfoSerializer(serializers.Serializer):
class SubnetResponseSerializer(serializers.Serializer):
subnetworkid = serializers.CharField(
- help_text="the subnetwork id", required=True)
- vimid = serializers.CharField(help_text="the vim id", required=True)
+ help_text="the subnetwork id",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ vimid = serializers.CharField(
+ help_text="the vim id",
+ required=True,
+ max_length=255,
+ allow_null=True)
resouceid = serializers.CharField(
- help_text="the resouce id", required=True)
+ help_text="the resouce id",
+ required=True,
+ max_length=255,
+ allow_null=True)
networkid = serializers.CharField(
- help_text="the network id", required=True)
+ help_text="the network id",
+ required=True,
+ max_length=255,
+ allow_null=True)
insttype = serializers.IntegerField(
- help_text="the inst type", required=True)
- instid = serializers.CharField(help_text="the inst id", required=True)
- name = serializers.CharField(help_text="name", required=True)
- cidr = serializers.CharField(help_text="cidr", required=True)
+ help_text="the inst type", required=True, allow_null=True)
+ instid = serializers.CharField(
+ help_text="the inst id",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ name = serializers.CharField(
+ help_text="name",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ cidr = serializers.CharField(
+ help_text="cidr",
+ required=True,
+ max_length=255,
+ allow_null=True)
class SubnetInfoSerializer(serializers.Serializer):
@@ -383,18 +514,34 @@ class SubnetInfoSerializer(serializers.Serializer):
class CpResponseSerializer(serializers.Serializer):
cpinstanceid = serializers.CharField(
- help_text="the cp instance id", required=True)
- cpdid = serializers.CharField(help_text="the cpd id", required=True)
+ help_text="the cp instance id",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ cpdid = serializers.CharField(
+ help_text="the cpd id",
+ required=True,
+ max_length=255,
+ allow_null=True)
cpinstancename = serializers.CharField(
- help_text="the cp instance name of vnf", required=True)
+ help_text="the cp instance name of vnf",
+ required=True,
+ max_length=255,
+ allow_null=True)
vlinstanceid = serializers.CharField(
- help_text="the vl instance id of vnf", required=True)
+ help_text="the vl instance id of vnf",
+ required=True,
+ max_length=255,
+ allow_null=True)
ownertype = serializers.IntegerField(
- help_text="the owner type of vnf", required=True)
+ help_text="the owner type of vnf", required=True, allow_null=True)
ownerid = serializers.CharField(
- help_text="the owner id of vnf", required=True)
+ help_text="the owner id of vnf",
+ required=True,
+ max_length=255,
+ allow_null=True)
relatedtype = serializers.IntegerField(
- help_text="the related type", required=True)
+ help_text="the related type", required=True, allow_null=True)
class CpsInfoSerializer(serializers.Serializer):
@@ -403,19 +550,35 @@ class CpsInfoSerializer(serializers.Serializer):
class VolumeResponseSerializer(serializers.Serializer):
storageid = serializers.CharField(
- help_text="the storage id", required=True)
- vimid = serializers.CharField(help_text="the vim id", required=True)
+ help_text="the storage id",
+ required=True,
+ max_length=255,
+ allow_null=True)
+ vimid = serializers.CharField(
+ help_text="the vim id",
+ required=True,
+ max_length=255,
+ allow_null=True)
resouceid = serializers.CharField(
- help_text="the resouce id of vnf", required=True)
+ help_text="the resouce id of vnf",
+ required=True,
+ max_length=255,
+ allow_null=True)
insttype = serializers.IntegerField(
- help_text="the inst type of vnf", required=True)
+ help_text="the inst type of vnf", required=True, allow_null=True)
instid = serializers.CharField(
- help_text="the inst id of vnf", required=True)
+ help_text="the inst id of vnf",
+ required=True,
+ max_length=255,
+ allow_null=True)
storagetype = serializers.CharField(
- help_text="the storage type of vnf", required=True)
+ help_text="the storage type of vnf",
+ required=True,
+ max_length=255,
+ allow_null=True)
size = serializers.CharField(
help_text="the size of storage",
- required=True)
+ required=True, max_length=255, allow_null=True)
class VolumeInfoSerializer(serializers.Serializer):