Added parameters to configure ip and port

The health manager manifest is missing two configuration parameters
to configure the health manager bind_ip and bind_port.

Change-Id: I566374b0dc7f8f696d440ffe152565a3bd47e1e5
This commit is contained in:
Matthew J. Black 2016-12-17 22:00:21 -05:00
parent 1d799fcf00
commit 81ec750cf5
2 changed files with 29 additions and 1 deletions

View File

@ -21,12 +21,22 @@
# (optional) Driver to use for synchronizing octavia and lbaas databases.
# Defaults to $::os_service_default
#
# [*ip*]
# (optional) The bind ip for the health manager
# Defaults to $::os_service_default
#
# [*port*]
# (optional) The bind port for the health manager
# Defaults to $::os_service_default
#
class octavia::health_manager (
$heartbeat_key,
$manage_service = true,
$enabled = true,
$package_ensure = 'present',
$event_streamer_driver = $::os_service_default,
$ip = $::os_service_default,
$port = $::os_service_default,
) inherits octavia::params {
include ::octavia::deps
@ -58,6 +68,8 @@ class octavia::health_manager (
octavia_config {
'health_manager/heartbeat_key' : value => $heartbeat_key;
'health_manager/event_streamer_driver' : value => $event_streamer_driver,
'health_manager/event_streamer_driver' : value => $event_streamer_driver;
'health_manager/bind_ip' : value => $ip;
'health_manager/bind_port' : value => $port;
}
}

View File

@ -81,6 +81,22 @@ describe 'octavia::health_manager' do
end
end
context 'with host and port default values' do
it { is_expected.to contain_octavia_config('health_manager/bind_ip').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_octavia_config('health_manager/bind_port').with_value('<SERVICE DEFAULT>') }
end
context 'with host and port values override' do
before do
params.merge!({
:ip => '10.0.0.15',
:port => '5555'})
end
it { is_expected.to contain_octavia_config('health_manager/bind_ip').with_value('10.0.0.15') }
it { is_expected.to contain_octavia_config('health_manager/bind_port').with_value('5555') }
end
end
on_supported_os({