See also:Â Hardware Platform Enablement In ONAP
Can we use the TOSCA Specs Normatives with the HPA requirements?
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#######capability_types: Basic specifications of hadware capabilities #### capability_types: onaptosca.capabilities.infrastructure.CPUCompute: derived_from: tosca.capabilities.Root description: basic processor capabilities properties: num_cpusname: type: integerstring required: false num_cpus: type: integer required: false constraints: - greater_or_equal: 1 cpu_frequency: type: scalar-unit.frequency required: false constraints: - greater_or_equal: 0.1 GHz onap.capabilities.infrastructure.Memorydisk_size: derived_from type: tosca.capabilities.Rootscalar-unit.size description: basic memoryrequired: capabilitiesfalse properties: constraints: - greater_or_equal: 0 MB mem_size: type: scalar-unit.size required: false constraints: - greater_or_equal: 0 MB tosca.capabilities.Container: derived_from: tosca.capabilities.Compute onaptosca.capabilities.infrastructure.Storage: derived_from: tosca.capabilities.Root descriptionproperties: basic storage specifications propertiesname: storage_size type: string typerequired: scalar-unit.size false required: false constraints: - greater_or_equal: 0 MB onap.capabilities.infrastructure.IO: tosca.relationships.HostedOn: derived_from: tosca.capabilitiesrelationships.Root valid_target_types: description: basic IO specifications onap.capabilities.infrastructure.NIC: derived_from: tosca.capabilities.Root description: basic networking interface characteristics [ tosca.capabilities.Container ] # tosca.relationships.HostedOn: # - impacts declarative workflow # - based on tosca.capabilities.Container |
Critics of TOSCA Spec Normatives:
- tosca.capabilities.Container inherits from Compute!!!
- tosca.capabilities.Compute, property 'name' - we don't actually need it?
- tosca.capabilities.Storage is not similar to the tasca Compute - it only includes the 'name' property, does nor specify any storage quantifiers like size etc.
- in TOSCA Specs, Storage is not an infrastructure-level requirement; it is rather a kind of application-level (attachable, with an initial image), required by (attached to) other application nodes
- Tosca Compute capability is a mix of CPU+Mem. Don't we want to keep them apart for greater flexibility?
- TOSCA Specs does not have requirements for I/O
- TOSCA Specs normatives do not provide all information items required by the ETSI and IM
- tosca.capabilities.Compute and *.Storage bring with them unnecessary inheritance, coupling with relationship types, may affect the TOSCA declarative workflows
Proposed solution
- Model the basic HPA requirements with TOSCA capability types. VDUs will have requirements of these capability types. These HPA requirements will never be satisfied within the VNF and Service models, the orchestrator will do that in run-time
- Abstain from using tosca.capability.Compute as it does not fully match the requirements
- Define special ONAP capability types, separate for each of these categories:Â CPU, Memory, Storage, I/O, networking. These capability types express the most basic hardware characteristics. They also should be simple, flat bags of strictly named properties, all properties of primitive data types with clear restrictions.
- Derive from the basic capability types an additional level of capabilities, with advanced (HPA) details. As detailed as they seem, these capabilities are still generic, with strict definitions of properties that are shared by the major hardware vendors. In addition to the strictly-typed properties, the HPA-level capabilities will also have a json-formatted property in order to allow for even greater customization flexibility.
- Allow for further customization of the HPA-level capabilities into vendor-specific capabilities. These vendor-specific customized capability types may extend their HPA-level generic base by adding new properties and providing new constraints for the existing properties. In addition to the refinement of the strictly defined properties, the vendor-specific capabilities may provide their own validation schema for the json-formatted "flexible" property.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
####### Basic specifications of hadware capabilities ####
capability_types:
onap.capabilities.infrastructure.CPU:
derived_from: tosca.capabilities.Root
description: basic processor capabilities
properties:
num_cpus:
type: integer
required: false
constraints:
- greater_or_equal: 1
cpu_frequency:
type: scalar-unit.frequency
required: false
constraints:
- greater_or_equal: 0.1 GHz
onap.capabilities.infrastructure.Memory:
derived_from: tosca.capabilities.Root
description: basic memory capabilities
properties:
mem_size:
type: scalar-unit.size
required: false
constraints:
- greater_or_equal: 0 MB
onap.capabilities.infrastructure.Storage:
derived_from: tosca.capabilities.Root
description: basic storage specifications
properties:
storage_size:
type: scalar-unit.size
required: false
constraints:
- greater_or_equal: 0 MB
onap.capabilities.infrastructure.IO:
derived_from: tosca.capabilities.Root
description: basic IO specifications
onap.capabilities.infrastructure.NIC:
derived_from: tosca.capabilities.Root
description: basic networking interface characteristics
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
####### Advanced hardware capabilities, with more details ####
capability_types:
onap.capabilities.infrastructure.hpa.CPU:
derived_from: onap.capabilities.infrastructure.CPU
description: detailed processor capabilities for hardware-aware VNF vendors
properties:
schema_selector:
description: vendor+architecture, for example, Intel64
type: string
required: true
schema_version:
type: version
required: false
custom_features:
description: additional features, formatted as JSON, validated against a schema
type: json
constraints:
- schema: http://schema.url
required: false
simultaneousMultiThreading:
type: boolean
description: |
The use of Simultaneous Multi-Threading HW is an efficient way to
increase the compute capacity of a platform. SMT HW threads share
some CPU core resources. In some VDU implementations, it may be
necessary to very explicitly control the HW thread allocation on
a platform. This could be to help ensure locality in data caches
or as a mechanism to enhance determinism
required: false
logicalCpuPinningPolicy:
type: string
constraints:
- valid_values: [Dedicated, Shared]
required: false
logicalCpuThreadPinningPolicy:
type: string
constraints:
- valid_values:
- Isolate # Allocate on different execution units.
- Prefer # co-location of vCPUs to physical execution units
- Require # co-location of vCPUs to physical execution units
required: false
instructionSetExtensions:
type: string
constraints:
- valid_values:
- Isolate # Allocate on different execution units.
- Prefer # co-location of vCPUs to physical execution units
- Require # co-location of vCPUs to physical execution units
required: false
hypervisorConfiguration:
type: string
required: false
computeRas:
description: Reliability, Availability, Serviceability (RAS)
type: string
required: false
| ||||||
Code Block | ||||||
| ||||||
####### Advanced hardware capabilities, with more details #### capability_types: onap.capabilities.infrastructure.hpa.CPUMemory: derived_from: onap.capabilities.infrastructure.CPUMemory description: detailedHPA-level processormemory capabilities for hardware-aware VNF vendors properties: schema_selector: description: vendor+architecture, for example, Intel64 type: string required: true schema_version: type: version required: false custom_features: description: additional features, formatted as JSON, validated against a schema type: json constraints:required: false memoryPageSize: - schematype: http://schema.urlscalar-unit.size required: false simultaneousMultiThreadingmemoryAllocationPolicy: type: booleanstring descriptionconstraints: | The use of Simultaneous Multi-Threading HW is an efficient way to - valid_values: - StrictLocal increase the compute capacity of a platform. SMT HW threads share - PreferredLocal some CPUrequired: corefalse resources. In some VDU implementations, itmemoryBandwidth: may be description: Agreed unit of memory necessarybandwidth to very explicitly control the HW thread allocation on type: scalar-unit.size required: false a platform. This could be toprocessorCacheAllocation: help ensure locality in data caches description: Agreed unit of processor cache or as a mechanism to enhance determinismtype: string required: false logicalCpuPinningPolicymemoryType: typedescription: string Type constraints:of memory - valid_values: [Dedicated, Shared]type: string required: false logicalCpuThreadPinningPolicymemorySpeed: type: stringdescription: Agreed unit of memory speed constraintstype: string required: false - valid_valuesmemoryRas: description: - Isolatetype: string # Allocate on different execution units. required: false localNumaMemory: - Prefer type: boolean # co-location of vCPUs to physical executionrequired: unitsfalse onap.capabilities.infrastructure.hpa.Storage: derived_from: onap.capabilities.infrastructure.Storage description: HPA-level Requirestorage specifications # co-location of vCPUs to physical execution units properties: schema_selector: requireddescription: false instructionSetExtensions:vendor+architecture, for example, Intel64 type: string constraintsrequired: true schema_version: - valid_values: type: version required: false - Isolate # Allocatecustom_features: on different execution units. description: additional features, formatted as JSON, validated against a schema - Prefer # co-location oftype: vCPUsjson to physical execution units required: false - RequirestorageIops: # co-location of vCPUs to physical executiontype: unitsinteger required: false hypervisorConfiguration constraints: type- greater_or_equal: string0 storageResilencyMechanism: required: false type: computeRas:string descriptionrequired: Reliability, Availability, Serviceability (RAS) false description: Erasure code based type: stringback-end, triple replication required: false onap.capabilities.infrastructure.hpa.MemoryIO: derived_from: onap.capabilities.infrastructure.MemoryIO description: HPA-level memoryIO capabilitiescharacteristics properties: schema_selector: description: vendor+architecture, for example, Intel64 type: string required: true schema_version: type: version required: false custom_features: description: additional features, formatted as JSON, validated against a schema type: json required: false memoryPageSize: formatted as JSON, validated against a schema type: scalar-unit.sizejson required: false memoryAllocationPolicypciVendorId: typedescription: string PCI-SIG vendor ID for the device constraints: type: string - valid_valuesrequired: false pciDeviceId: description: PCI-SIG StrictLocaldevice ID for the device - PreferredLocal type: string required: false memoryBandwidthpciNumDevices: description: Agreed Number unitof ofPCI memorydevices bandwidthrequired. type: scalar-unit.sizestring required: false processorCacheAllocationpciAddress: description: AgreedGeographic unitlocation of processorthe cache PCI device via the standard PCI-SIG addressing type: stringmodel of Domain:Bus:device:function requiredtype: falsestring memoryType: required: false description: Type of memory pciDeviceLocalToNumaNode Boolean type: string required: false memorySpeed onap.capabilities.infrastructure.hpa.NIC: derived_from: onap.capabilities.infrastructure.NIC description: Agreed unit of memory speedHPA-level networking interface characteristics properties: schema_selector: typedescription: stringvendor+architecture, for example, Intel64 requiredtype: falsestring memoryRas required: true descriptionschema_version: type: stringversion required: false localNumaMemorycustom_features: typedescription: boolean additional features, formatted as JSON, validated against a required: falseschema onap.capabilities.infrastructure.hpa.Storage: derived_from: onap.capabilities.infrastructure.Storage descriptiontype: HPA-level storage specifications json propertiesrequired: false schema_selectornicFeature: description: vendor+architecture, for example, Intel64 Long list of NIC related items such as LSO, LRO, RSS, RDMA, etc. type: map entry_schema: string required: truefalse schema_versiondataProcessingAccelerationLibray: typedescription: Name and version of the data processing acceleration library required:. false Orchestration can match any NIC that custom_features: is known to be compatible with the specified description:library. additional features, formatted as JSON, validated against atype: schemastring typerequired: jsonfalse interfaceType: required: false description: storageIops:Virtio, PCI-Passthrough, SR-IOV, E1000, RTL8139, PCNET, etc. type: integerstring required: false constraints |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
capability_types: com.intel.capabilities.hpa.CPU: - greater_or_equal: 0derived_from: onap.capabilities.infrastructure.hpa.CPU storageResilencyMechanismschema_selector: type: string required: falsetrue descriptionconstraints: Erasure code based back-end, triple replication onap.capabilities.infrastructure.hpa.IO: derived_from: onap.capabilities.infrastructure.IO # fixed value for this vendor description: HPA-level IO characteristics - properties:equal_to: Intel64 schema_selectorversion: descriptiontype: vendor+architecture, for example, Intel64version typerequired: stringfalse requiredconstraints: true - schemaequal_versionto: 2.0 typeinstructionSetExtensions: version requiredtype: falsestring custom_features: constraints: # changes property description:definitions additional features, formatted as JSON, validated against a schema - valid_values: [aes, sse, avx, cat, type: jsoncmt, mbm] required: false pciVendorId: description: PCI-SIG vendor ID for the devicea_well_known_property_of_this_vendor: # adds new strictly typed properties type: stringinteger required: false |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
node_types: onap.nodes.VDU: pciDeviceId: derived_from: onap.nodes.Resource descriptioncapabilities: PCI-SIG device ID for the devicehost: type: stringonap.capabilities.Container requiredrequirements: false - pciNumDevicescpu: description: Number of PCI devices required.capability: onap.capabilities.infrastructure.CPU: type: string required: falseoccurrences: [0..UNBOUNDED] pciAddress- memory: description: Geographic location of the PCI device via the standard PCI-SIG addressing model of Domain:Bus:device:function capability: onap.capabilities.infrastructure.Memory: occurrences: [0..UNBOUNDED] - storage: type: string requiredcapability: false pciDeviceLocalToNumaNode Boolean onap.capabilities.infrastructure.Storage: typeoccurrences: string[0..UNBOUNDED] - requiredio: false onap.capabilities.infrastructure.hpa.NIC: derived_from: capability: onap.capabilities.infrastructure.NICIO: description: HPA-level networking interface characteristics propertiesoccurrences: schema_selector: [0..UNBOUNDED] - nic: description: vendor+architecture, for example, Intel64 capability: onap.capabilities.infrastructure.NIC: type: string occurrences: [0..UNBOUNDED] |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
node_templates: vdu_123: type: onap.nodes.VDU required: true schema_versioncapabilities: typehost: version requiredrequirements: false - custom_featuresmemory: description: additional features, formatted as JSON, validated against a schema node_filter: typecapabilities: json required: false nicFeature- onap.capabilities.infrastructure.Memory: description: Long list of NIC related items such as LSO, LRO, RSS, RDMA, etc. properties: type: map - entry_schema: stringmem_size: {greater_or_equal: 2MB} required: false - cpu: dataProcessingAccelerationLibray: descriptionnode_filter: Name and version of the data processing acceleration library required.capabilities: Orchestration can match any NIC that is known to be compatible with the specified library.- onap.capabilities.infrastructure.hpa.CPU: type: string requiredproperties: false interfaceType: description: Virtio, PCI-Passthrough, SR-IOV, E1000, RTL8139, PCNET, etc. schema_selector: type: string required: false | ||||||
Code Block | ||||||
| ||||||
com.intel.capabilities.hpa.CPU: derived_from: onap.capabilities.infrastructure.hpa.CPU constraints: # fixed value for this vendor schema_selector: type: string required: true - equal_to: Intel64 constraints: # fixed value for this vendor - equalschema_toversion: Intel64 schema_version: typeconstraints: version required: false constraints: - greater_or_equal_to: 2.0 0 instructionSetExtensions: - typecustom_features: string constraints: # changes property definitions constraints: - valid_values: [aes, sse, avx, cat, cmt, mbm] required: false - a_well_known_property_of_this_vendor: # adds new strictly typed properties equals_to: {,,.sigjigigirgigmirig} type: integer - required: falseschema: http://json.schema.url |
Implications
- Compliance with TOSCA 1.2 for using JSON properties
- Support for the 'node_filter' construct
- New languages to understand: JSON Schema, XML Schema, etc