Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

All infrastructure capability types inherit from the basic The Data Model reflects the IM's The ComputeDesc and MemoryDesc elements as the TOSCA capability type onap.capabilities.Compute.Infrastructure:

Code Block
titleBasic infrastructure capability type
linenumberstrue
capability_types:
  onap.capabilities.InfrastractureCompute:
    derived_from: tosca.capabilities.RootContainer
    description: a basic description of infrastructurethe required hardware resources
    properties:
      architecture:
        description: vendor+architecture, for example, Intel64num_cpus:
        type: stringinteger
        required: false
         
      custom_features:
        descriptionconstraints:
|           Additional features description, serialized in a well-known format.
        type: string
        required: false          

Since all HPA-oriented capability types are derived from this basic type, they will all inherit its properties:

  • architecture - allows the VFC vendors to focus their requirements on a specific hardware architecture, for example "Intel x86".
  • custom_features - an opaque container for a list of feature definitions. Any text, the only limitation is that it should not break the YAML/TOSCA formatting. The contents of this property is actually not part of the TOSCA model!

Based on this generic onap,capabilities.Infrastructure capability type, the Data Model introduces a family of types that provide TOSCA support for the Informational Model elements.

Code Block
titleonap.capabilities.infrastructure.CPU
linenumberstrue
collapsetrue
capability_types:
  onap.capabilities.infrastructure.CPU: greater_or_equal: 1
      derived_from: onap.capabilities.Infrastracture
    description: processor capabilities
    properties:
      num_cpuscpu_frequency:
        type: integerscalar-unit.frequency
        required: false
        constraints:
          - greater_or_equal: 0.1 GHz
     cpu mem_frequencysize:
        type: scalar-unit.frequencysize
        required: false
        constraints:
          - greater_or_equal: 0.1 GHz

Code Block
titleonap.capabilities.infrastructure.Memory
linenumberstrue
collapsetrue
capability_types:
  onap.capabilities.infrastructure.Memory:MB
      derived_from: onap.capabilities.Infrastracture
    description: memory capabilities
    properties:
      mem_storage_size:
        type: scalar-unit.size
        required: false
        constraints:
          - greater_or_equal: 0 MB
Code Block
titleonap.capabilities.infrastructure.Storage
linenumberstrue
collapsetrue
capability_types:   onap.capabilities.infrastructure.Storage:     derivedio_frombitrate:
onap.capabilities.Infrastracture     description: storage specifications     propertiesdescription: bits      storage_size:per second
        type: scalar-unit.sizeinteger
        required: false
        constraintsarchitecture:
          - greater_or_equaldescription: 0 MB
Code Block
titleonap.capabilities.infrastructure.IO
linenumberstrue
collapsetrue
capability_types:
  onap.capabilities.infrastructure.IO:vendor+architecture, for example, Intel64
      derived_from: onap.capabilities.Infrastracture
    description type: basicstring
IO specifications       bitraterequired: false        description: bits per
second         typecustom_features:
integer         requireddescription: false
Code Block
titleonap.capabilities.infrastructure.NIC
linenumberstrue
collapsetrue
capability_types:|
        onap.capabilities.infrastructure.NIC:  Additional features  derived_from: onap.capabilities.Infrastracture
    description: basic IO specificationsdescription, serialized in a well-known format.
        type: string
bitrate:         descriptionrequired: bitsfalse per second        
type: integer
        required: false

In addtition to the obvious properties required by the IM, this capability type also includes properties that allow for easy customization:

  • architecture - allows the VFC vendors to focus their requirements on a specific hardware architecture, for example "Intel x86".
  • custom_features - an opaque container for a list of feature definitions. Any text, the only limitation is that it should not break the YAML/TOSCA formatting. The contents of this property is actually not part of the TOSCA model!

In spite the changes made in the capability type defininitions, the definition of the node type onap.nodes.Container  does not change:

Code Block
titleonap.nodes.Container
linenumberstrue
collapsetrue
node_types:
  # the very base of the hierarchy of VDU types
  onap.nodes.Container:
    derived_from: onap.nodes.Resource
    artifacts:
      container_image:
        type: tosca.artifacts.Deployment
        description: an image used to launch the Container
    interfaces:
      Standard:
        start:
          implementation: container_image
    capabilities:
      host:
        type: tosca.capabilities.Container  # the TOSCA Specs type is good enough
        occurrences: [0..UNBOUNDED]
    requirements:
      - cpuhost:
          capability: onap.capabilities.infrastructure.CPUCompute:
          occurrences: [0..1]
      - memory:
          capability: onap.capabilities.infrastructure.Memory:
          occurrences: [0..UNBOUNDED]
      - storage:
          capability: onap.capabilities.infrastructure.Storage:
          occurrences: [0..UNBOUNDED]
     
- io:
          capability: onap.capabilities.infrastructure.IO:
          occurrences: [0..UNBOUNDED]
      - nic:
          capability: onap.capabilities.infrastructure.NIC:
          occurrences: [0..UNBOUNDED]


Examples of requirement assignments in their simplest form:

Code Block
titleRequirement for at least 2 vCPUs
linenumberstrue
collapsetrue
# .. a node template, omitted...
requirements:
  - cpuhost:
      node_filter:
        capabilities: onap.capabilities.infrastructure.CPUCompute
        properties:
          num_cpus:
            - greater_or_equal: 2


Examples of requirement assignments in the combined (TOSCA properties + custom_features) form:

Code Block
titleRequirement for at least 2 vCPUs + bunch of Intel-specific features
linenumberstrue
collapsetrue
# .. a node template, omitted...
requirements:
  - cpuhost:
      node_filter:
        capabilities: onap.capabilities.infrastructure.CPUCompute
        properties:
          num_cpus:
            - greater_or_equal: 2
   
      architecture:             - equal: IntelXYZ
          custom_features: |
            {
              "simultaneousMultiThreading": true,
              "simultaneousThreads": 10,
              "logicalCpuPinningPolicy": "Dedicated",
              "logicalCpuThreadPinningPolicy": "Prefer",
              "instructionSetExtensions": ["aes", "sse", "ddio"],
              "directIoAccessToCache": "dca",
              "accelerator": "whatever you like",
              "measuredLaunchEnvironment": "",
              "secureEnclave": "",
              "hypervisorConfiguration": {
                "memoryCompaction": "best",
                "kernelSamePageMerging": true
              },
              "computeRas": "pciDetectedAndCorrectedErrors"
            }

In the example above the text in the custom_featurefeatures property is actually a JSON document.

...

Code Block
titleExternal JSON schema in a TOSCA requirement assignment
linenumberstrue
collapsetrue
requirements:
  - cpuhost:
      node_filter:
        capabilities: onap.capabilities.infrastructure.CPU
        properties:
          num_cpus:
            - greater_or_equal: 2
          custom_features: 
            - schema: http://my.domain.com/url/datatype.constraints.schema.json

...