diff --git a/manifests/loadbalancer.pp b/manifests/loadbalancer.pp index 7f6c8c65..ba3c64b1 100644 --- a/manifests/loadbalancer.pp +++ b/manifests/loadbalancer.pp @@ -253,7 +253,7 @@ class cloud::loadbalancer( warning('horizon_ssl_port parameter is deprecated. Specify port with the horizon_port instead.') $horizon_port_real = $horizon_ssl_port } else { - $horizon_port_real = '443' + $horizon_port_real = $horizon_port } # end of deprecation support diff --git a/spec/classes/cloud_loadbalancer_spec.rb b/spec/classes/cloud_loadbalancer_spec.rb index ce21585d..602c27a5 100644 --- a/spec/classes/cloud_loadbalancer_spec.rb +++ b/spec/classes/cloud_loadbalancer_spec.rb @@ -336,6 +336,25 @@ describe 'cloud::loadbalancer' do )} end + context 'configure OpenStack Horizon with backward compatibility' do + before do + params.merge!( + :horizon_ssl_port => '80' + ) + end + it { should contain_haproxy__listen('horizon_cluster').with( + :ipaddress => [params[:vip_public_ip]], + :ports => '80', + :options => { + 'mode' => 'http', + 'http-check' => 'expect ! rstatus ^5', + 'option' => ["tcpka", "forwardfor", "tcplog", "httpchk GET / \"HTTP/1.0\\r\\nUser-Agent: HAproxy-myhost\""], + 'cookie' => 'sessionid prefix', + 'balance' => 'leastconn', + }, + )} + end + context 'configure OpenStack Horizon SSL with backward compatibility' do before do params.merge!( @@ -359,6 +378,7 @@ describe 'cloud::loadbalancer' do context 'configure OpenStack Horizon SSL binding' do before do params.merge!( + :horizon_port => '443', :horizon_ssl => false, :horizon_ssl_port => false, :horizon_bind_options => ['ssl', 'crt']