From cbc7e0eed1ed2516e703b3709c747665bdb20bfe Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Wed, 14 Oct 2015 17:56:45 -0700 Subject: [PATCH] Add horizon setting for cinder backup This change makes the cinder backup enable flag in the Horizon configuration a variable. It also enables this flag automatically through group_vars when cinder_service_backup_program_enabled = True. Change-Id: Ib64532bbd7a3774f16766de0d3d221579aecc9ff Closes-Bug: #1504279 --- playbooks/inventory/group_vars/hosts.yml | 1 + playbooks/roles/os_horizon/defaults/main.yml | 1 + .../roles/os_horizon/templates/horizon_local_settings.py.j2 | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/playbooks/inventory/group_vars/hosts.yml b/playbooks/inventory/group_vars/hosts.yml index 1191c1d140..c618f4487c 100644 --- a/playbooks/inventory/group_vars/hosts.yml +++ b/playbooks/inventory/group_vars/hosts.yml @@ -175,6 +175,7 @@ keystone_service_internaluri_insecure: false ## Horizon horizon_service_region: "{{ service_region }}" +horizon_enable_cinder_backup: "{% if cinder_service_backup_program_enabled is defined and cinder_service_backup_program_enabled | bool %}True{% else %}False{% endif %}" ## Heat diff --git a/playbooks/roles/os_horizon/defaults/main.yml b/playbooks/roles/os_horizon/defaults/main.yml index 65fe32bc71..32e4e20be1 100644 --- a/playbooks/roles/os_horizon/defaults/main.yml +++ b/playbooks/roles/os_horizon/defaults/main.yml @@ -71,6 +71,7 @@ horizon_disable_password_reveal: False horizon_enable_password_retrieve: False # If nova_libvirt_inject_password is set to True, then this can also be enabled: horizon_can_set_password: False +horizon_enable_cinder_backup: False ## Horizon SSL diff --git a/playbooks/roles/os_horizon/templates/horizon_local_settings.py.j2 b/playbooks/roles/os_horizon/templates/horizon_local_settings.py.j2 index 046f954f84..2df69edce2 100644 --- a/playbooks/roles/os_horizon/templates/horizon_local_settings.py.j2 +++ b/playbooks/roles/os_horizon/templates/horizon_local_settings.py.j2 @@ -246,7 +246,7 @@ OPENSTACK_HYPERVISOR_FEATURES = { # The OPENSTACK_CINDER_FEATURES settings can be used to enable optional # services provided by cinder that is not exposed by its extension API. OPENSTACK_CINDER_FEATURES = { - 'enable_backup': False, + 'enable_backup': {{ horizon_enable_cinder_backup | bool }}, } # The OPENSTACK_NEUTRON_NETWORK settings can be used to enable optional