示例#1
0
文件: schema.py 项目: cnxtech/5gt-mtp
class VirtualComputeFlavour(Schema):
    flavourId = fields.Str(
        required=True, description='Identifier given to the compute flavour.')
    accelerationCapability = fields.Str(
        required=True,
        description='Selected acceleration capabilities (e.g. crypto, GPU) '
        'from the set of capabilities offered by the compute node '
        'acceleration resources. The cardinality can be 0, if no '
        'particular acceleration capability is requested.')
    virtualMemory = fields.Nested(
        VirtualMemory,
        required=True,
        description='The virtual memory of the virtualised compute.')
    virtualCpu = fields.Nested(
        VirtualCpu,
        many=True,
        required=True,
        description='The virtual CPU(s) of the virtualised compute.')
    storageAttributes = fields.Nested(
        VirtualStorage,
        many=True,
        required=True,
        description='Element containing information about the size of '
        'virtualised storage resources (e.g. size of volume, in '
        'GB), the type of storage (e.g. volume, object).')
    virtualNetworkInterface = fields.Nested(
        VirtualNetworkInterface,
        required=True,
        description='The virtual network interfaces of the virtualised '
        'compute.')
示例#2
0
class AllocateComputeRequest(Schema):
    computeName = fields.Str(
        required=True,
        description='Name provided by the consumer for the virtualised '
        'compute resource to allocate. It can be used for '
        'identifying resources from consumer side.')
    reservationId = fields.Str(
        required=True,
        description='Identifier of the resource reservation applicable to '
        'this virtualised resource management operation. '
        'Cardinality can be 0 if no resource reservation was '
        'used.')
    computeFlavourId = fields.Str(
        required=True,
        description='Identifier of the Compute Flavour that provides '
        'information about the particular memory, CPU and disk '
        'resources for virtualised compute resource to allocate. '
        'The Compute Flavour is created with Create Compute '
        'Flavour operation')
    affinityOrAntiAffinityConstraints = fields.Nested(
        AffinityOrAntiAffinityConstraint,
        many=True,
        required=True,
        description='A list of elements with affinity or anti affinity '
        'information of the virtualised compute resource to '
        'allocate. There should be a relation between the '
        'constraints defined in the different elements of the '
        'list.')
    interfaceData = fields.Nested(
        VirtualInterfaceData,
        many=True,
        required=True,
        description='The data of network interfaces which are specific to a '
        'Virtual Compute Resource instance.')
    vcImageId = fields.Str(
        required=True,
        description='Identifier of the virtualisation container software '
        'image (e.g. a virtual machine image). Cardinality can be '
        '0 if an "empty" virtualisation container is allocated. ')
    metadata = fields.Nested(
        KeyValuePair,
        required=False,
        description='List of metadata key-value pairs used by the consumer '
        'to associate meaningful metadata to the related '
        'virtualised resource.')
    resourceGroupId = fields.Str(
        required=True,
        description='Unique identifier of the "infrastructure resource '
        'group", logical grouping of virtual resources assigned '
        'to a tenant within an Infrastructure Domain.')
    locationConstraints = fields.Str(
        required=True,
        description='If present, it defines location constraints for the '
        'resource(s) is (are) requested to be allocated, e.g. in '
        'what particular Resource Zone.')
    userData = fields.Nested(
        UserData,
        required=True,
        description='Element containing user data to customize the '
        'virtualised compute resource at boot-time.')
示例#3
0
class ReservedVirtualCompute(Schema):
    reservationId = fields.Str(
        required=True, description='Identifier of the resource reservation.')
    computePoolReserved = fields.Nested(
        ReservedComputePool,
        required=True,
        description='Information about compute resources that have been '
        'reserved, e.g. {"cpu_cores": 90, "vm_instances": 10, '
        '"ram": 10000}')
    virtualisationContainerReserved = fields.Nested(
        ReservedVirtualisationContainer,
        required=True,
        description='Information about the virtualisation container(s) that '
        'have been reserved.')
    reservationStatus = fields.Str(
        required=True,
        description='Status of the compute resource reservation, e.g. to '
        'indicate if a reservation is being used.')
    startTime = fields.DateTime(
        required=True,
        description='Indication when the consumption of the resources starts. '
        'If the value is 0, resources are reserved for immediate '
        'use.')
    endTime = fields.DateTime(
        required=True,
        description='Indication when the reservation ends (when it is '
        'expected that the resources will no longer be needed) '
        'and used by the VIM to schedule the reservation. If not '
        'present, resources are reserved for unlimited usage '
        'time.')
    expiryTime = fields.DateTime(
        required=True,
        description='Indication when the VIM can release the reservation in '
        'case no allocation request against this reservation was '
        'made.')
示例#4
0
class VirtualNetwork(Schema):
    networkResourceId = fields.String(
        required=True,
        description='Identifier of the virtualised network resource.')
    networkResourceName = fields.String(
        required=True, description='Name of the virtualised network resource.')
    subnet = fields.String(
        required=True,
        many=True,
        description='Only present if the network provides layer 3 '
        'connectivity.')
    networkPort = fields.Nested(
        VirtualNetworkPort,
        required=True,
        many=True,
        description='Element providing information of an instantiated virtual '
        'network port.')
    bandwidth = fields.Number(
        required=True, description='Minimum network bandwidth (in Mbps).')
    networkType = fields.Str(
        required=True,
        description='The type of network that maps to the virtualised '
        'network. This list is extensible. Examples are: "local", '
        '"vlan", "vxlan", "gre", "l3-vpn", etc. The cardinality '
        'can be "0" to cover the case where this attribute is not '
        'required to create the virtualised network.')
    segmentType = fields.Str(
        required=True,
        description='The isolated segment for the virtualised network. For '
        'instance, for a "vlan" networkType, it corresponds to '
        'the vlan identifier; and for a "gre" networkType, this '
        'corresponds to a gre key. The cardinality can be "0" to '
        'allow for flat networks without any specific '
        'segmentation.')
    networkQoS = fields.Nested(
        NetworkQoS,
        many=True,
        required=True,
        description='Element providing information about Quality of Service '
        'attributes that the network shall support. The '
        'cardinality can be "0" to allow for networks without any '
        'specified QoS requirements.')
    isShared = fields.Bool(
        required=True,
        description='It defines whether the virtualised network is shared '
        'among consumers.')
    sharingCriteria = fields.Str(
        required=True,
        description='Only present for shared networks. Indicate the sharing '
        'criteria for this network. This criteria might be a list '
        'of authorized consumers.')

    zoneId = fields.String(
        required=True,
        description='If present, it identifies the Resource Zone where the '
        'virtual network resources have been allocated.')
    operationalState = fields.String(
        required=True,
        description='The operational state of the virtualised network.')
示例#5
0
文件: schema.py 项目: cnxtech/5gt-mtp
class VirtualCompute(Schema):
    """Attributes for the VirtualCompute information element."""

    computeId = fields.Str(
        required=True,
        description='Identifier of the virtualised compute resource.')
    computeName = fields.Str(
        required=True, description='Name of the virtualised compute resource.')
    flavourId = fields.Str(
        required=True,
        description='Identifier of the given compute flavour used to '
        'instantiate this virtual compute.')
    accelerationCapability = fields.List(
        fields.String(),
        required=True,
        description='Selected acceleration capabilities (e.g. crypto, GPU) '
        'from the set of capabilities offered by the compute node '
        'acceleration resources. The cardinality can be 0, if no '
        'particular acceleration capability is provided.')
    virtualCpu = fields.Nested(
        VirtualCpu,
        required=True,
        description='The virtual CPU(s) of the virtualised compute.')
    virtualMemory = fields.Nested(
        VirtualMemory,
        required=True,
        description='The virtual memory of the compute.')
    virtualNetworkInterface = fields.Nested(
        VirtualNetworkInterface,
        required=True,
        many=True,
        description='Element with information of the instantiated virtual '
        'network interfaces of the compute resource.')
    virtualDisks = fields.Str(
        VirtualStorage,
        required=True,
        many=True,
        description='Element with information of the virtualised storage '
        'resources (volumes, ephemeral that are attached to the '
        'compute resource.)')
    vcImageId = fields.Str(
        required=True,
        description='Identifier of the virtualisation container software '
        'image (e.g. virtual machine image). Cardinality can be 0 '
        'if an "empty" virtualisation container is allocated.')
    zoneId = fields.Str(
        required=True,
        description='If present, it identifies the Resource Zone where the '
        'virtual compute resources have been allocated.')
    hostId = fields.Str(
        required=True,
        description='Identifier of the host the virtualised compute resource '
        'is allocated on.')
    operationalState = fields.Str(
        required=True,
        description='Operational state of the compute resource.')
示例#6
0
class VirtualNetworkData(Schema):
    bandwidth = fields.Number(
        required=True, description='Minimum network bandwidth (in Mbps).')
    networkType = fields.Str(
        required=True,
        description='The type of network that maps to the virtualised '
        'network. This list is extensible. Examples are: "local", '
        '"vlan", "vxlan", "gre", "l3-vpn", etc. The cardinality '
        'can be "0" to cover the case where this attribute is not '
        'required to create the virtualised network.')
    segmentType = fields.Str(
        required=True,
        description='The isolated segment for the virtualised network. For '
        'instance, for a "vlan" networkType, it corresponds to '
        'the vlan identifier; and for a "gre" networkType, this '
        'corresponds to a gre key. The cardinality can be "0" to '
        'allow for flat networks without any specific '
        'segmentation.')
    networkQoS = fields.Nested(
        NetworkQoS,
        many=True,
        required=True,
        description='Element providing information about Quality of Service '
        'attributes that the network shall support. The '
        'cardinality can be "0" to allow for networks without any '
        'specified QoS requirements.')
    isShared = fields.Bool(
        required=True,
        description='It defines whether the virtualised network is shared '
        'among consumers.')
    sharingCriteria = fields.Str(
        required=True,
        description='Only present for shared networks. Indicate the sharing '
        'criteria for this network. This criteria might be a list '
        'of authorized consumers.')
    layer3Attributes = fields.Nested(
        NetworkSubnetData,
        required=True,
        many=True,
        description='The attribute allows setting up a network providing '
        'defined layer 3 connectivity. See clause 8.4.4.4 for '
        'further information on the attributes required for layer '
        '3 connectivity.')
    metadata = fields.Nested(
        KeyValuePair,
        required=False,
        many=True,
        description='List of metadata key-value pairs used by the consumer '
        'to associate meaningful metadata to the related '
        'virtualised ressource.')
示例#7
0
class VirtualNetworkReservation(Schema):
    numPublicIps = fields.Int(
        required=True,
        description='Number of public IP addresses to be reserved.')
    networkAttributes = fields.Nested(
        VirtualNetworkAttributesReservationData,
        required=True,
        description='Information specifying additional attributes of the '
        'network resource to be reserved.')
    networkPorts = fields.Nested(
        VirtualNetworkPortReservationData,
        many=True,
        required=True,
        description='List of specific network ports to be reserved.')
示例#8
0
class QueryNetworkCapacityRequest(Schema):
    zoneId = fields.Str(
        required=True,
        description='When specified this parameter identifies the resource '
        'zone for which the capacity is requested. When not '
        'specified the total capacity managed by the VIM instance '
        'will be returned.')
    networkResourceTypeId = fields.Str(
        required=True,
        description='Identifier of the resource type for which the issuer '
        'wants to know the available, total, reserved and/or '
        'allocated capacity.')
    resourceCriteria = fields.Str(
        required=True,
        description='Input capacity computation parameter for selecting the '
        'characteristics of the virtual network for which the '
        'issuer wants to know the available, total, reserved '
        'and/or allocated capacity. Selecting '
        'parameters/attributes that shall be used are defined in '
        'the VirtualNetworkResourceInformation information '
        'element. This information element and the '
        'networkResourceTypeID are mutually exclusive.')
    attributeSelector = fields.Str(
        required=True,
        description='Input parameter for selecting which capacity information '
        '(i.e. available, total, reserved and/or allocated '
        'capacity) is queried. When not present, all four values '
        'are requested.')
    timePeriod = fields.Nested(
        TimePeriodInformation,
        required=True,
        description='The time interval for which capacity is queried. When '
        'omitted, an interval starting "now" is used. The time '
        'interval can be specified since resource reservations '
        'can be made for a specified time interval.')
示例#9
0
文件: schema.py 项目: cnxtech/5gt-mtp
class ResourceZone(Schema):
    zoneId = fields.Str(required=True,
                        description='The identifier of the Resource Zone.')
    zoneName = fields.Str(required=True,
                          description='The name of the Resource Zone.')
    zoneState = fields.Str(
        required=True,
        description='Information about the current state of the Resource '
        'Zone, e.g. if the Resource Zone is available.')
    nfviPopId = fields.Str(
        required=True,
        description='The identifier of the NFVI-PoP the Resource Zone belongs '
        'to.')
    zoneProperty = fields.Str(
        required=True,
        description='Set of properties that define the capabilities '
        'associated to the Resource Zone. Examples of '
        'capabilities may include: support of certain compute '
        'resource types (e.g. low performance, acceleration '
        'capabilities, etc. association to certain NFVI-PoP '
        'physical segregation (e.g. different power or network '
        'sub-systems, availability of redundancy power '
        'sub-systems), etc.')
    metadata = fields.Nested(
        KeyValuePair,
        many=True,
        description='Other metadata associated to the Resource Zone.')
示例#10
0
文件: view.py 项目: NajibOdhah/5gr-rl
class SoftwareImageAddQuery(Schema):
    name = fields.Str(required=True,
                      description='The name of the software image.')
    provider = fields.Str(required=True,
                          description='The provider of the software image.')
    version = fields.Str(required=True,
                         description='The version of the software image.')
    userMetadata = fields.Nested(KeyValuePair,
                                 required=True,
                                 description='User-defined metadata.',
                                 many=True)
    softwareImage = fields.Str(required=True,
                               description='The binary software image file.')
    resourceGroupId = fields.Str(
        required=True,
        description='Unique identifier of the "infrastructure resource '
        'group", logical grouping of virtual resources assigned '
        'to a tenant within an Infrastructure Domain.')
    visibility = fields.Str(
        required=True,
        description='Controls the visibility of the image. In case of '
        '"private" value the image is available only for the '
        'tenant assigned to the provided resourceGroupId and the '
        'administrator tenants of the VIM while in case of '
        '"public" value, all tenants of the VIM can use the '
        'image.')
示例#11
0
class ReservedVirtualNetworkPort(Schema):
    portId = fields.Str(
        required=True,
        description='Identifier of the network port that has been reserved.')
    portType = fields.Str(
        required=True,
        description='Type of network port. Examples of types are access '
        'ports, or trunk ports (layer 1) that become transport '
        'for multiple layer 2 or layer 3 networks.')
    segmentId = fields.Str(
        required=True,
        description='The isolated segment the network port belongs to. For '
        'instance, for a "vlan", it corresponds to the vlan '
        'identifier; and for a "gre", this corresponds to a gre '
        'key. The cardinality can be 0 to allow for flat networks '
        'without any specific segmentation.')
    bandwidth = fields.Number(
        required=True,
        description='The bitrate of the virtual network port (in Mbps)')
    metadata = fields.Nested(
        KeyValuePair,
        many=True,
        description='List of metadata key-value pairs used by the consumer to '
        'associate meaningful metadata to the related virtualised '
        'resource.')
示例#12
0
文件: schema.py 项目: cnxtech/5gt-mtp
class AffinityOrAntiAffinityConstraint(Schema):
    type = fields.Str(required=True,
                      description='Indicates whether this is an affinity or '
                      'anti-affinity constraint.')
    scope = fields.Str(
        required=True,
        description='Qualifies the scope of the constraint. In case of '
        'compute resource: e.g. "NFVI-PoP" or "NFVI Node". In '
        'case of ports: e.g. "virtual switch or router" or '
        '"physical NIC", or "physical network" or "NFVI Node". In '
        'case of networks: e.g. "physical NIC", "physical '
        'network" or "NFVI Node". In case of subnets: it should '
        'be ignored. Defaults to "NFVI Node" if absent.')
    affinityAntiAffinityResourceList = fields.Nested(
        AffinityOrAntiAffinityResourceList,
        required=True,
        description='Consumer-managed list of identifiers of virtualised '
        'resources with which the actual resource is requested to '
        'be affine or anti-affine. Either '
        'affinityAntiAffinityResourceList or '
        'affinityAntiAffinityResourceGroup but not both shall be '
        'present.')
    affinityAntiAffinityResourceGroup = fields.Str(
        required=True,
        description='Identifier of the producer-managed group of virtualised '
        'resources with which the actual resource is requested to '
        'be affine or anti-affine. Either '
        'affinityAntiAffinityResourceList or '
        'affinityAntiAffinityResourceGroup but not both shall be '
        'present.')
示例#13
0
class VirtualNetworkPortData(Schema):
    portType = fields.Str(
        required=True,
        description='Type of network port. Examples of types are access ports '
        '(layer 2 or 3), or trunk ports (layer 1) that become '
        'transport for multiple layer 2 or layer 3 networks.')
    networkId = fields.Str(
        required=True,
        description='Identifier of the network that the port belongs to. When '
        'creating a port, such port needs to be part of a '
        'network. Cardinality can be 0 when '
        'VirtualNetworkPortData is part of Update Virtualised '
        'Network Resource')
    segmentId = fields.Str(
        required=True,
        description='The isolated segment the network port belongs to. For '
        'instance, for a "vlan", it corresponds to the vlan '
        'identifier; and for a "gre", this corresponds to a gre '
        'key. The cardinality can be "0" to allow for flat '
        'networks without any specific segmentation.')
    bandwidth = fields.Number(
        required=True,
        description='The bandwidth of the virtual network port (in Mbps). '
        'Cardinality can be "0" to allow for virtual network '
        'ports without any specified bandwidth requirements.')
    metadata = fields.Nested(
        KeyValuePair,
        required=True,
        many=True,
        description='List of metadata key-value pairs used by the consumer '
        'to associate meaningful metadata to the related '
        'virtualised resource.')
示例#14
0
class CreateNetworkResourceReservationRequest(Schema):
    networkReservation = fields.Nested(
        VirtualNetworkReservation,
        required=True,
        description='Type and configuration of virtualised network resources '
        'that need to be reserved, e.g. {"PublicIps": 20}')
    startTime = fields.DateTime(
        required=True,
        description='Indication when the consumption of the resources starts. '
        'If the value is 0, resources are reserved for immediate '
        'use.')
    endTime = fields.DateTime(
        required=True,
        description='Indication when the reservation ends (when the issuer of '
        'the request expects that the resources will no longer be '
        'needed) and used by the VIM to schedule the reservation. '
        'If not present, resources are reserved for unlimited '
        'usage time.')
    expiryTime = fields.DateTime(
        required=True,
        description='Indication when the VIM can release the reservation in '
        'case no allocation request against this reservation was '
        'made.')
    affinityConstraint = fields.Nested(
        AffinityOrAntiAffinityConstraint,
        many=True,
        required=True,
        description='Element with anti-affinity information of the virtual '
        'network resources to reserve.')
    antiAffinityConstraint = fields.Nested(
        AffinityOrAntiAffinityConstraint,
        many=True,
        required=True,
        description='If present, it defines location constraints for the '
        'resource(s) is (are) requested to be reserved, e.g. in '
        'what particular Resource Zone.')
    locationConstraints = fields.Str(
        required=True,
        description='If present, it defines location constraints for the '
        'resource(s) is (are) requested to be reserved, e.g. in '
        'what particular Resource Zone.')
    resourceGroupId = fields.Str(
        required=True,
        description='Unique identifier of the "infrastructure resource '
        'group", logical grouping of virtual resources assigned '
        'to a tenant within an Infrastructure Domain.')
示例#15
0
class ReservedVirtualisationContainer(Schema):
    containerId = fields.Str(
        required=True,
        description='The identifier of the virtualisation container that has '
        'been reserved.')
    flavourId = fields.Nested(
        ReservedComputePool,
        many=True,
        required=True,
        description='Identifier of the given compute flavour used to reserve '
        'the virtualisation container.')
    accelerationCapability = fields.Str(
        required=True,
        description='Selected acceleration capabilities (e.g. crypto, GPU) '
        'from the set of capabilities offered by the compute node '
        'acceleration resources. The cardinality can be 0, if no '
        'particular acceleration capability is provided.')
    virtualMemory = fields.Nested(
        VirtualMemory,
        required=True,
        description='The virtual memory of the reserved virtualisation '
        'container.')
    virtualCpu = fields.Nested(
        VirtualCpu,
        required=True,
        description='The virtual CPU(s) of the reserved virtualisation '
        'container.')
    virtualDisks = fields.Nested(
        VirtualStorage,
        many=True,
        required=True,
        description='Element with information of the virtualised storage '
        'resources attached to the reserved virtualisation '
        'container.')
    virtualNetworkInterface = fields.Nested(
        VirtualNetworkInterface,
        many=True,
        required=True,
        description='Element with information of the virtual network '
        'interfaces of the reserved virtualisation container.')
    zoneId = fields.Str(
        required=True,
        description='References the resource zone where the virtualisation '
        'container has been reserved. Cardinality can be 0 to '
        'cover the case where reserved network resources are not '
        'bound to a specific resource zone.')
示例#16
0
class ReservedVirtualNetwork(Schema):
    reservationId = fields.Str(
        required=True, description='Identifier of the resource reservation.')
    publicIps = fields.Str(
        many=True,
        required=True,
        description='List of public IP addresses that have been reserved.')
    networkAttributes = fields.Nested(
        ReservedVirtualNetworkAttributes,
        required=True,
        description='Information specifying additional attributes of the '
        'network resource that has been reserved.')
    networkPorts = fields.Nested(
        ReservedVirtualNetworkPort,
        many=True,
        required=True,
        description='List of specific network ports that have been reserved.')
    reservationStatus = fields.Str(
        required=True,
        description='Status of the network resource reservation, e.g. to '
        'indicate if a reservation is being used.')
    startTime = fields.DateTime(
        required=True,
        description='Indication when the consumption of the resources starts. '
        'If the value is 0, resources are reserved for immediate '
        'use.')
    endTime = fields.DateTime(
        required=True,
        description='Indication when the reservation ends (when it is '
        'expected that the resources will no longer be needed) '
        'and used by the VIM to schedule the reservation. If not '
        'present, resources are reserved for unlimited usage '
        'time.')
    expiryTime = fields.DateTime(
        required=True,
        description='Indication when the VIM can release the reservation in '
        'case no allocation request against this reservation was '
        'made.')
    zoneId = fields.Str(
        required=True,
        description='References the resource zone where the virtual network '
        'resources have been reserved. Cardinality can be 0 to '
        'cover the case where reserved network resources are not '
        'bound to a specific resource zone.')
示例#17
0
class VirtualisationContainerReservation(Schema):
    containerId = fields.Str(
        required=True,
        description='The identifier of the virtualisation container to be '
        'reserved.')
    containerFlavour = fields.Nested(
        VirtualComputeFlavour,
        required=True,
        description='The containerFlavour encapsulates information of the '
        'virtualisation container to be reserved.')
示例#18
0
class AllocateNetworkResult(Schema):
    networkData = fields.Nested(
        VirtualNetwork,
        required=True,
        description='If network types are created satisfactorily, it contains '
        'the data relative to the instantiated virtualised '
        'network resource. Cardinality can be "0" if the request '
        'did not include creation of such type of resource.')
    subnetData = fields.Nested(
        NetworkSubnet,
        required=True,
        description='If subnet types are created satisfactorily, it contains '
        'the data relative to the allocated subnet. Cardinality can be "0" if '
        'the request did not include creation of such type of resource.')
    networkPortData = fields.Nested(
        VirtualNetworkPort,
        required=True,
        description='If network types are created satisfactorily, it contains '
        'the data relative to the instantiated virtualised '
        'network resource. Cardinality can be "0" if the request '
        'did not include creation of such type of resource.')
示例#19
0
class CreateComputeResourceQuotaRequest(Schema):
    resourceGroupId = fields.Str(
        required=True,
        description='Name provided by the consumer for the virtualised '
        'compute resource to allocate. It can be used for '
        'identifying resources from consumer side.')
    virtualComputeQuota = fields.Nested(
        VirtualComputeQuotaData,
        required=True,
        description='Identifier of the resource reservation applicable to '
        'this virtualised resource management operation. '
        'Cardinality can be 0 if no resource reservation was '
        'used.')
示例#20
0
class AllocateNetworkRequest(Schema):
    networkResourceName = fields.Str(
        required=True,
        description='Name provided by the consumer for the virtualised '
        'network resource to allocate. It can be used for '
        'identifying resources from consumer side.')
    reservationId = fields.Str(
        required=True,
        description='Identifier of the resource reservation applicable to '
        'this virtualised resource management operation.')
    networkResourceType = fields.Str(
        required=True,
        description='Type of virtualised network resource. Possible values '
        'are: "network", "subnet" or network-port.')
    typeNetworkData = fields.Str(
        VirtualNetworkData,
        required=True,
        description='The network data provides information about the '
        'particular virtual network resource to create. '
        'Cardinality can be "0" depending on the value of '
        'networkResourceType.',
        many=True)
    typeNetworkPortData = fields.Str(
        VirtualNetworkPortData,
        required=True,
        description='The binary software image file.')
    typeSubnetData = fields.Str(NetworkSubnetData,
                                required=True,
                                description='The binary software image file.')
    affinityOrAntiAffinityConstraints = fields.Str(
        AffinityOrAntiAffinityConstraint,
        many=True,
        required=True,
        description='The binary software image file.')
    metadata = fields.Nested(KeyValuePair,
                             many=True,
                             required=True,
                             description='The binary software image file.')
    resourceGroupId = fields.Str(
        required=True,
        description='Unique identifier of the "infrastructure resource '
        'group", logical grouping of virtual resources assigned '
        'to a tenant within an Infrastructure Domain.')
    locationConstraints = fields.Str(
        required=True,
        description='Controls the visibility of the image. In case of '
        '"private" value the image is available only for the '
        'tenant assigned to the provided resourceGroupId and the '
        'administrator tenants of the VIM while in case of '
        '"public" value, all tenants of the VIM can use the '
        'image.')
示例#21
0
文件: schema.py 项目: cnxtech/5gt-mtp
class VirtualComputeResourceInformation(Schema):
    computeResourceTypeId = fields.Str(
        required=True,
        description='Identifier of the consumable virtualised compute '
        'resource type.')
    virtualMemory = fields.Nested(
        VirtualMemoryResourceInformation,
        required=True,
        description='It defines the virtual memory characteristics of the '
        'consumable virtualised compute resource.')
    virtualCPU = fields.Nested(
        VirtualCpuResourceInformation,
        required=True,
        description='It defines the virtual CPU(s) characteristics of the '
        'consumable virtualised compute resource.')
    accelerationCapability = fields.Str(
        many=True,
        required=True,
        description='Acceleration capabilities (e.g. crypto, GPU) for the '
        'consumable virtualised compute resources from the set of '
        'capabilities offered by the compute node acceleration '
        'resources. The cardinality can be 0, if no particular '
        'acceleration capability is provided.')
示例#22
0
class ComputePoolReservation(Schema):
    numCpuCores = fields.Int(required=True,
                             description='Number of CPU cores to be reserved.')
    numVcInstances = fields.Int(
        required=True,
        description='Number of virtualised container instances to be '
        'reserved.')
    virtualMemSize = fields.Number(
        required=True, description='Size of virtual memory to be reserved.')
    computeAttributes = fields.Nested(
        VirtualComputeAttributesReservationData,
        required=True,
        description='Information specifying additional attributes of the '
        'compute resource to be reserved.')
示例#23
0
文件: schema.py 项目: 5growth/5gt-mtp
class VirtualStorage(Schema):
    """VirtualStorage.

    The VirtualStorage information element encapsulates information of
    an instantiated virtualised storage resource.
    """

    storageId = fields.Str(
        required=True,
        description='Identifier of the virtualised storage resource.')
    storageName = fields.Str(
        required=True, description='Name of the virtualised storage resource.')
    flavourId = fields.Str(
        required=True,
        description='Identifier of the storage flavour used to instantiate '
        'this virtual storage.')
    typeOfStorage = fields.Str(
        required=True,
        description='Type of virtualised storage resource (e.g. volume, '
        'object).')
    sizeOfStorage = fields.Number(
        required=True,
        description='Size of virtualised storage resource (e.g. size of '
        'volume, in GB).')
    rdmaEnabled = fields.Bool(
        required=False, description='Indicates if the storage supports RDMA.')
    ownerId = fields.Str(
        required=True,
        description='Identifier of the virtualised resource that owns and '
        'uses such a virtualised storage resource. The value can '
        'be NULL if the virtualised storage is not attached yet '
        'to any other resource (e.g. a virtual machine).')
    zoneId = fields.Str(
        required=True,
        description='If present, it identifies the Resource Zone where the '
        'virtual storage resources have been allocated.')
    hostId = fields.Str(
        required=True,
        description='Identifier of the host where the virtualised storage '
        'resource is allocated. A cardinality of 0 refers to '
        'distributed storage solutions.')
    operationalState = fields.Str(
        required=True, description='Operational state of the resource.')
    metadata = fields.Nested(
        KeyValuePair,
        required=False,
        description='List of metadata key-value pairs used by the consumer '
        'to associate meaningful metadata to the related '
        'virtualised resource.')
示例#24
0
class GrapheSchema(Schema):
    """
    A graphe is composed of nodes and edges
    """
    end_points = fields.List(fields.Str(),
                             required=True,
                             description="End points of the graphe")
    hotpoints = fields.List(fields.Str(),
                            required=True,
                            description="The hotpoint of the graphe")
    nodes = fields.Nested(NodeSchema, many=True, required=True)
    edges = fields.Nested(EdgeSchema, many=True, required=True)

    @post_load
    def make_graphe(self, data):
        graphe = Graphe("GrapheFromApiRest")
        graphe.endpoints = data["end_points"]
        graphe.hotpoints = data["hotpoints"]
        graphe.nodes = {d.name: d for d in data["nodes"]}
        graphe.edges = {
            Edge._compute_name(d.source, d.dest): d
            for d in data["edges"]
        }

        for node_name, node in graphe.nodes.items():
            for name, edge in graphe.edges.items():
                if node_name == edge.source or node_name == edge.dest:
                    node.edges.append(edge)

        return graphe

    @pre_dump
    def graphe_helper(self, data):
        return DummyGraphe([d for d in data.nodes.values()],
                           [e for e in data.edges.values()], data.end_points,
                           data.hotpoints)
示例#25
0
class VirtualNetworkResourceInformation(Schema):
    networkResourceTypeId = fields.Str(
        required=True, description='Identifier of the network resource type.')
    bandwidth = fields.Number(
        required=True, description='Minimum network bandwidth (in Mbps).')
    networkType = fields.Str(
        required=True,
        description='The type of network that maps to the virtualised '
        'network. Examples are: "local", "vlan", "vxlan", "gre", '
        'etc.')
    networkQoS = fields.Nested(
        NetworkQoS,
        many=True,
        required=True,
        description='Element providing information about Quality of Service '
        'attributes that the network shall support.')
示例#26
0
class NetworkSubnetData(Schema):
    networkId = fields.Str(
        required=True,
        description='The identifier of the virtualised network that the '
        'virtualised sub-network is attached to. The cardinality '
        'can be 0 to cover the case where this type is used to '
        'describe the L3 attributes of a network rather than a '
        'subnetwork or when NetworkSubnetData is part of Update '
        'Virtualised Network Resource.')
    ipVersion = fields.Str(
        required=True,
        description='The IP version of the network/subnetwork. Cardinality '
        'can be 0 when NetworkSubnetData is part of Update '
        'Virtualised Network Resource.')
    gatewayIp = fields.Str(
        IPAddress,
        required=True,
        description='Specifies the IP address of the network/subnetwork '
        'gateway when the gateway is selected by the requestor.')
    cidr = fields.Str(
        required=True,
        description='The CIDR of the network/subnetwork, i.e. network address '
        'and subnet mask. Cardinality can be 0 when '
        'NetworkSubnetData is part of Update Virtualised Network '
        'Resource.')
    isDhcpEnabled = fields.Bool(
        required=True,
        description='True when DHCP is to be enabled for this '
        'network/subnetwork, or false otherwise.')
    addressPool = fields.Str(
        required=True,
        many=True,
        description='Address pools for the network/subnetwork. The '
        'cardinality can be 0 when VIM is allowed to allocate all'
        'addresses in the CIDR except for the address of the '
        'network/subnetwork gateway.')
    metadata = fields.Nested(
        KeyValuePair,
        required=False,
        many=True,
        description='List of metadata key-value pairs used by the consumer '
        'to associate meaningful metadata to the related '
        'virtualised ressource.')
示例#27
0
class VirtualNetworkPort(Schema):
    resourceId = fields.Str(
        required=True, description='Identifier of the virtual network port.')
    networkId = fields.Str(
        required=True,
        description='Identifier of the network that the port belongs to. When '
        'creating a port, such port needs to be part of a '
        'network.')
    attachedResourceId = fields.Str(
        required=True,
        description='Identifier of the attached resource to the network port '
        '(e.g. a virtualised compute resource, or identifier of '
        'the virtual network interface). The cardinality can be '
        '"0" if there is no specific resource connected to the '
        'network port.')
    portType = fields.Str(
        required=True,
        description='Type of network port. Examples of types are access ports '
        '(layer 2 or 3), or trunk ports (layer 1) that become '
        'transport for multiple layer 2 or layer 3 networks.')
    segmentId = fields.Str(
        required=True,
        description='The isolated segment the network port belongs to. For '
        'instance, for a "vlan", it corresponds to the vlan '
        'identifier; and for a "gre", this corresponds to a gre '
        'key. The cardinality can be "0" for flat networks '
        'without any specific segmentation.')
    bandwidth = fields.Number(
        required=True,
        description='The bandwidth of the virtual network port (in Mbps). '
        'Cardinality can be "0" for virtual network ports without '
        'any specific allocated bandwidth.')
    operationalState = fields.Str(
        required=True,
        description='The operational state of the virtual network port.')
    metadata = fields.Nested(
        KeyValuePair,
        required=False,
        many=True,
        description='List of metadata key-value pairs used by the consumer '
        'to associate meaningful metadata to the related '
        'virtualised resource.')
示例#28
0
文件: schema.py 项目: cnxtech/5gt-mtp
class VirtualCpu(Schema):
    """The virtual CPU(s) of the virtualised compute."""
    cpuArchitecture = fields.Str(
        required=True,
        description='CPU architecture type. Examples are x86, ARM.')
    numVirtualCpu = fields.Int(required=True,
                               description='Number of virtual CPUs.')
    cpuClock = fields.Number(
        required=True,
        description='Minimum CPU clock rate (e.g. in MHz) available for the '
        'virtualised CPU resources.')
    virtualCpuOversubscriptionPolicy = fields.Str(
        required=True,
        description='The CPU core oversubscription policy, e.g. the relation '
        'of virtual CPU cores to physical CPU cores/threads. The '
        'cardinality can be 0 if no policy has been defined '
        'during the allocation request.')
    virtualCpuPinning = fields.Nested(
        VirtualCpuPinning,
        required=True,
        description='The virtual CPU pinning configuration for the '
        'virtualised compute resource.')
示例#29
0
class ReservedComputePool(Schema):
    numCpuCores = fields.Int(
        required=True,
        description='Number of CPU cores that have been reserved.')
    numVcInstances = fields.Int(
        required=True,
        description='Number of virtual container instances that have been '
        'reserved.')
    virtualMemSize = fields.Number(
        required=True,
        description='Size of virtual memory that has been reserved.')
    computeAttributes = fields.Nested(
        ReservedVirtualComputeAttributes,
        required=True,
        description='Information specifying additional attributes of the '
        'virtual compute resource that have been reserved.')
    zoneId = fields.Str(
        required=True,
        description='References the resource zone where the virtual compute '
        'resources have been reserved. Cardinality can be 0 to '
        'cover the case where reserved compute resources are not '
        'bound to a specific resource zone.')
示例#30
0
class ReservedVirtualNetworkAttributes(Schema):
    bandwidth = fields.Number(required=True,
                              description='Minimum network bitrate (in Mbps).')
    networkType = fields.Str(
        required=True,
        description='The type of network that maps to the virtualised network '
        'that has been reserved. Examples are: "local", "vlan", '
        '"vxlan", "gre", etc.')
    segmentType = fields.Str(
        required=True,
        description='The isolated segment for the virtualised network that '
        'has been reserved. For instance, for a "vlan" '
        'networkType, it corresponds to the vlan identifier; and '
        'for a "gre" networkType, this corresponds to a gre key.')
    isShared = fields.Bool(
        required=True,
        description='It defines whether the virtualised network that has been '
        'reserved is shared among consumers.')
    metadata = fields.Nested(
        KeyValuePair,
        many=True,
        description='List of metadata key-value pairs used by the consumer to '
        'associate meaningful metadata to the related virtualised '
        'resource.')