From 39839111c0f84fe18a75019ec4a677be47c59674 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 6 Jul 2016 10:54:54 -0500 Subject: [PATCH] Added variable to allow for arbitrary HORIZON_CONFIG A new variable has been added to allow a deployer to set arbitrary configuration options. Closes-Bug: #1598143 Change-Id: Ic2d83d5b581046314145ecd0201087cc1682716b Signed-off-by: Kevin Carter --- defaults/main.yml | 3 +++ .../notes/horizon-arbitrary-config-8a36e4bd6818afe1.yaml | 6 ++++++ templates/horizon_local_settings.py.j2 | 4 ++++ tests/test-vars.yml | 2 ++ 4 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/horizon-arbitrary-config-8a36e4bd6818afe1.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 6e95483d..b11de287 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -191,3 +191,6 @@ horizon_pip_packages: - pycrypto - python-memcached - python-keystoneclient + +# Set arbitrary horizon configuration options +horizon_config_overrides: {} diff --git a/releasenotes/notes/horizon-arbitrary-config-8a36e4bd6818afe1.yaml b/releasenotes/notes/horizon-arbitrary-config-8a36e4bd6818afe1.yaml new file mode 100644 index 00000000..66a8dccc --- /dev/null +++ b/releasenotes/notes/horizon-arbitrary-config-8a36e4bd6818afe1.yaml @@ -0,0 +1,6 @@ +--- +features: + - Horizon now has the ability to set arbitrary configuration options using + global option ``horizon_config_overrides`` in YAML format. The overrides + follow the same pattern found within the other OpenStack service + overrides. `General documentation on overrides can be found here `_. diff --git a/templates/horizon_local_settings.py.j2 b/templates/horizon_local_settings.py.j2 index 57bc404b..e30e6e70 100644 --- a/templates/horizon_local_settings.py.j2 +++ b/templates/horizon_local_settings.py.j2 @@ -728,3 +728,7 @@ SITE_BRANDING = '{{ horizon_site_name }}' #custom python module with horizon dashboard theme overrides HORIZON_CONFIG["customization_module"] = 'horizon_customization.overrides' {% endif %} + + +# Set arbitrary horizon configuration options +HORIZON_CONFIG.update({{ horizon_config_overrides }}) diff --git a/tests/test-vars.yml b/tests/test-vars.yml index 747a3a5d..c0d9b34c 100644 --- a/tests/test-vars.yml +++ b/tests/test-vars.yml @@ -84,3 +84,5 @@ tempest_plugins: - name: tempest-horizon repo: https://git.openstack.org/openstack/tempest-horizon branch: master +horizon_config_overrides: + X_TEST_OPTION: True