Add OVNAvailabilityZone to improve UX

Currently to set az for ovn, user need to set
OVNCMSOptions with value:
"enable-chassis-as-gw,availability-zones=az-0:az-1:az-2",
which is not very good ux.
Adding new param OVNAvailabilityZone will improve ux
and improve configuration redabilities

Closes-Bug: #1923585
Change-Id: I90932c2445eda2cd0d6e661b561ce86a87dcdec2
This commit is contained in:
Kamil Sambor 2021-04-13 10:42:22 +02:00
parent 65dcafe04f
commit 1ddef85c91
2 changed files with 22 additions and 1 deletions

View File

@ -80,6 +80,13 @@ parameters:
description: Whether Metadata Service has to be enabled
type: boolean
default: true
OVNAvailabilityZone:
description: The az options to configure in ovs db.
eg. ['az-0', 'az-1', 'az-2']
type: comma_delimited_list
default: []
tags:
- role_specific
OVNCMSOptions:
description: The CMS options to configure in ovs db
type: string
@ -141,6 +148,7 @@ parameters:
conditions:
key_size_override_set:
not: {equals: [{get_param: ContainerOvnCertificateKeySize}, '']}
az_ovn_unset: {equals: [{get_param: OVNAvailabilityZone}, []]}
resources:
ContainersCommon:
@ -156,7 +164,15 @@ resources:
map_replace:
- map_replace:
- ovn::controller::ovn_bridge_mappings: NeutronBridgeMappings
ovn::controller::ovn_cms_options: OVNCMSOptions
ovn::controller::ovn_cms_options:
if:
- az_ovn_unset
- OVNCMSOptions
- list_join:
- ''
- - OVNCMSOptions
- ",availability-zones="
- {get_param: OVNAvailabilityZone}
vswitch::ovs::enable_hw_offload: OvsHwOffload
- values: {get_param: [RoleParameters]}
- values:

View File

@ -0,0 +1,5 @@
---
features:
- |
Added new heat role specific param OVNAvailabilityZone to set availability-zones
for ovn. This param replace seting availability-zones throught OVNCMSOptions