Property name mapping

Change-Id: I8c30b4443b7ff9ed70e4cb4ebaa0be60455774df
This commit is contained in:
Lakshmi N Sampath 2014-05-08 20:25:59 -07:00
parent bb8dfd15cf
commit e81a4080e7
11 changed files with 2215 additions and 13 deletions

View File

@ -16,6 +16,7 @@
from oslo.config import cfg
from graffiti.common import driver_factory
from graffiti.common import utils
# Server Specific Configurations
server = {
@ -148,3 +149,6 @@ pydevd = {
# Discover and load drivers
df = driver_factory.DriverFactory()
# Load Out of the box Dictionary
utils.load_dictionary()

View File

@ -0,0 +1,196 @@
{ "capability_type_list" :
[
{
"name": "Apache",
"namespace": "SAMPLES",
"description": "The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.",
"derived_from": {
"name": "Software",
"namespace": "SAMPLES"
},
"properties": {}
},
{
"name": "Database",
"namespace": "SAMPLES",
"description": "Database management systems (DBMSs) are specially designed software applications that interact with the user, other applications, and the database itself to capture and analyze data. A general-purpose DBMS is a software system designed to allow the definition, creation, querying, update, and administration of databases.",
"derived_from": {
"name": "Software",
"namespace": "SAMPLES"
},
"properties": {
"listen_port": {
"type": "integer",
"description": "",
"required": false,
"confidential": false,
"minimum": 1,
"maximum": 65535
}
}
},
{
"name": "GPU",
"namespace": "SAMPLES",
"description": "",
"properties": {}
},
{
"name": "LAMP",
"namespace": "SAMPLES",
"description": "",
"derived_from": {
"name": "SoftwareStack",
"namespace": "SAMPLES"
},
"properties": {}
},
{
"name": "MediaWiki",
"namespace": "SAMPLES",
"description": "",
"derived_from": {
"name": "Software",
"namespace": "SAMPLES"
},
"properties": {}
},
{
"name": "MongoDB",
"namespace": "SAMPLES",
"description": "",
"derived_from": {
"name": "BigData",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "MySQL",
"namespace": "SAMPLES",
"description": "",
"derived_from": {
"name": "Database",
"namespace": "SAMPLES"
},
"properties": {}
},
{
"name": "php",
"namespace": "SAMPLES",
"description": "",
"derived_from": {
"name": "Runtime",
"namespace": "SAMPLES"
},
"properties": {}
},
{
"name": "PropertyTypesSamples",
"namespace": "SAMPLES",
"description": "Sample Description",
"properties": {
"Property1": {
"type": "string",
"description": "Property1 blah",
"defaultValue": "BLAh",
"required": true,
"confidential": true,
"minLength": 1,
"maxLength": 45,
"pattern": "[A-Z]{3}.*"
},
"Property2": {
"type": "integer",
"description": "Property2 blah",
"defaultValue": 4,
"required": false,
"confidential": false,
"minimum": 1,
"maximum": 6
},
"Property3": {
"type": "double",
"description": "Property3 blah",
"defaultValue": 4.5,
"required": false,
"confidential": false,
"minimum": 3,
"maximum": 7.64
},
"Property4": {
"type": "boolean",
"description": "Property4 blah",
"defaultValue": true,
"required": false,
"confidential": false
},
"Property5": {
"type": "choice",
"description": "Property5 blah",
"required": false,
"confidential": false,
"itemType": "string",
"items": [
"choice1",
"choice2",
"choice3"
]
},
"Property6": {
"type": "date",
"description": "Property6 blah",
"required": true,
"confidential": false
},
"Property7": {
"type": "resource_id",
"description": "Property7 blah",
"required": false,
"confidential": false
},
"Property8": {
"type": "string",
"description": "Property8 blah",
"required": true,
"confidential": false
}
}
},
{
"name": "Runtime",
"namespace": "SAMPLES",
"description": "",
"derived_from": {
"name": "Software",
"namespace": "SAMPLES"
},
"properties": {}
},
{
"name": "Software",
"namespace": "SAMPLES",
"description": "",
"properties": {
"version": {
"type": "string",
"description": "",
"required": false,
"confidential": false
}
}
},
{
"name": "SoftwareStack",
"namespace": "SAMPLES",
"description": "",
"properties": {}
},
{
"name": "SSD",
"namespace": "SAMPLES",
"description": "SSD Drive",
"properties": {}
}
]
}

View File

@ -0,0 +1,268 @@
{ "capability_type_list" :
[
{
"name": "aes",
"namespace": "OS::COMPUTE::CPU",
"description": "CPU feature flag used in ComputeCapabilitiesFilter matching extra_spec (k,v) = ('capabilities : cpu_info : features', '<in> 'lahf_lm'')",
"derived_from": {
"name": "features",
"namespace": "OS::COMPUTE::CPU"
},
"properties": {
"features": {
"type": "string",
"description": "",
"defaultValue": "aes",
"required": true,
"confidential": false
}
}
},
{
"name": "AMD",
"namespace": "OS::COMPUTE::CPU",
"description": "CPU vendor name used in ComputeCapabilitiesFilter matching extra_spec (k,v) = ('capabilities : cpu_info : vendor', 'AMD')",
"derived_from": {
"name": "vendor",
"namespace": "OS::COMPUTE::CPU"
},
"properties": {
"vendor": {
"type": "string",
"description": "",
"defaultValue": "AMD",
"required": true,
"confidential": false
}
}
},
{
"name": "arch",
"namespace": "OS::COMPUTE::CPU",
"description": "",
"properties": {}
},
{
"name": "Conroe",
"namespace": "OS::COMPUTE::CPU",
"description": "CPU model name used in ComputeCapabilitiesFilter matching extra_spec (k,v) = ('capabilities : cpu_info : model', 'core2duo')",
"derived_from": {
"name": "model",
"namespace": "OS::COMPUTE::CPU"
},
"properties": {
"model": {
"type": "string",
"description": "",
"defaultValue": "Conroe",
"required": true,
"confidential": false
}
}
},
{
"name": "Core2duo",
"namespace": "OS::COMPUTE::CPU",
"description": "CPU model name used in ComputeCapabilitiesFilter matching extra_spec (k,v) = ('capabilities : cpu_info : model', 'core2duo')",
"derived_from": {
"name": "model",
"namespace": "OS::COMPUTE::CPU"
},
"properties": {
"model": {
"type": "string",
"description": "",
"defaultValue": "Core2duo",
"required": true,
"confidential": false
}
}
},
{
"name": "cores",
"namespace": "OS::COMPUTE::CPU",
"description": "Number of cores used in ComputeCapabilitiesFilter matching extra_spec (k,v) = ('capabilities : cpu_info : topology : cores', '1')",
"derived_from": {
"name": "topology",
"namespace": "OS::COMPUTE::CPU"
},
"properties": {
"cores": {
"type": "integer",
"description": "",
"defaultValue": 1,
"required": true,
"confidential": false
}
}
},
{
"name": "features",
"namespace": "OS::COMPUTE::CPU",
"description": "",
"properties": {}
},
{
"name": "i686",
"namespace": "OS::COMPUTE::CPU",
"description": "CPU arch code used in ComputeCapabilitiesFilter matching extra_spec (k,v) = ('capabilities : cpu_info : arch', 'x86_64')",
"derived_from": {
"name": "arch",
"namespace": "OS::COMPUTE::CPU"
},
"properties": {
"arch": {
"type": "string",
"description": "",
"defaultValue": "i686",
"required": true,
"confidential": false
}
}
},
{
"name": "Intel",
"namespace": "OS::COMPUTE::CPU",
"description": "CPU vendor name used in ComputeCapabilitiesFilter matching extra_spec (k,v) = ('capabilities : cpu_info : vendor', 'Intel')",
"derived_from": {
"name": "vendor",
"namespace": "OS::COMPUTE::CPU"
},
"properties": {
"vendor": {
"type": "string",
"description": "",
"defaultValue": "Intel",
"required": true,
"confidential": false
}
}
},
{
"name": "mmx",
"namespace": "OS::COMPUTE::CPU",
"description": "CPU feature flag used in ComputeCapabilitiesFilter matching extra_spec (k,v) = ('capabilities : cpu_info : features', '<in> 'lahf_lm'')",
"derived_from": {
"name": "features",
"namespace": "OS::COMPUTE::CPU"
},
"properties": {
"features": {
"type": "string",
"description": "",
"defaultValue": "mmx",
"required": true,
"confidential": false
}
}
},
{
"name": "model",
"namespace": "OS::COMPUTE::CPU",
"description": "",
"properties": {}
},
{
"name": "rdtscp",
"namespace": "OS::COMPUTE::CPU",
"description": "CPU feature flag used in ComputeCapabilitiesFilter matching extra_spec (k,v) = ('capabilities : cpu_info : features', '<in> 'lahf_lm'')",
"derived_from": {
"name": "features",
"namespace": "OS::COMPUTE::CPU"
},
"properties": {
"features": {
"type": "string",
"description": "",
"defaultValue": "rdtscp",
"required": true,
"confidential": false
}
}
},
{
"name": "sockets",
"namespace": "OS::COMPUTE::CPU",
"description": "Number of cores used in ComputeCapabilitiesFilter matching extra_spec (k,v) = ('capabilities : cpu_info : topology : cores', '1')",
"derived_from": {
"name": "topology",
"namespace": "OS::COMPUTE::CPU"
},
"properties": {
"sockets": {
"type": "integer",
"description": "",
"defaultValue": 1,
"required": true,
"confidential": false
}
}
},
{
"name": "threads",
"namespace": "OS::COMPUTE::CPU",
"description": "Number of cores used in ComputeCapabilitiesFilter matching extra_spec (k,v) = ('capabilities : cpu_info : topology : cores', '1')",
"derived_from": {
"name": "topology",
"namespace": "OS::COMPUTE::CPU"
},
"properties": {
"threads": {
"type": "integer",
"description": "",
"defaultValue": 1,
"required": true,
"confidential": false
}
}
},
{
"name": "topology",
"namespace": "OS::COMPUTE::CPU",
"description": "Number of cores used in ComputeCapabilitiesFilter matching extra_spec (k,v) = ('capabilities : cpu_info : topology : cores', '1')",
"properties": {}
},
{
"name": "vendor",
"namespace": "OS::COMPUTE::CPU",
"description": "",
"properties": {}
},
{
"name": "Westmere",
"namespace": "OS::COMPUTE::CPU",
"description": "CPU model name used in ComputeCapabilitiesFilter matching extra_spec (k,v) = ('capabilities : cpu_info : model', 'core2duo')",
"derived_from": {
"name": "model",
"namespace": "OS::COMPUTE::CPU"
},
"properties": {
"model": {
"type": "string",
"description": "",
"defaultValue": "Westmere",
"required": true,
"confidential": false
}
}
},
{
"name": "x86_64",
"namespace": "OS::COMPUTE::CPU",
"description": "CPU arch code used in ComputeCapabilitiesFilter matching extra_spec (k,v) = ('capabilities : cpu_info : arch', 'x86_64')",
"derived_from": {
"name": "arch",
"namespace": "OS::COMPUTE::CPU"
},
"properties": {
"arch": {
"type": "string",
"description": "",
"defaultValue": "x86_64",
"required": true,
"confidential": false
}
}
}
]
}

View File

@ -0,0 +1,861 @@
{ "capability_type_list" :
[
{
"name": "alpha",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "ArchLinux",
"namespace": "OS::COMPUTE::GUEST",
"description": "Arch Linux is a Linux-based operating system for i686 and x86-64 computers.It is composed predominantly of free and open source software, and supports community involvement.",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "arch",
"required": false,
"confidential": false
}
}
},
{
"name": "armv71",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "CENTOS",
"namespace": "OS::COMPUTE::GUEST",
"description": "Community Enterprise Operating System CentOS (abbreviated from Community Enterprise Operating System) is a Linux distribution that attempts to provide a free enterprise class computing platform which aims to be 100% binary compatible with its upstream source, Red Hat Enterprise Linux (RHEL).",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "centos",
"required": false,
"confidential": false
}
}
},
{
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose. The ImagePropertiesFilter filters compute nodes that satisfy any architecture, hypervisor type, or virtual machine mode properties specified on the instance's image properties. Image properties are contained in the image dictionary in the request_spec.",
"properties": {}
},
{
"name": "cris",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "Debian",
"namespace": "OS::COMPUTE::GUEST",
"description": "Debian is an operating system composed of free software mostly carrying the GNU General Public License. The operating system is developed by an internet collaboration of volunteers aligned with The Debian Project. \n\nDebian systems can use either the Linux kernel (known as the Debian GNU/Linux distribution), the FreeBSD kernel (known as the Debian GNU/kFreeBSD distribution) or, more recently, the GNU Hurd kernel (more precisely, the GNU Mach microkernel and its servers; known as the Debian GNU/Hurd distribution).",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "debian",
"required": false,
"confidential": false
}
}
},
{
"name": "Fedora",
"namespace": "OS::COMPUTE::GUEST",
"description": "Fedora (formerly Fedora Core) is an operating system based on the Linux kernel, developed by the community-supported Fedora Project and owned by Red Hat. Fedora contains software distributed under a free and open source license and aims to be on the leading edge of such technologies.",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "fedora",
"required": false,
"confidential": false
}
}
},
{
"name": "FreeBSD",
"namespace": "OS::COMPUTE::GUEST",
"description": "FreeBSD is a free Unix-like operating system descended from AT&T Unix via BSD. Although for legal reasons FreeBSD cannot be called \"Unix,\" it is a direct descendant from BSD, which was historically also called \"BSD Unix\" or \"Berkeley Unix.\"",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "freebsd",
"required": false,
"confidential": false
}
}
},
{
"name": "GentooLinux",
"namespace": "OS::COMPUTE::GUEST",
"description": "Gentoo Linux is a computer operating system based on the Linux kernel and built using the Portage package management system. It is distributed as free and open source software. Unlike a binary software distribution, the source code is compiled locally according to the user's preferences and is often optimized for the specific type of computer. Precompiled binaries are available for some very large packages and for packages whose source code has not been released.",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "gentoo",
"required": false,
"confidential": false
}
}
},
{
"name": "i686",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "ia64",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "lm32",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "m68k",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "MandrakeLinux",
"namespace": "OS::COMPUTE::GUEST",
"description": "Mandriva Linux (result of fusion of the French distribution Mandrakelinux or Mandrake Linux and the Brazilian distribution Conectiva Linux) is a Linux distribution distributed by Mandriva. It uses the RPM Package Manager.",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "mandrake",
"required": false,
"confidential": false
}
}
},
{
"name": "MandrivaEnterpriseServer",
"namespace": "OS::COMPUTE::GUEST",
"description": "Mandriva Linux (result of fusion of the French distribution Mandrakelinux or Mandrake Linux and the Brazilian distribution Conectiva Linux) is a Linux distribution distributed by Mandriva. It uses the RPM Package Manager.",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "mes",
"required": false,
"confidential": false
}
}
},
{
"name": "MandrivaLinux",
"namespace": "OS::COMPUTE::GUEST",
"description": "",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "mandriva",
"required": false,
"confidential": false
}
}
},
{
"name": "microblaze",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "microblazeel",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "mips",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "mips64",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "mips64el",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "mipsel",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "MS-DOS",
"namespace": "OS::COMPUTE::GUEST",
"description": "Microsoft Disc Operating System",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "msdos",
"required": false,
"confidential": false
}
}
},
{
"name": "NetBSD",
"namespace": "OS::COMPUTE::GUEST",
"description": "NetBSD is an open-source Unix-like operating system descended from Berkeley Software Distribution (BSD), a Unix derivative developed at the University of California, Berkeley.",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "netbsd",
"required": false,
"confidential": false
}
}
},
{
"name": "OpenBSD",
"namespace": "OS::COMPUTE::GUEST",
"description": "OpenBSD is a Unix-like computer operating system descended from Berkeley Software Distribution (BSD), a Unix derivative developed at the University of California, Berkeley.",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "openbsd",
"required": false,
"confidential": false
}
}
},
{
"name": "openrisc",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "OpenSolaris",
"namespace": "OS::COMPUTE::GUEST",
"description": "OpenSolaris was an open source computer operating system based on Solaris created by Sun Microsystems. It was also the name of the project initiated by Sun to build a developer and user community around the software. After the acquisition of Sun Microsystems in 2010, Oracle decided to discontinue open development of the core software, and replaced the OpenSolaris distribution model with the proprietary Solaris Express.",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "opensolaris",
"required": false,
"confidential": false
}
}
},
{
"name": "OpenSUSE",
"namespace": "OS::COMPUTE::GUEST",
"description": "openSUSE is a general purpose operating system built on top of the Linux kernel, developed by the community-supported openSUSE Project and sponsored by SUSE and a number of other companies.",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "opensuse",
"required": false,
"confidential": false
}
}
},
{
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST",
"description": "",
"properties": {
"os_version": {
"type": "string",
"description": "The operating system version as specified by the distributor (for example, 12.04).",
"required": false,
"confidential": false
}
}
},
{
"name": "parisc",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "parisc64",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "ppc",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "ppc64",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "ppcemb",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "RedHatEnterpriseLinux",
"namespace": "OS::COMPUTE::GUEST",
"description": "Red Hat Enterprise Linux (RHEL) is a Linux distribution developed by Red Hat and targeted toward the commercial market.",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "rhel",
"required": false,
"confidential": false
}
}
},
{
"name": "s390",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "s390x",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "sh4",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "sh4eb",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "sparc",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "sparc64",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "SUSELinuxEnterpriseDesktop",
"namespace": "OS::COMPUTE::GUEST",
"description": "SUSE Linux Enterprise Desktop (SLED), formerly introduced as Novell Linux Desktop, is a Linux distribution supplied by SUSE and targeted at the business market. It is targeted for desktops.",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "sled",
"required": false,
"confidential": false
}
}
},
{
"name": "Ubuntu",
"namespace": "OS::COMPUTE::GUEST",
"description": "Ubuntu is a Debian-based Linux operating system.",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "ubuntu",
"required": false,
"confidential": false
}
}
},
{
"name": "unicore32",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
},
{
"name": "Windows",
"namespace": "OS::COMPUTE::GUEST",
"description": "A series of graphical interface operating systems developed, marketed, and sold by Microsoft.",
"derived_from": {
"name": "OperatingSystem",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"os_distro": {
"type": "string",
"description": "The common name of the operating system distribution in lowercase (uses the same data vocabulary as the libosinfo project).",
"defaultValue": "windows",
"required": false,
"confidential": false,
"pattern": "windows"
}
}
},
{
"name": "x86_64",
"namespace": "OS::COMPUTE::GUEST",
"description": "Compute architecture. x86-64 (also known as x64, x86_64 and AMD64) is the 64-bit version of the x86 instruction set. It supports vastly larger amounts of virtual memory and physical memory than is possible on its predecessors, allowing programs to store larger amounts of data in memory. x86-64 also provides 64-bit general purpose registers and numerous other enhancements. The original specification was created by AMD, and has been implemented by AMD, Intel, VIA, and others. It is fully backwards compatible with 16-bit and 32-bit x86 code.",
"derived_from": {
"name": "CPUArchitecture",
"namespace": "OS::COMPUTE::GUEST"
},
"properties": {
"architecture": {
"type": "string",
"description": "The CPU architecture that must be supported by the hypervisor. For example, x86_64, arm, or ppc64. Run uname -m to get the architecture of a machine. We strongly recommend using the architecture data vocabulary defined by the libosinfo project for this purpose.",
"defaultValue": "x86_64",
"required": false,
"confidential": false,
"pattern": "x86_64"
}
}
}
]
}

View File

@ -0,0 +1,354 @@
{ "capability_type_list" :
[
{
"name": "ComputeDriverOptions",
"namespace": "OS::COMPUTE::HOST",
"description": "",
"properties": {}
},
{
"name": "ContainerVirtualization",
"namespace": "OS::COMPUTE::HOST",
"description": "Executables in containers. This is the virtual machine mode (vm_mode) used by LXC. It may be used by the host properties filter for scheduling.",
"derived_from": {
"name": "VirtualizationMode",
"namespace": "OS::COMPUTE::HOST"
},
"properties": {
"vm_mode": {
"type": "string",
"description": "",
"defaultValue": "exe",
"required": false,
"confidential": false,
"pattern": "exe"
}
}
},
{
"name": "FullVirtualization",
"namespace": "OS::COMPUTE::HOST",
"description": "hvm Fully virtualized. This is the virtual machine mode (vm_mode) used by QEMU and KVM. It may be used by the host properties filter for scheduling.",
"derived_from": {
"name": "VirtualizationMode",
"namespace": "OS::COMPUTE::HOST"
},
"properties": {
"vm_mode": {
"type": "string",
"description": "",
"defaultValue": "hvm",
"required": false,
"confidential": false,
"pattern": "hvm"
}
}
},
{
"name": "HyperV",
"namespace": "OS::COMPUTE::HOST",
"description": "The hypervisor type (hypervisor_type). It may be used by the host properties filter for scheduling.",
"derived_from": {
"name": "HypervisorType",
"namespace": "OS::COMPUTE::HOST"
},
"properties": {
"hypervisor_type": {
"type": "string",
"description": "",
"defaultValue": "hyperv",
"required": false,
"confidential": false,
"pattern": "hyperv"
}
}
},
{
"name": "HypervisorType",
"namespace": "OS::COMPUTE::HOST",
"description": "The hypervisor type. It may be used by the host properties filter for scheduling. The ImagePropertiesFilter filters compute nodes that satisfy any architecture, hypervisor type, or virtual machine mode properties specified on the instance's image properties. Image properties are contained in the image dictionary in the request_spec.",
"properties": {}
},
{
"name": "KVM",
"namespace": "OS::COMPUTE::HOST",
"description": "The hypervisor type (hypervisor_type). It may be used by the host properties filter for scheduling.",
"derived_from": {
"name": "HypervisorType",
"namespace": "OS::COMPUTE::HOST"
},
"properties": {
"hypervisor_type": {
"type": "string",
"description": "",
"defaultValue": "kvm",
"required": false,
"confidential": false,
"pattern": "kvm"
}
}
},
{
"name": "libvirtDriverOptions",
"namespace": "OS::COMPUTE::HOST",
"description": "The libvirt compute driver options. Sets hw_rng_model, hw_machine_type, hw_video_model, hw_video_ram, hw_watchdog_action, os_command_line properties.\n\nThese are properties specific to compute drivers. For a list of all hypervisors, see here: https://wiki.openstack.org/wiki/HypervisorSupportMatrix",
"derived_from": {
"name": "ComputeDriverOptions",
"namespace": "OS::COMPUTE::HOST"
},
"properties": {
"hw_video_model": {
"type": "choice",
"description": "The video image driver used.",
"required": false,
"confidential": false,
"itemType": "string",
"items": [
"vga",
"cirrus",
"vmvga",
"xen",
"gxl"
]
},
"hw_machine_type": {
"type": "string",
"description": "Enables booting an ARM system using the specified machine type. By default, if an ARM image is used and its type is not specified, Compute uses vexpress-a15 (for ARMv7) or virt (for AArch64) machine types.\n\nLibvirt machine type. Valid types can be viewed by using the virsh capabilities command (machine types are displayed in the machine tag).",
"required": false,
"confidential": false
},
"hw_rng_model": {
"type": "string",
"description": "Adds a random-number generator device to the image's instances. The cloud administrator can enable and control device behavior by configuring the instance's flavor. By default, the generator device is disabled.",
"defaultValue": "virtio",
"required": false,
"confidential": false
},
"hw_watchdog_action": {
"type": "choice",
"description": "Enables a virtual hardware watchdog device that carries out the specified action if the server hangs. The watchdog uses the i6300esb device (emulating a PCI Intel 6300ESB). If hw_watchdog_action is not specified, the watchdog is disabled.",
"defaultValue": "disabled",
"required": false,
"confidential": false,
"itemType": "string",
"items": [
"disabled",
"reset",
"poweroff",
"pause",
"none"
]
},
"os_command_line": {
"type": "string",
"description": "The kernel command line to be used by the libvirt driver, instead of the default. For linux containers (LXC), the value is used as arguments for initialization.",
"required": false,
"confidential": false
}
}
},
{
"name": "LXC",
"namespace": "OS::COMPUTE::HOST",
"description": "The hypervisor type (hypervisor_type). It may be used by the host properties filter for scheduling.",
"derived_from": {
"name": "HypervisorType",
"namespace": "OS::COMPUTE::HOST"
},
"properties": {
"hypervisor_type": {
"type": "string",
"description": "",
"defaultValue": "lxc",
"required": false,
"confidential": false,
"pattern": "lxc"
}
}
},
{
"name": "Qemu",
"namespace": "OS::COMPUTE::HOST",
"description": "The hypervisor type (hypervisor_type). It may be used by the host properties filter for scheduling.",
"derived_from": {
"name": "HypervisorType",
"namespace": "OS::COMPUTE::HOST"
},
"properties": {
"hypervisor_type": {
"type": "string",
"description": "",
"defaultValue": "qemu",
"required": false,
"confidential": false,
"pattern": "qemu"
}
}
},
{
"name": "UserModeLinux-UML",
"namespace": "OS::COMPUTE::HOST",
"description": "The uml hypervisor type (hypervisor_type). It may be used by the host properties filter for scheduling.",
"derived_from": {
"name": "HypervisorType",
"namespace": "OS::COMPUTE::HOST"
},
"properties": {
"hypervisor_type": {
"type": "string",
"description": "",
"defaultValue": "uml",
"required": false,
"confidential": false,
"pattern": "uml"
}
}
},
{
"name": "UserModeLinuxParavirtualization",
"namespace": "OS::COMPUTE::HOST",
"description": "uml<6D>User Mode Linux paravirtualized virtual machine mode (vm_mode). It may be used by the host properties filter for scheduling.",
"derived_from": {
"name": "VirtualizationMode",
"namespace": "OS::COMPUTE::HOST"
},
"properties": {
"vm_mode": {
"type": "string",
"description": "",
"defaultValue": "uml",
"required": false,
"confidential": false,
"pattern": "uml"
}
}
},
{
"name": "VirtualizationMode",
"namespace": "OS::COMPUTE::HOST",
"description": "The virtual machine mode. This represents the host/guest ABI (application binary interface) used for the virtual machine. The ImagePropertiesFilter filters compute nodes that satisfy any architecture, hypervisor type, or virtual machine mode properties specified on the instance's image properties. Image properties are contained in the image dictionary in the request_spec.",
"properties": {}
},
{
"name": "VMWare",
"namespace": "OS::COMPUTE::HOST",
"description": "The hypervisor type (hypervisor_type). It may be used by the host properties filter for scheduling.",
"derived_from": {
"name": "HypervisorType",
"namespace": "OS::COMPUTE::HOST"
},
"properties": {
"hypervisor_type": {
"type": "string",
"description": "",
"defaultValue": "vmware",
"required": false,
"confidential": false,
"pattern": "vmware"
}
}
},
{
"name": "VMwareDriverOptions",
"namespace": "OS::COMPUTE::HOST",
"description": "The VMWare compute driver. Sets vmware_adaptertype, vmware_ostype, vmware_image_version properties.\n\nThese are properties specific to compute drivers. For a list of all hypervisors, see here: https://wiki.openstack.org/wiki/HypervisorSupportMatrix",
"derived_from": {
"name": "ComputeDriverOptions",
"namespace": "OS::COMPUTE::HOST"
},
"properties": {
"vmware_adaptertype": {
"type": "choice",
"description": "Indicates the virtual SCSI or IDE controller used by the hypervisor.",
"required": false,
"confidential": false,
"itemType": "string",
"items": [
"lsiLogic",
" busLogic",
"ide"
]
},
"vmware_ostype": {
"type": "string",
"description": "A VMware GuestID which describes the operating system installed in the image. This will be passed to the hypervisor when creating a virtual machine. See thinkvirt.com for a list of valid values. If this is not specified, it will default to otherGuest.",
"required": false,
"confidential": false
},
"vmware_image_version": {
"type": "string",
"description": "Currently unused, set it to 1.",
"defaultValue": "1",
"required": false,
"confidential": false
}
}
},
{
"name": "Xen",
"namespace": "OS::COMPUTE::HOST",
"description": "The hypervisor type (hypervisor_type). It may be used by the host properties filter for scheduling.",
"derived_from": {
"name": "HypervisorType",
"namespace": "OS::COMPUTE::HOST"
},
"properties": {
"hypervisor_type": {
"type": "string",
"description": "",
"defaultValue": "xen",
"required": false,
"confidential": false,
"pattern": "xen"
}
}
},
{
"name": "XenDriverOptions",
"namespace": "OS::COMPUTE::HOST",
"description": "The XenAPI Driver. Sets auto_disk_config and os_type.\n\nThese are properties specific to compute drivers. For a list of all hypervisors, see here: https://wiki.openstack.org/wiki/HypervisorSupportMatrix",
"derived_from": {
"name": "ComputeDriverOptions",
"namespace": "OS::COMPUTE::HOST"
},
"properties": {
"auto_disk_config": {
"type": "boolean",
"description": "If true, the root partition on the disk is automatically resized before the instance boots. This value is only taken into account by the Compute service when using a Xen-based hypervisor with the XenAPI driver. The Compute service will only attempt to resize if there is a single partition on the image, and only if the partition is in ext3 or ext4 format.",
"required": false,
"confidential": false
},
"os_type": {
"type": "choice",
"description": "The operating system installed on the image. The XenAPI driver contains logic that takes different actions depending on the value of the os_type parameter of the image. For example, for os_type=windows images, it creates a FAT32-based swap partition instead of a Linux swap partition, and it limits the injected host name to less than 16 characters.",
"required": false,
"confidential": false,
"itemType": "string",
"items": [
"linux",
"windows"
]
}
}
},
{
"name": "XenParavirtualization",
"namespace": "OS::COMPUTE::HOST",
"description": "xen<65>Xen 3.0 paravirtualized virtual machine mode (vm_mode). It may be used by the host properties filter for scheduling.",
"derived_from": {
"name": "VirtualizationMode",
"namespace": "OS::COMPUTE::HOST"
},
"properties": {
"vm_mode": {
"type": "string",
"description": "",
"defaultValue": "xen",
"required": false,
"confidential": false,
"pattern": "xen"
}
}
}
]
}

View File

@ -0,0 +1,45 @@
{ "capability_type_list" :
[
{
"name": "Image",
"namespace": "OS::GLANCE",
"description": "A collection of files for a specific operating system (OS) that you use to create or rebuild a server. OpenStack provides pre-built images. You can also create custom images, or snapshots, from servers that you have launched. Custom images can be used for data backups or as \"gold\" images for additional servers.",
"properties": {}
},
{
"name": "ImageSnapshot",
"namespace": "OS::GLANCE",
"description": "The OpenStack snapshot mechanism allows you to create new images from running instances. This is very convenient for upgrading base images or for taking a published image and customizing it for local use. However, an instance snapshot is an image. The only difference between an image that you upload directly to the Image Service and an image that you create by snapshot is that an image created by snapshot has additional properties in the glance database.",
"properties": {
"image_type": {
"type": "string",
"description": "",
"defaultValue": "snapshot",
"required": false,
"confidential": false,
"pattern": "snapshot"
},
"instance_uuid": {
"type": "string",
"description": "uuid of instance that was snapshotted",
"required": false,
"confidential": false
},
"base_image_ref": {
"type": "string",
"description": "uuid of original image of instance that was snapshotted",
"required": false,
"confidential": false
},
"image_location": {
"type": "string",
"description": "",
"defaultValue": "snapshot",
"required": false,
"confidential": false,
"pattern": "snapshot"
}
}
}
]
}

View File

@ -0,0 +1,43 @@
{ "capability_type_list" :
[
{
"name": "BIOSTXT",
"namespace": "TRUST",
"description": "BIOS Trusted Execution Technology",
"derived_from": {
"name": "Trusted",
"namespace": "TRUST"
},
"properties": {
"enabled": {
"type": "boolean",
"description": "",
"required": false,
"confidential": false
},
"verified": {
"type": "boolean",
"description": "",
"required": false,
"confidential": false
}
}
},
{
"name": "HypervisorTXT",
"namespace": "TRUST",
"description": "Hypervisor Trusted Execution Technology",
"derived_from": {
"name": "Trusted",
"namespace": "TRUST"
},
"properties": {}
},
{
"name": "Trusted",
"namespace": "TRUST",
"description": "",
"properties": {}
}
]
}

View File

@ -0,0 +1,252 @@
{ "capability_type_list" :
[
{
"name": "ApplicationDevelopment",
"namespace": "APPLICATION::CATEGORIES",
"description": "Application Development",
"derived_from": {
"name": "SoftwareInfrastructure",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "ApplicationServers",
"namespace": "APPLICATION::CATEGORIES",
"description": "Application Servers",
"derived_from": {
"name": "SoftwareInfrastructure",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "ApplicationStacks",
"namespace": "APPLICATION::CATEGORIES",
"description": "Application Stacks",
"derived_from": {
"name": "SoftwareInfrastructure",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "BigData",
"namespace": "APPLICATION::CATEGORIES",
"description": "Big Data",
"derived_from": {
"name": "SoftwareInfrastructure",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "BusinessIntelligence",
"namespace": "APPLICATION::CATEGORIES",
"description": "Business Intelligence",
"derived_from": {
"name": "BusinessSoftware",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "BusinessSoftware",
"namespace": "APPLICATION::CATEGORIES",
"description": "Business Software",
"properties": {}
},
{
"name": "Collaboration",
"namespace": "APPLICATION::CATEGORIES",
"description": "Collaboration",
"derived_from": {
"name": "BusinessSoftware",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "ContentManagement",
"namespace": "APPLICATION::CATEGORIES",
"description": "Content Management",
"derived_from": {
"name": "BusinessSoftware",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "CRM",
"namespace": "APPLICATION::CATEGORIES",
"description": "CRM",
"derived_from": {
"name": "BusinessSoftware",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "DatabasesAndCaching",
"namespace": "APPLICATION::CATEGORIES",
"description": "Databases & Caching",
"derived_from": {
"name": "SoftwareInfrastructure",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "DeveloperTools",
"namespace": "APPLICATION::CATEGORIES",
"description": "Developer Tools",
"properties": {}
},
{
"name": "eCommerce",
"namespace": "APPLICATION::CATEGORIES",
"description": "eCommerce",
"derived_from": {
"name": "BusinessSoftware",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "FinancialServices",
"namespace": "APPLICATION::CATEGORIES",
"description": "Financial Services",
"derived_from": {
"name": "BusinessSoftware",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "HighPerformanceComputing",
"namespace": "APPLICATION::CATEGORIES",
"description": "High Performance Computing",
"derived_from": {
"name": "BusinessSoftware",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "IssuesAndBugTracking",
"namespace": "APPLICATION::CATEGORIES",
"description": "Issue & Bug Tracking",
"derived_from": {
"name": "DeveloperTools",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "LogAnalysis",
"namespace": "APPLICATION::CATEGORIES",
"description": "Log Analysis",
"derived_from": {
"name": "DeveloperTools",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "Media",
"namespace": "APPLICATION::CATEGORIES",
"description": "Media",
"derived_from": {
"name": "BusinessSoftware",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "Monitoring",
"namespace": "APPLICATION::CATEGORIES",
"description": "Monitoring",
"derived_from": {
"name": "DeveloperTools",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "NetworkInfrastructure",
"namespace": "APPLICATION::CATEGORIES",
"description": "Network Infrastructure",
"derived_from": {
"name": "SoftwareInfrastructure",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "OperatingSystems",
"namespace": "APPLICATION::CATEGORIES",
"description": "Operating Systems",
"derived_from": {
"name": "SoftwareInfrastructure",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "ProjectManagement",
"namespace": "APPLICATION::CATEGORIES",
"description": "Project Management",
"derived_from": {
"name": "BusinessSoftware",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "Security",
"namespace": "APPLICATION::CATEGORIES",
"description": "Security",
"derived_from": {
"name": "SoftwareInfrastructure",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "SoftwareInfrastructure",
"namespace": "APPLICATION::CATEGORIES",
"description": "Software Infrastructure",
"properties": {}
},
{
"name": "SourceControl",
"namespace": "APPLICATION::CATEGORIES",
"description": "Source Control",
"derived_from": {
"name": "DeveloperTools",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "StorageAndBackup",
"namespace": "APPLICATION::CATEGORIES",
"description": "Storage & Backup",
"derived_from": {
"name": "BusinessSoftware",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
},
{
"name": "Testing",
"namespace": "APPLICATION::CATEGORIES",
"description": "Testing",
"derived_from": {
"name": "DeveloperTools",
"namespace": "APPLICATION::CATEGORIES"
},
"properties": {}
}
]
}

View File

@ -0,0 +1,42 @@
[
{
"namespace": "APPLICATION::CATEGORIES",
"resource_types": [ "OS::GLANCE::IMAGE", "OS::GLANCE::SNAPSHOT", "OS::CINDER::VOLUME", "OS::CINDER::VOLUMESNAPSHOT" ],
"property_format" : "P"
},
{
"namespace": "TRUST",
"resource_types": [ "OS::GLANCE::IMAGE", "OS::GLANCE::SNAPSHOT", "OS::CINDER::VOLUME", "OS::CINDER::VOLUMESNAPSHOT" ],
"property_format" : "P"
},
{
"namespace": "OS::CINDER",
"resource_types": [ "OS::GLANCE::IMAGE", "OS::GLANCE::SNAPSHOT", "OS::CINDER::VOLUME", "OS::CINDER::VOLUMESNAPSHOT" ],
"property_format" : "P"
},
{
"namespace": "OS::COMPUTE::CPU",
"resource_types": [ "OS::GLANCE::IMAGE", "OS::GLANCE::SNAPSHOT", "OS::CINDER::VOLUME", "OS::CINDER::VOLUMESNAPSHOT" ],
"property_format" : "P"
},
{
"namespace": "SAMPLES",
"resource_types": [ "OS::GLANCE::IMAGE", "OS::GLANCE::SNAPSHOT", "OS::CINDER::VOLUME", "OS::CINDER::VOLUMESNAPSHOT" ],
"property_format" : "P"
},
{
"namespace": "OS::COMPUTE::HOST",
"resource_types": [ "OS::GLANCE::IMAGE", "OS::GLANCE::SNAPSHOT", "OS::CINDER::VOLUME", "OS::CINDER::VOLUMESNAPSHOT" ],
"property_format" : "P"
},
{
"namespace": "OS::COMPUTE::GUEST",
"resource_types": [ "OS::GLANCE::IMAGE", "OS::GLANCE::SNAPSHOT", "OS::CINDER::VOLUME", "OS::CINDER::VOLUMESNAPSHOT" ],
"property_format" : "P"
},
{
"namespace": "OS::COMPUTE",
"resource_types": [ "OS::GLANCE::IMAGE", "OS::GLANCE::SNAPSHOT", "OS::CINDER::VOLUME", "OS::CINDER::VOLUMESNAPSHOT" ],
"property_format" : "P"
}
]

View File

@ -16,7 +16,126 @@
# look at heat/openstack/common/gettextutils.py when we actually need
# to implement this method
import glob
import json
import os
from graffiti.api.model.v1.derived_type import DerivedType
DICTIONARY_DATA_FOLDER = "etc/dictionary"
NAMESPACE_STRING = "Namespace*"
CAPABILITY_TYPE_STRING = "CapabilityType*"
__namespace_resource_type_dict = dict()
__namespace_property_format_dict = dict()
__namespace_dict = dict()
__property_dict = dict()
TAG_IDENTIFIER = "_TAG"
# TODO(travis): need localization strategy
def _(msg):
return msg
def load_dictionary():
cur_dir = os.getcwd()
os.chdir(DICTIONARY_DATA_FOLDER)
for namespace_file in glob.glob(NAMESPACE_STRING):
print "Loading Namespace file: %s" % namespace_file
load_namespace(namespace_file)
for cap_type_file in glob.glob(CAPABILITY_TYPE_STRING):
print "Loading Capability type file: %s" % cap_type_file
load_capability_type(cap_type_file)
os.chdir(cur_dir)
def load_namespace(namespacefile):
with open(namespacefile) as json_file:
json_data = json.load(json_file)
#print(json_data)
for namespace in json_data:
__namespace_resource_type_dict[namespace['namespace']] = \
namespace['resource_types']
__namespace_property_format_dict[namespace['namespace']] = \
namespace['property_format']
def load_capability_type(cap_type_file):
with open(cap_type_file) as json_file:
json_data = json.load(json_file)
for cap_type in json_data['capability_type_list']:
derived_type = DerivedType()
derived_type.name = cap_type['name']
derived_type.namespace = cap_type['namespace']
key_names = []
for key in cap_type['properties'].keys():
property_name = key
if cap_type['properties'][key]['type'] == "choice":
#Property name and item in each choice as key
for item in cap_type['properties'][key]['items']:
dict_key = property_name + item
key_names.append(dict_key)
else:
if 'defaultValue' in cap_type['properties'][key].keys():
#Property name and default value as key
dict_key = property_name + \
str(cap_type['properties'][key]
['defaultValue'])
key_names.append(dict_key)
else:
#Just use the property name as key
dict_key = property_name
key_names.append(dict_key)
property_dict = dict()
if derived_type.namespace in __namespace_dict.keys():
property_dict = __namespace_dict[derived_type.namespace]
for key in key_names:
property_dict[key] = derived_type
#Add capability itself as property - behaves as a TAG
tag_name = cap_type['name'] + TAG_IDENTIFIER
property_dict[tag_name] = derived_type
__namespace_dict[derived_type.namespace] = property_dict
def get_namespace_resource_type_dict():
return __namespace_resource_type_dict
def get_namespace_property_format_dict():
return __namespace_property_format_dict
def get_qualifier(property_name, property_value):
if property_value:
key1 = property_name + property_value
key2 = property_name
else:
key1 = property_name
#First loop. Make sure key1 is not found anywhere
for namespace in __namespace_dict.keys():
property_dict = __namespace_dict[namespace]
if key1 in property_dict.keys():
return property_dict[key1]
if property_value:
#Second loop. If not found first, use key2
for namespace in __namespace_dict.keys():
property_dict = __namespace_dict[namespace]
if key2 in property_dict.keys():
return property_dict[key2]
return None

View File

@ -18,6 +18,7 @@ from graffiti.api.model.v1.capability import Capability
from graffiti.api.model.v1.property import Property
from graffiti.api.model.v1.resource import Resource
from graffiti.common import exception
from graffiti.common import utils
from graffiti.drivers import base
import keystoneclient.v2_0.client as ksclient
@ -86,21 +87,27 @@ class GlanceResourceDriver(base.ResourceInterface):
image_properties[property_name] = property_value
else:
properties = capability.properties
capability_type = self.replace_colon_from_name(
capability.capability_type
)
capability_type_namespace = self.replace_colon_from_name(
capability.capability_type_namespace
)
#capability_type = self.replace_colon_from_name(
# capability.capability_type
#)
#capability_type_namespace = self.replace_colon_from_name(
# capability.capability_type_namespace
#)
for property_name, property_value in properties.iteritems():
prop_name = capability_type_namespace + \
self.separator + \
capability_type + \
self.separator + \
self.replace_colon_from_name(property_name)
#prop_name = capability_type_namespace + \
# self.separator + \
# capability_type + \
# self.separator + \
# self.replace_colon_from_name(property_name)
prop_name = self.replace_colon_from_name(property_name)
image_properties[prop_name] = property_value
# if capability doesnt have properties add capability as TAG
if not properties:
tag_name = capability.capability_type
image_properties[tag_name] = utils.TAG_IDENTIFIER
image = glance_client.images.get(resource.id)
image.update(properties=image_properties, purge_props=False)
@ -199,9 +206,20 @@ class GlanceResourceDriver(base.ResourceInterface):
capability_type = self.replace_hash_from_name(capability_type)
prop_name = self.replace_hash_from_name(prop_name)
else:
namespace = resource_type + self.default_namespace_postfix
capability_type = self.unknown_properties_type
prop_name = key
capability_type = None
namespace = None
cap_and_namespace = utils.get_qualifier(
key,
glance_image_properties[key]
)
if cap_and_namespace:
capability_type = cap_and_namespace.name
namespace = cap_and_namespace.namespace
else:
namespace = resource_type + self.default_namespace_postfix
capability_type = self.unknown_properties_type
image_property = Property()
image_property.name = prop_name