diff --git a/manifests/init.pp b/manifests/init.pp index 348d37cf..5ba99efc 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -67,6 +67,10 @@ # [*django_debug*] # (optional) Enable or disable Django debugging. Defaults to 'False'. # +# [*site_branding*] +# (optional) Set the SITE_BRANDING config option that controls the +# title of the web pages in the browser. Defaults to 'undef'. +# # [*openstack_endpoint_type*] # (optional) endpoint type to use for the endpoints in the Keystone # service catalog. Defaults to 'undef'. @@ -468,6 +472,7 @@ class horizon( $keystone_url = 'http://127.0.0.1:5000', $keystone_default_role = '_member_', $django_debug = 'False', + $site_branding = undef, $openstack_endpoint_type = undef, $secondary_endpoint_type = undef, $available_regions = undef, diff --git a/releasenotes/notes/add-site-branding-be1c2b6e1e70c782.yaml b/releasenotes/notes/add-site-branding-be1c2b6e1e70c782.yaml new file mode 100644 index 00000000..a2e77f91 --- /dev/null +++ b/releasenotes/notes/add-site-branding-be1c2b6e1e70c782.yaml @@ -0,0 +1,8 @@ +--- +features: + - | + Added new parameter horizon::site_branding which can be used to set the + SITE_BRANDING settings that controls the title of the web pages that + horizon will render. The default value is undef which will not add this + value to the configuration file and the horizon default value of + 'OpenStack Dashboard' will be used. diff --git a/spec/classes/horizon_init_spec.rb b/spec/classes/horizon_init_spec.rb index 60373868..4df488e0 100644 --- a/spec/classes/horizon_init_spec.rb +++ b/spec/classes/horizon_init_spec.rb @@ -108,6 +108,7 @@ describe 'horizon' do :openstack_endpoint_type => 'internalURL', :secondary_endpoint_type => 'ANY-VALUE', :django_debug => true, + :site_branding => 'mysite', :api_result_limit => 4682, :compress_offline => false, :hypervisor_options => {'can_set_mount_point' => false, 'can_set_password' => true }, @@ -144,6 +145,7 @@ describe 'horizon' do it 'generates local_settings.py' do verify_concat_fragment_contents(catalogue, 'local_settings.py', [ 'DEBUG = True', + "SITE_BRANDING = 'mysite'", "ALLOWED_HOSTS = ['some.host.tld', ]", "SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')", 'CSRF_COOKIE_SECURE = True', diff --git a/templates/local_settings.py.erb b/templates/local_settings.py.erb index 715d25c1..248e1f9e 100644 --- a/templates/local_settings.py.erb +++ b/templates/local_settings.py.erb @@ -10,6 +10,9 @@ from openstack_dashboard.settings import HORIZON_CONFIG DEBUG = <%= @django_debug.to_s.capitalize %> TEMPLATE_DEBUG = DEBUG +<% if @site_branding %> +SITE_BRANDING = '<%= @site_branding %>' +<% end %> # WEBROOT is the location relative to Webserver root # should end with a slash.