diff --git a/manifests/init.pp b/manifests/init.pp index bd5c3319..0956d138 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -35,6 +35,7 @@ class horizon( $django_debug = 'False', $api_result_limit = 1000, $log_level = 'DEBUG', + $can_set_mount_point = 'True', $listen_ssl = false ) { diff --git a/spec/classes/horizon_init_spec.rb b/spec/classes/horizon_init_spec.rb index 406d397b..ff7ddbb4 100644 --- a/spec/classes/horizon_init_spec.rb +++ b/spec/classes/horizon_init_spec.rb @@ -42,6 +42,7 @@ describe 'horizon' do it { should contain_file('/etc/openstack-dashboard/local_settings.py').with_content(/^OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"$/) } it { should contain_file('/etc/openstack-dashboard/local_settings.py').with_content(/^DEBUG = False$/) } it { should contain_file('/etc/openstack-dashboard/local_settings.py').with_content(/^API_RESULT_LIMIT = 1000$/) } + it { should contain_file('/etc/openstack-dashboard/local_settings.py').with_content(/^\s*'can_set_mount_point': True$/) } it { should contain_package('horizon').with_ensure('present') } end @@ -56,6 +57,7 @@ describe 'horizon' do :keystone_default_role => 'SwiftOperator', :django_debug => 'True', :api_result_limit => 4682, + :can_set_mount_point => 'False', } end @@ -65,6 +67,7 @@ describe 'horizon' do it { should contain_file('/etc/openstack-dashboard/local_settings.py').with_content(/^OPENSTACK_KEYSTONE_DEFAULT_ROLE = "SwiftOperator"$/) } it { should contain_file('/etc/openstack-dashboard/local_settings.py').with_content(/^DEBUG = True$/) } it { should contain_file('/etc/openstack-dashboard/local_settings.py').with_content(/^API_RESULT_LIMIT = 4682$/) } + it { should contain_file('/etc/openstack-dashboard/local_settings.py').with_content(/^\s*'can_set_mount_point': False$/) } end end describe 'vhost config' do diff --git a/templates/local_settings.py.erb b/templates/local_settings.py.erb index c0c9c95f..574c52bf 100644 --- a/templates/local_settings.py.erb +++ b/templates/local_settings.py.erb @@ -57,6 +57,10 @@ OPENSTACK_KEYSTONE_BACKEND = { 'can_edit_user': True } +OPENSTACK_HYPERVISOR_FEATURES = { + 'can_set_mount_point': <%= can_set_mount_point %> +} + # OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints # in the Keystone service catalog. Use this setting when Horizon is running # external to the OpenStack environment. The default is 'internalURL'.