Versions Compared

Key

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

...

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:
      - cpu:
          capability: onap.capabilities.infrastructure.CPU:
          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:
  - cpu:
      node_filter:
        capabilities: onap.capabilities.infrastructure.CPU
        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:
  - cpu:
      node_filter:
        capabilities: onap.capabilities.infrastructure.CPU
        properties:
          num_cpus:
            - greater_or_equal: 2
          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"
            }