Each release has a list of OpenStack settings that can be customized. The settings configuration is stored in the “attributes_metadata.editable” release section in the openstack.yaml file.
Settings are divided into groups. Each group should have a “metadata” section with the following attributes:
metadata:
toggleable: true
enabled: false
weight: 40
Other sections of a setting group represent separate settings. A setting structure includes the following attributes:
syslog_transport:
value: "tcp"
label: "Syslog transport protocol"
description: ""
weight: 30
type: "radio"
values:
- data: "udp"
label: "UDP"
description: ""
restrictions:
- "cluster:net_provider != 'neutron'"
- data: "tcp"
label: "TCP"
description: ""
regex:
source: "^[A-z0-9]+$"
error: "Invalid data"
min: 1
max: 3
Restrictions define when settings and setting groups should be available. Each restriction is defined as a condition with optional action, message and strict:
restrictions:
- condition: "settings:common.libvirt_type.value != 'kvm'"
message: "KVM only is supported"
- condition: "not ('experimental' in version:feature_groups)"
action: hide
condition is an expression written in Expression DSL. If returned value is true, then action is performed and message is shown (if specified).
action defines what to do if condition is satisfied. Supported values are “disable”, “hide” and “none”. “none” can be used just to display message. This field is optional (default value is “disable”).
message is a message that is shown if condition is satisfied. This field is optional.
strict is a boolean flag which specifies how to handle non-existent keys in expressions. If it is set to true (default value), exception is thrown in case of non-existent key. Otherwise values of such keys have null value. Setting this flag to false is useful for conditions which rely on settings provided by plugins:
restrictions:
- condition: "settings:other_plugin == null or settings:other_plugin.metadata.enabled != true"
strict: false
message: "Other plugin must be installed and enabled"
There are also short forms of restrictions:
restrictions:
- "settings:common.libvirt_type.value != 'kvm'": "KVM only is supported"
- "settings:storage.volumes_ceph.value == true"
Expression DSL can describe arbitrarily complex conditions that compare fields of models and scalar values.
Supported types are:
ModelPaths consist of a model name and a field name separated by ”:”. Nested fields (like in settings) are supported, separated by ”.”. Models available for usage are “cluster”, “settings”, “networking_parameters” and “version”.
Supported operators are:
“==”. Returns true if operands are equal:
settings:common.libvirt_type.value == 'qemu'
”!=”. Returns true if operands are not equal:
cluster:net_provider != 'neutron'
“in”. Returns true if the right operand (Array or String) contains the left operand:
'ceph-osd' in release:roles
Boolean operators: “and”, “or”, “not”:
cluster:mode == "ha_compact" and not (settings:common.libvirt_type.value == 'kvm' or 'experimental' in version:feature_groups)
Parentheses can be used to override the order of precedence.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.