Merge pull request #30 from enovance/bug/22/goneri

adjust for horizon wsgi changes
This commit is contained in:
Emilien Macchi 2014-01-22 09:08:53 -08:00
commit 337ed07d99
2 changed files with 26 additions and 34 deletions

View File

@ -50,40 +50,19 @@ class cloud::dashboard(
$listen_ssl = false,
) {
case $::osfamily {
'RedHat': {
class {'horizon':
secret_key => $secret_key,
keystone_host => $ks_keystone_internal_host,
can_set_mount_point => 'False',
# fqdn can can be ambiguous since we use reverse DNS here,
# e.g: 127.0.0.1 instead of a public IP address.
# We force $api_eth to avoid this situation
fqdn => $api_eth
}
}
'Debian': {
case $::operatingsystem {
'Debian': {
#FIXME(sbadia) https://review.openstack.org/#/c/64523/
fail('puppet-horizon does not work yet on Debian. Work in progress by https://review.openstack.org/#/c/64523/')
}
default: {
class {'horizon':
secret_key => $secret_key,
keystone_host => $ks_keystone_internal_host,
can_set_mount_point => 'False',
# fqdn can can be ambiguous since we use reverse DNS here,
# e.g: 127.0.0.1 instead of a public IP address.
# We force $api_eth to avoid this situation
fqdn => $api_eth
}
}
}
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module puppet-horizon only support osfamily RedHat and Debian")
}
$supported = [ 'RedHat', 'Debian' ]
if grep($supported, $::osfamily) != [$::osfamily] {
fail("module puppet-horizon doesn't support ${::osfamily}")
}
class {'horizon':
secret_key => $secret_key,
keystone_host => $ks_keystone_internal_host,
can_set_mount_point => 'False',
# fqdn can can be ambiguous since we use reverse DNS here,
# e.g: 127.0.0.1 instead of a public IP address.
# We force $api_eth to avoid this situation
fqdn => $api_eth,
}
@@haproxy::balancermember{"${::fqdn}-horizon":

View File

@ -62,4 +62,17 @@ describe 'cloud::dashboard' do
it_configures 'openstack dashboard'
end
context 'on other platforms' do
let :facts do
{ :osfamily => 'Solaris',
:operatingsystemrelease => '10',
:concat_basedir => '/var/lib/puppet/concat' }
end
it 'should fail' do
expect { subject }.to raise_error(/module puppet-horizon doesn't support/)
end
end
end