Browse Source

Merge "Horizon: Enable manila-dashboard configurations" into stable/ussuri

changes/87/824987/1
Zuul 5 months ago committed by Gerrit Code Review
parent
commit
2e71ebb706
  1. 9
      manifests/profile/base/horizon.pp
  2. 23
      spec/classes/tripleo_profile_base_horizon_spec.rb

9
manifests/profile/base/horizon.pp

@ -70,6 +70,10 @@
# (Optional) Indicate whether Octavia is available in the deployment.
# Defaults to hiera('octavia_api_enabled') or false
#
# [*manila_api_enabled*]
# (Optional) Indicate whether Manila is available in the deployment.
# Defaults to hiera('manila_api_enabled') or false
#
class tripleo::profile::base::horizon (
$step = Integer(hiera('step')),
$bootstrap_node = hiera('horizon_short_bootstrap_node_name', undef),
@ -80,6 +84,7 @@ class tripleo::profile::base::horizon (
$memcached_hosts = hiera('memcached_node_names', []),
$heat_api_enabled = hiera('heat_api_enabled', false),
$octavia_api_enabled = hiera('octavia_api_enabled', false),
$manila_api_enabled = hiera('manila_api_enabled', false),
# DEPRECATED PARAMETERS
$memcached_ips = undef
) {
@ -127,5 +132,9 @@ class tripleo::profile::base::horizon (
if $octavia_api_enabled {
include horizon::dashboards::octavia
}
if $manila_api_enabled {
include horizon::dashboards::manila
}
}
}

23
spec/classes/tripleo_profile_base_horizon_spec.rb

@ -30,6 +30,7 @@ describe 'tripleo::profile::base::horizon' do
is_expected.to_not contain_class('horizon')
is_expected.to_not contain_class('horizon::dashboards::heat')
is_expected.to_not contain_class('horizon::dashboards::octavia')
is_expected.to_not contain_class('horizon::dashboards::manila')
end
end
@ -42,6 +43,7 @@ describe 'tripleo::profile::base::horizon' do
is_expected.to_not contain_class('horizon')
is_expected.to_not contain_class('horizon::dashboards::heat')
is_expected.to_not contain_class('horizon::dashboards::octavia')
is_expected.to_not contain_class('horizon::dashboards::manila')
is_expected.to_not contain_class('apache::mod::remoteip')
is_expected.to_not contain_class('apache::mod::status')
end
@ -57,6 +59,7 @@ describe 'tripleo::profile::base::horizon' do
is_expected.to contain_class('horizon')
is_expected.to_not contain_class('horizon::dashboards::heat')
is_expected.to_not contain_class('horizon::dashboards::octavia')
is_expected.to_not contain_class('horizon::dashboards::manila')
is_expected.to contain_class('apache::mod::remoteip')
is_expected.to contain_class('apache::mod::status')
end
@ -72,6 +75,7 @@ describe 'tripleo::profile::base::horizon' do
is_expected.to contain_class('horizon')
is_expected.to_not contain_class('horizon::dashboards::heat')
is_expected.to_not contain_class('horizon::dashboards::octavia')
is_expected.to_not contain_class('horizon::dashboards::manila')
is_expected.to contain_class('apache::mod::remoteip')
is_expected.to contain_class('apache::mod::status')
end
@ -88,6 +92,7 @@ describe 'tripleo::profile::base::horizon' do
is_expected.to contain_class('horizon')
is_expected.to contain_class('horizon::dashboards::heat')
is_expected.to_not contain_class('horizon::dashboards::octavia')
is_expected.to_not contain_class('horizon::dashboards::manila')
is_expected.to contain_class('apache::mod::remoteip')
is_expected.to contain_class('apache::mod::status')
end
@ -104,6 +109,24 @@ describe 'tripleo::profile::base::horizon' do
is_expected.to contain_class('horizon')
is_expected.to_not contain_class('horizon::dashboards::heat')
is_expected.to contain_class('horizon::dashboards::octavia')
is_expected.to_not contain_class('horizon::dashboards::manila')
is_expected.to contain_class('apache::mod::remoteip')
is_expected.to contain_class('apache::mod::status')
end
end
context 'with step 4 and manila enabled' do
let(:params) { {
:step => 4,
:bootstrap_node => 'node.example.com',
:manila_api_enabled => true,
} }
it 'should trigger complete configuration with heat dashboard' do
is_expected.to contain_class('horizon')
is_expected.to_not contain_class('horizon::dashboards::heat')
is_expected.to_not contain_class('horizon::dashboards::octavia')
is_expected.to contain_class('horizon::dashboards::manila')
is_expected.to contain_class('apache::mod::remoteip')
is_expected.to contain_class('apache::mod::status')
end

Loading…
Cancel
Save