From d8a108e7b3d1396f054199e0e56798cc281c98e7 Mon Sep 17 00:00:00 2001 From: prithiv Date: Tue, 1 Nov 2016 09:45:27 +0000 Subject: [PATCH] Add CPU Mode Metadata Def Creates Metadata def for CPU Mode. The allowed modes are "none", "host-passthrough", "custom" and "host-model". Change-Id: Id7a01546334ddea952708143c5dfc7861353f2fc Closes-Bug: 1636243 --- etc/metadefs/compute-cpu-mode.json | 29 +++++++++++++++++++++ etc/metadefs/glance-common-image-props.json | 5 ++++ 2 files changed, 34 insertions(+) create mode 100644 etc/metadefs/compute-cpu-mode.json diff --git a/etc/metadefs/compute-cpu-mode.json b/etc/metadefs/compute-cpu-mode.json new file mode 100644 index 0000000000..5bbe1de910 --- /dev/null +++ b/etc/metadefs/compute-cpu-mode.json @@ -0,0 +1,29 @@ +{ + "namespace": "OS::Compute::CPUMode", + "display_name": "CPU Mode", + "description": "This provides the preferred CPU Model to be used when booting up a guest VM.", + "visibility": "public", + "resource_type_associations": [ + { + "name": "OS::Glance::Image", + "prefix": "hw_" + }, + { + "name": "OS::Nova::Flavor", + "prefix": "hw:" + } + ], + "properties": { + "cpu_mode": { + "title": "CPU Mode", + "description": "Type of CPU Mode.", + "type": "string", + "enum": [ + "none", + "host-model", + "host-passthrough", + "custom" + ] + } + } +} diff --git a/etc/metadefs/glance-common-image-props.json b/etc/metadefs/glance-common-image-props.json index 74c251dbea..b2263a0cea 100644 --- a/etc/metadefs/glance-common-image-props.json +++ b/etc/metadefs/glance-common-image-props.json @@ -33,6 +33,11 @@ "description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project). Specify only a recognized value for this field. Deprecated values are listed to assist you in searching for the recognized value.", "type": "string" }, + "hw_cpu_mode": { + "title": "CPU Mode", + "description": "This specifies the CPU Mode for the guest vm", + "type": "string" + }, "os_version": { "title": "OS Version", "description": "Operating system version as specified by the distributor. (for example, '11.10')",