Update new-flavor specs

This adds resource_aggregates field to associate resources group
information with the flavor.

Change-Id: I2e9ebbd967c86e419e4513a4cb4ebd585bdc8a5e
This commit is contained in:
Zhenguo Niu 2017-07-31 18:19:51 +08:00
parent 1e36a74701
commit 5fed727f7c
1 changed files with 16 additions and 2 deletions

View File

@ -54,6 +54,8 @@ The operator might define the flavors as such::
CUSTOM_BAREMETAL_GOLD: 1
resource_traits:
CUSTOM_BAREMETAL_GOLD: FPGA
resource_aggregates:
high_mem: true
description:
Intel(R) Xeon(R) E5620 2.40GHz 16 cores, 8GB RAM
@ -87,6 +89,8 @@ with their data type and default value for migrations.
+-----------------------+--------------+-----------------+
| resource_traits | DictOfString | None |
+-----------------------+--------------+-----------------+
| resource_aggregates | DictOfString | None |
+-----------------------+--------------+-----------------+
| description | String | None |
+-----------------------+--------------+-----------------+
| is_public | Bool | True |
@ -94,8 +98,9 @@ with their data type and default value for migrations.
| disabled | Bool | False |
+-----------------------+--------------+-----------------+
The `resources` field indicates the resource quantities and the
`resource_traits` field reference to the resource qualities.
The `resources` field indicates the resource quantities, the `resource_traits`
field reference to the resource qualities, and the `resource_aggregates` field
includes the group information.
The `disabled` field is intended to be used when phasing out flavors. In this
case, a delete wouldn't work because the flavor needs to still be available
@ -138,6 +143,15 @@ REST API will be changed as part of this change.
},
'additionalProperties': False
},
'resource_aggregates': {
'type': 'object',
'patternProperties': {
'^[a-zA-Z0-9-_:. ]{1,255}$': {
'type': 'string', 'maxLength': 255
}
},
'additionalProperties': False
},
'description': {'type': 'string', 'minLength': 1},
'disabled': {'type': 'boolean'},
'is_public': {'type': 'boolean'},