dashboard: Allow override of neutron_options
When using specific neutron driver like cisco n1kv we need to have cisco profile enable in horizon. This patch allow to override neutron_options in horizon class in order to enable cisco profile. It's also useful when we need to activate vpnaas or fwaas in the dashboard. https://blueprints.launchpad.net/horizon/+spec/horizon-cisco-n1k Signed-off-by: Dimitri Savineau <dimitri.savineau@enovance.com>
This commit is contained in:
parent
2e482d275e
commit
a881a4aa4e
@ -75,6 +75,11 @@
|
||||
# Useful when activating SSL binding on HAproxy and not in Horizon.
|
||||
# Defaults to false
|
||||
#
|
||||
# [*neutron_extra_options*]
|
||||
# (optional) Enable optional services provided by neutron
|
||||
# Useful when using cisco n1kv plugin, vpnaas or fwaas.
|
||||
# Default to {}
|
||||
|
||||
class cloud::dashboard(
|
||||
$ks_keystone_internal_host = '127.0.0.1',
|
||||
$secret_key = 'secrete',
|
||||
@ -94,6 +99,7 @@ class cloud::dashboard(
|
||||
$os_endpoint_type = undef,
|
||||
$allowed_hosts = $::fqdn,
|
||||
$vhost_extra_params = {},
|
||||
$neutron_extra_options = {},
|
||||
) {
|
||||
|
||||
# We build the param needed for horizon class
|
||||
@ -111,6 +117,11 @@ class cloud::dashboard(
|
||||
}
|
||||
$vhost_extra_params_real = merge ($vhost_extra_params, $extra_params)
|
||||
|
||||
$neutron_options = {
|
||||
'enable_lb' => true
|
||||
}
|
||||
$neutron_options_real = merge ($neutron_options, $neutron_extra_options)
|
||||
|
||||
ensure_resource('class', 'apache', {
|
||||
default_vhost => false
|
||||
})
|
||||
@ -124,9 +135,7 @@ class cloud::dashboard(
|
||||
keystone_url => $keystone_url,
|
||||
cache_server_ip => false,
|
||||
django_debug => $debug,
|
||||
neutron_options => {
|
||||
'enable_lb' => true
|
||||
},
|
||||
neutron_options => $neutron_options_real,
|
||||
listen_ssl => $listen_ssl,
|
||||
horizon_cert => $horizon_cert,
|
||||
horizon_key => $horizon_key,
|
||||
|
@ -79,6 +79,24 @@ describe 'cloud::dashboard' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with cisco plugin enabled' do
|
||||
before do
|
||||
params.merge!(
|
||||
:neutron_extra_options => {
|
||||
'profile_support' => 'cisco'
|
||||
})
|
||||
end
|
||||
|
||||
it 'configure horizon with cisco support' do
|
||||
is_expected.to contain_class('horizon').with(
|
||||
:neutron_options => {
|
||||
'enable_lb' => true,
|
||||
'profile_support' => 'cisco'
|
||||
},
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with multiple allowed_hosts' do
|
||||
before do
|
||||
params.merge!(:allowed_hosts => ['horizon.openstack.org', 'vip.openstack.org'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user