From 5fed727f7c2da05f9daf822f94b477ae36293393 Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Mon, 31 Jul 2017 18:19:51 +0800 Subject: [PATCH] Update new-flavor specs This adds resource_aggregates field to associate resources group information with the flavor. Change-Id: I2e9ebbd967c86e419e4513a4cb4ebd585bdc8a5e --- specs/pike/approved/new-flavor.rst | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/specs/pike/approved/new-flavor.rst b/specs/pike/approved/new-flavor.rst index a28f227..95db1de 100644 --- a/specs/pike/approved/new-flavor.rst +++ b/specs/pike/approved/new-flavor.rst @@ -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'},