Add more tunables for heat-dashboard
Change-Id: I90b19a4111e4496eb0e022fd8c7b9bba34b4d097
This commit is contained in:
parent
b3eced0349
commit
ad87d13355
@ -25,9 +25,19 @@
|
||||
# (optional) Local copy of service policy files.
|
||||
# Defaults to 'heat_policy.yaml'
|
||||
#
|
||||
# [*template_generator_api_timeout*]
|
||||
# (optional) API timeout to retrieve response from template generator.
|
||||
# Defaults to 60
|
||||
#
|
||||
# [*template_generator_api_parallel*]
|
||||
# (optional) Concurrency to retrieve response from template generator.
|
||||
# Defualts to 2
|
||||
#
|
||||
class horizon::dashboards::heat(
|
||||
$enable_user_pass = true,
|
||||
$policy_file = 'heat_policy.yaml',
|
||||
$enable_user_pass = true,
|
||||
$policy_file = 'heat_policy.yaml',
|
||||
$template_generator_api_timeout = 60,
|
||||
$template_generator_api_parallel = 2,
|
||||
) {
|
||||
|
||||
include horizon::deps
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The ``heat::dashboards::heat`` class now supports the following two
|
||||
parameters.
|
||||
|
||||
- ``template_generator_api_timeout``
|
||||
- ``template_generator_api_parallel``
|
@ -16,7 +16,6 @@ describe 'horizon::dashboards::heat' do
|
||||
}
|
||||
eos
|
||||
end
|
||||
|
||||
it 'installs heat-dashboard package' do
|
||||
is_expected.to contain_package('heat-dashboard').with(
|
||||
:ensure => 'present',
|
||||
@ -36,6 +35,12 @@ eos
|
||||
" 'enable_user_pass': True,",
|
||||
"}",
|
||||
])
|
||||
verify_concat_fragment_contents(catalogue, '_1699_orchestration_settings.py', [
|
||||
"HEAT_TEMPLATE_GENERATOR_API_TIMEOUT = 60"
|
||||
])
|
||||
verify_concat_fragment_contents(catalogue, '_1699_orchestration_settings.py', [
|
||||
"HEAT_TEMPLATE_GENERATOR_API_PARALLEL = 2"
|
||||
])
|
||||
end
|
||||
end
|
||||
|
||||
@ -47,18 +52,40 @@ eos
|
||||
}
|
||||
eos
|
||||
end
|
||||
|
||||
before do
|
||||
params.merge!({ :enable_user_pass => false })
|
||||
end
|
||||
|
||||
it {
|
||||
it 'generates _1699_orchestration_settings.py' do
|
||||
verify_concat_fragment_contents(catalogue, '_1699_orchestration_settings.py', [
|
||||
"OPENSTACK_HEAT_STACK = {",
|
||||
" 'enable_user_pass': False,",
|
||||
"}",
|
||||
])
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
context 'with template_generator parameters set' do
|
||||
let(:pre_condition) do
|
||||
<<-eos
|
||||
class { 'horizon':
|
||||
secret_key => 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0',
|
||||
}
|
||||
eos
|
||||
end
|
||||
before do
|
||||
params.merge!({
|
||||
:template_generator_api_timeout => 120,
|
||||
:template_generator_api_parallel => 4,
|
||||
})
|
||||
end
|
||||
it 'generates _1699_orchestration_settings.py' do
|
||||
verify_concat_fragment_contents(catalogue, '_1699_orchestration_settings.py', [
|
||||
"HEAT_TEMPLATE_GENERATOR_API_TIMEOUT = 120"
|
||||
])
|
||||
verify_concat_fragment_contents(catalogue, '_1699_orchestration_settings.py', [
|
||||
"HEAT_TEMPLATE_GENERATOR_API_PARALLEL = 4"
|
||||
])
|
||||
end
|
||||
end
|
||||
|
||||
context 'without the horizon class defined' do
|
||||
|
@ -32,7 +32,7 @@ settings.LOGGING['loggers'].update({
|
||||
})
|
||||
|
||||
# Template Generator retrieve options API TIMEOUT
|
||||
HEAT_TEMPLATE_GENERATOR_API_TIMEOUT = 60
|
||||
HEAT_TEMPLATE_GENERATOR_API_TIMEOUT = <%= @template_generator_api_timeout.to_s %>
|
||||
|
||||
# Template Generator retrieve options API PARALLEL LEVEL
|
||||
HEAT_TEMPLATE_GENERATOR_API_PARALLEL = 2
|
||||
HEAT_TEMPLATE_GENERATOR_API_PARALLEL = <%= @template_generator_api_parallel.to_s %>
|
||||
|
Loading…
Reference in New Issue
Block a user