Implement ability to define arbitrary options in local_settings.py

Unfortunatelly having `horizon_config_overrides` is not sufficient, as
not all options can be defined in HORIZON_CONFIG.
Some are expected to be preset inside local_settings themselves.

We introduce new variable that can be used to extend local_settings file
with arbitrary parameters.

Change-Id: Ic119105189c9158aa3b38c4deb07040110d9d660
This commit is contained in:
Dmitriy Rabotyagov 2024-06-07 17:44:43 +02:00
parent f9bbbc73ae
commit b0d9b99f70
3 changed files with 12 additions and 0 deletions

View File

@ -499,6 +499,7 @@ horizon_translations_pull: "{{ _horizon_translations_pull }}"
# Set arbitrary horizon configuration options
horizon_config_overrides: {}
horizon_extra_local_settings: {}
# Set overrides for horizon embedded policies
# horizon_policy_overrides:

View File

@ -0,0 +1,7 @@
---
features:
- |
Implemented variable ``horizon_extra_local_settings`` that allows to
insert arbitrary parameters defined as a regular mapping inside
local_settings.py of Horizon. Parameters will be inserted at the end of
the config file.

View File

@ -842,6 +842,10 @@ DEFAULT_THEME = '{{ horizon_default_theme }}'
# Set arbitrary horizon configuration options
HORIZON_CONFIG.update({{ horizon_config_overrides }})
{% for key, value in horizon_extra_local_settings.items() %}
{{ key }} = {{ value }}
{% endfor %}
OPENSTACK_KEYSTONE_ADMIN_ROLES = [
{% for item in horizon_keystone_admin_roles %}
'{{ item }}',