From 17580144863fe193ce4be7b02af7258408248411 Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Thu, 14 May 2015 09:38:25 -0500 Subject: [PATCH] Use the recommended default for horizon default dashboards Let horizon discover the default dashboards via the INSTALL_APPS (which is already an attribute). The patch removes the old hardcoded defaults which are no longer needed nor recommmended. Change-Id: I3c73756a6d834a9bae69ae6ead235e01cc747593 Closes-Bug: #1455063 --- spec/horizon_spec.rb | 5 +++++ templates/default/local_settings.py.erb | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/horizon_spec.rb b/spec/horizon_spec.rb index d18101f..157007b 100644 --- a/spec/horizon_spec.rb +++ b/spec/horizon_spec.rb @@ -310,6 +310,11 @@ describe 'openstack-dashboard::horizon' do expect(chef_run).to render_file(file.name).with_content(/\s*'help_url': "help_url_value",$/) end + it 'allows HORIZON_CONFIG to use INSTALLED_APPS to determine default dashboards' do + expect(chef_run).not_to render_file(file.name).with_content(/\s*'dashboards':/) + expect(chef_run).not_to render_file(file.name).with_content(/\s*'default_dashboard':/) + end + context 'simple ip management' do it 'enables the setting when the attribute is set' do node.set['openstack']['dashboard']['simple_ip_management'] = true diff --git a/templates/default/local_settings.py.erb b/templates/default/local_settings.py.erb index 4b31cea..1701db5 100644 --- a/templates/default/local_settings.py.erb +++ b/templates/default/local_settings.py.erb @@ -70,8 +70,6 @@ CONSOLE_TYPE = "<%= node["openstack"]["dashboard"]["console_type"] %>" # Default OpenStack Dashboard configuration. HORIZON_CONFIG = { - 'dashboards': ('project', 'admin', 'settings',), - 'default_dashboard': 'project', 'user_home': 'openstack_dashboard.views.get_user_home', 'ajax_queue_limit': 10, 'auto_fade_alerts': {