Versions Compared

Key

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

...

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
          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_feature property is actually a JSON document.

The hardware vendors are encouraged to provide a well-defined schema (JSON Schema for JSON-formatted texts, DTD or XML Schema for XML-formatted texts, etc) to govern syntax of theirĀ custom_feature texts. For example, a JSON schema for the CPU custom feature fron the example above may look like this:

Code Block
languagejs
titleExample of JSON Schema for CPU custom features
linenumberstrue
collapsetrue
{
  "definitions": {
	"hypervisorConfiguration": {
		"type": "object",
		"properties": {
			"memoryCompaction": { "enum": [ "best", "worst", "optimal" ] },
			"kernelSamePageMerging": {"type": "boolean" }
		}
	}
  },
  
  "type": "object",
  
  "properties": {
	"simultaneousMultiThreading": {"type": "boolean"},
	"simultaneousThreads": {"type": "integer", "minimum": 1, "maximum": 4},
	"logicalCpuPinningPolicy": {"type": "string" },
    "hypervisorConfiguration": { "$ref": "#/definitions/hypervisorConfiguration" },
	"instructionSetExtensions": {
		"type": "array", 
		"items": {
			"type": "string",
			"enum": [ "aes", "sse", "avx", "cat", "cmt", "mbm", "ddio", "smt", "rdrand" ]
		}
	}
  }
}