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 constraintsnum_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 memory capabilities required: properties:false 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: scalar-unit.sizestring 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
| ||||||
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,Require Intel64 # co-location of vCPUs to physical type:execution stringunits required: truefalse schema_versioninstructionSetExtensions: type: versionstring requiredconstraints: false custom_features: description: additional features, formatted as JSON, validated against a schema - valid_values: type:- json Isolate # Allocate on different execution constraints:units. - schema: http://schema.url - Prefer # required: false simultaneousMultiThreading:co-location of vCPUs to physical execution units type: boolean - Require description: |# co-location of vCPUs to physical execution units The use of Simultaneous Multi-Threading HW is an efficient way to required: false hypervisorConfiguration: type: string increase the compute capacity of a platform. SMTrequired: HWfalse threads share computeRas: some CPUdescription: core resources. In some VDU implementations, it may be Reliability, Availability, Serviceability (RAS) type: string necessary to very explicitly control the HW thread allocation on required: false onap.capabilities.infrastructure.hpa.Memory: derived_from: onap.capabilities.infrastructure.Memory description: HPA-level memory capabilities a platform.properties: This could be to help ensureschema_selector: locality in data caches description: vendor+architecture, for example, Intel64 or as a mechanism to enhancetype: determinismstring required: falsetrue logicalCpuPinningPolicyschema_version: type: stringversion constraintsrequired: false custom_features: - valid_values: [Dedicated, Shared] required: false description: additional features, formatted as JSON, validated against a schema logicalCpuThreadPinningPolicytype: json typerequired: string false constraintsmemoryPageSize: type: scalar- valid_values: unit.size required: false -memoryAllocationPolicy: Isolate # Allocate on different executiontype: units.string constraints: - Prefer # co-location of vCPUs to physical execution units - valid_values: - StrictLocal - Require # co-location of vCPUs to physical- executionPreferredLocal units required: false memoryBandwidth: instructionSetExtensions: description: Agreed unit of memory bandwidth type: stringscalar-unit.size constraintsrequired: false processorCacheAllocation: - valid_values: description: Agreed unit of processor cache type: -string Isolate # Allocate on different executionrequired: units.false memoryType: -description: PreferType of memory # co-location of vCPUs to physical executiontype: unitsstring required: false memorySpeed: - Require # co-location ofdescription: vCPUsAgreed tounit physicalof executionmemory unitsspeed requiredtype: falsestring hypervisorConfiguration required: false typememoryRas: string requireddescription: false computeRastype: string descriptionrequired: Reliability, Availability, Serviceability (RAS) false localNumaMemory: type: stringboolean required: false onap.capabilities.infrastructure.hpa.MemoryStorage: derived_from: onap.capabilities.infrastructure.MemoryStorage description: HPA-level memorystorage capabilitiesspecifications 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 storageIops: type: integer memoryPageSizerequired: false constraints: type: scalar-unit.size required- greater_or_equal: false0 memoryAllocationPolicystorageResilencyMechanism: type: string constraintsrequired: false description: Erasure code based back- valid_values: end, triple replication onap.capabilities.infrastructure.hpa.IO: derived_from: onap.capabilities.infrastructure.IO description: HPA-level StrictLocalIO characteristics properties: schema_selector: - PreferredLocal description: vendor+architecture, for example, Intel64 required: false memoryBandwidthtype: string descriptionrequired: Agreedtrue unit of memory bandwidthschema_version: type: scalar-unit.sizeversion required: false processorCacheAllocationcustom_features: description: Agreed unit of processor cache additional features, formatted as JSON, validated against a schema type: stringjson required: false memoryTypepciVendorId: description: Type of memory PCI-SIG vendor ID for the device type: string required: false memorySpeedpciDeviceId: description: Agreed unit of memory speedPCI-SIG device ID for the device type: string required: false memoryRaspciNumDevices: description: type: string required: false Number of PCI devices localNumaMemory:required. type: booleanstring required: false onap.capabilities.infrastructure.hpa.StoragepciAddress: derived_from: onap.capabilities.infrastructure.Storage description: HPA-level storage specifications properties: description: Geographic location of the PCI device via the standard PCI-SIG addressing model of Domain:Bus:device:function schema_selectortype: string descriptionrequired: vendor+architecture, for example, Intel64false pciDeviceLocalToNumaNode Boolean type: string required: truefalse schema_version onap.capabilities.infrastructure.hpa.NIC: derived_from: onap.capabilities.infrastructure.NIC typedescription: version HPA-level networking interface characteristics requiredproperties: false customschema_featuresselector: description: additional featuresvendor+architecture, formattedfor as JSONexample, validated against a schemaIntel64 type: jsonstring required: falsetrue schema_version: storageIops type: version typerequired: integerfalse custom_features: required: false description: additional features, formatted as JSON, constraints: validated against a schema - greater_or_equaltype: 0json storageResilencyMechanism required: false typenicFeature: string requireddescription: false Long list of NIC related items such as description: Erasure code based back-end, triple replicationLSO, LRO, RSS, RDMA, etc. onap.capabilities.infrastructure.hpa.IO: type: map derived_from: onap.capabilities.infrastructure.IO descriptionentry_schema: HPA-level IO characteristics string propertiesrequired: false schema_selectordataProcessingAccelerationLibray: description: vendor+architecture, for example, Intel64 type: string required: true schema_version:Name and version of the data processing acceleration library required. Orchestration can match any NIC that is known to be compatible with the specified library. type: versionstring required: false custom_featuresinterfaceType: description: additional features, formatted as JSON, validated against a schema type: json required: false pciVendorId:Virtio, PCI-Passthrough, SR-IOV, E1000, RTL8139, PCNET, etc. descriptiontype: PCI-SIG vendor ID for the devicestring type: string required: false |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
capability_types: com.intel.capabilities.hpa.CPU: requiredderived_from: falseonap.capabilities.infrastructure.hpa.CPU pciDeviceIdschema_selector: descriptiontype: PCI-SIG device ID for the device string required: true type: string constraints: # fixed value for required:this falsevendor pciNumDevices: - equal_to: Intel64 description: Number of PCI devices required. schema_version: type: stringversion required: false pciAddress: descriptionconstraints: Geographic location of the PCI device via the standard PCI-SIG addressing model of Domain:Bus:device:function equal_to: 2.0 typeinstructionSetExtensions: string requiredtype: falsestring pciDeviceLocalToNumaNode Boolean constraints: # changes property type: stringdefinitions required: false - valid_values: [aes, sse, avx, cat, onap.capabilities.infrastructure.hpa.NIC: cmt, mbm] derived_from: onap.capabilities.infrastructure.NIC descriptionrequired: HPA-levelfalse networking interface characteristics properties: schema_selector:a_well_known_property_of_this_vendor: # adds new strictly typed properties descriptiontype: vendor+architecture, for example, Intel64 integer required: false |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
node_types: onap.nodes.VDU: type: string requiredderived_from: trueonap.nodes.Resource schema_versioncapabilities: typehost: version requiredtype: falseonap.capabilities.Container custom_featuresrequirements: - cpu: description: additional features, formatted as JSON, validated against a schema capability: onap.capabilities.infrastructure.CPU: type occurrences: json[0..UNBOUNDED] - requiredmemory: false nicFeature: capability: onap.capabilities.infrastructure.Memory: description: Long list of NIC related items such as LSO, LRO, RSS, RDMA, etc. occurrences: [0..UNBOUNDED] - storage: type capability: map onap.capabilities.infrastructure.Storage: entry_schemaoccurrences: string[0..UNBOUNDED] - requiredio: false dataProcessingAccelerationLibray: capability: onap.capabilities.infrastructure.IO: description: Name and version of the data processing acceleration library required. Orchestration can match any NIC that is known to be compatible with the specified library. occurrences: [0..UNBOUNDED] - nic: capability: onap.capabilities.infrastructure.NIC: occurrences: [0..UNBOUNDED] |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
node_templates: vdu_123: type: onap.nodes.VDU type: string requiredcapabilities: false interfaceTypehost: description: Virtio, PCI-Passthrough, SR-IOV, E1000, RTL8139, PCNET, etc. requirements: - memory: type node_filter: string required: false | ||||||
Code Block | ||||||
| ||||||
capability_types: com.intel.capabilities.hpa.CPU: derived_from:- onap.capabilities.infrastructure.hpa.CPUMemory: schema_selector: type: string requiredproperties: true constraints: # fixed value for this vendor - mem_size: {greater_or_equal: 2MB} - equal_to: Intel64 schema_version- cpu: type: version node_filter: required: false capabilities: constraints: - equal_to: 2.0onap.capabilities.infrastructure.hpa.CPU: instructionSetExtensions: type: string properties: constraints: # changes property definitions - validschema_valuesselector: [aes, sse, avx, cat, cmt, mbm] required: false a_well_known_property_of_this_vendorconstraints: # addsfixed newvalue strictlyfor typedthis propertiesvendor type: integer required: false | ||||||
Code Block | ||||||
| ||||||
node_types: onap.nodes.VDU: - derived_from: onap.nodes.Resource equal_to: Intel64 capabilities: host: - typeschema_version: onap.capabilities.Container requirements: - cpu: capability: onap.capabilities.infrastructure.CPU constraints: occurrences: [0..UNBOUNDED] - memory: - capability: onap.capabilities.infrastructure.Memory:greater_or_equal: 2.0 occurrences: [0..UNBOUNDED] - storagecustom_features: capability: onap.capabilities.infrastructure.Storage: occurrences: [0..UNBOUNDED] constraints: - io: capability: onap.capabilities.infrastructure.IO: - occurrencesequals_to: [0..UNBOUNDED]{,,.sigjigigirgigmirig} - nic: capability: onap.capabilities.infrastructure.NIC: - occurrencesschema: [0..UNBOUNDED]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