diff --git a/manifests/horizon.pp b/manifests/horizon.pp index fffb063..11b1a8a 100644 --- a/manifests/horizon.pp +++ b/manifests/horizon.pp @@ -10,7 +10,49 @@ # # === Parameters # -# See params.pp +# [*secret_key*] +# (required) A secret key for a particular Django installation. This is used to provide cryptographic signing, +# and should be set to a unique, unpredictable value. +# +# [*cache_server_ip*] +# (optional) Ip address where the memcache server is listening. +# Defaults to '127.0.0.1'. +# +# [*cache_server_port*] +# (optional) Port that memcache server listens on. +# Defaults to '11211'. +# +# [*swift*] +# (optional) Whether the swift interface extension should be enabled in Horizon +# Defaults to false. +# +# [*quantum*] +# (optional) Whether the quantum interface extension should be enabled in Horizon +# Defaults to false. +# +# [*horizon_app_links*] +# (optional) External Monitoring links. +# Defaults to undef. +# +# [*keystone_host*] +# (optional) Address of keystone host. +# Defaults to '127.0.0.1'. +# +# [*keystone_scheme*] +# (optional) Protocol for keystone. Accepts http or https. +# Defaults to http. +# +# [*keystone_default_role*] +# (Optional) Default role for keystone authentication. +# Defaults to 'Member'. +# +# [*django_debug*] +# (Optional) Sets Django debug level. +# Defaults to false. +# +# [*api_result_limit*] +# (Optional) Maximum results to show on a page before pagination kicks in. +# Defaults to 1000. # # === Examples # diff --git a/spec/classes/openstack_horizon_spec.rb b/spec/classes/openstack_horizon_spec.rb new file mode 100644 index 0000000..9859398 --- /dev/null +++ b/spec/classes/openstack_horizon_spec.rb @@ -0,0 +1,44 @@ +require 'spec_helper' + +describe 'openstack::horizon' do + + let :required_params do + { :secret_key => 'super_secret' } + end + + let :params do + required_params + end + + let :facts do + { + :osfamily => 'Redhat', + :memorysize => '1GB', + :processorcount => '1', + :concat_basedir => '/tmp', + :operatingsystemrelease => '5' + } + end + + it 'should configure horizon and memcache using default parameters and secret key' do + should contain_class('memcached').with( + :listen_ip => '127.0.0.1', + :tcp_port => '11211', + :udp_port => '11211' + ) + should contain_class('horizon').with( + :cache_server_ip => '127.0.0.1', + :cache_server_port => '11211', + :secret_key => 'super_secret', + :swift => false, + :quantum => false, + :horizon_app_links => false, + :keystone_host => '127.0.0.1', + :keystone_scheme => 'http', + :keystone_default_role => 'Member', + :django_debug => 'False', + :api_result_limit => 1000 + ) + end + +end