Browse Source

Merge "Add support for [DEFAULT] api_workers"

changes/99/825999/1
Zuul 4 months ago committed by Gerrit Code Review
parent
commit
2530f039ca
  1. 10
      manifests/server.pp
  2. 4
      releasenotes/notes/api_workers-19ee939effb3d102.yaml
  3. 5
      spec/classes/tacker_server_spec.rb

10
manifests/server.pp

@ -22,6 +22,10 @@
# (optional) The port to bind to.
# Defaults to $::os_service_default
#
# [*api_workers*]
# (optional) Number of separate worker process for service.
# Defaults to $::os_workers
#
# [*package_ensure*]
# (Optional) Ensure state for package.
# Defaults to 'present'
@ -32,6 +36,7 @@ class tacker::server(
$auth_strategy = 'keystone',
$bind_host = $::os_service_default,
$bind_port = $::os_service_default,
$api_workers = $::os_workers,
$package_ensure = 'present',
) {
@ -50,8 +55,9 @@ class tacker::server(
})
tacker_config {
'DEFAULT/bind_host' : value => $bind_host;
'DEFAULT/bind_port' : value => $bind_port;
'DEFAULT/bind_host' : value => $bind_host;
'DEFAULT/bind_port' : value => $bind_port;
'DEFAULT/api_workers': value => $api_workers;
}
if $manage_service {

4
releasenotes/notes/api_workers-19ee939effb3d102.yaml

@ -0,0 +1,4 @@
---
features:
- |
The new ``tacker::server::api_workers`` parameter has been added.

5
spec/classes/tacker_server_spec.rb

@ -26,6 +26,7 @@ describe 'tacker::server' do
it 'configures api' do
is_expected.to contain_tacker_config('DEFAULT/bind_host').with_value( params[:bind_host] )
is_expected.to contain_tacker_config('DEFAULT/bind_port').with_value( params[:bind_port] )
is_expected.to contain_tacker_config('DEFAULT/api_workers').with_value(4)
end
[{:enabled => true}, {:enabled => false}].each do |param_hash|
@ -59,7 +60,9 @@ describe 'tacker::server' do
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts())
facts.merge!(OSDefaults.get_facts(
:os_workers => 4
))
end
let(:platform_params) do

Loading…
Cancel
Save