bagpipe: Add support for [api] host

... so that both host and port can be configured.

Change-Id: I66014eb2ac61a79fe9ceba6761c685c66b841d01
This commit is contained in:
Takashi Kajinami
2022-06-20 08:31:22 +09:00
parent 6c17877a0e
commit baa0b6e4bc
3 changed files with 13 additions and 1 deletions

View File

@@ -25,8 +25,12 @@
# (required) Private Autonomous System number
# Defaults to $::os_service_default
#
# [*api_host*]
# (optional) BGP component API host
# Defaults to $::os_service_default
#
# [*api_port*]
# BGP component API port
# (optional) BGP component API port
# Defaults to $::os_service_default
#
# [*dataplane_driver_ipvpn*]
@@ -76,6 +80,7 @@
#
class neutron::agents::bagpipe (
$my_as,
$api_host = $::os_service_default,
$api_port = $::os_service_default,
$dataplane_driver_ipvpn = 'ovs',
$enabled = true,
@@ -98,6 +103,7 @@ class neutron::agents::bagpipe (
}
neutron_bgpvpn_bagpipe_config {
'api/host': value => $api_host;
'api/port': value => $api_port;
'bgp/local_address': value => $local_address;
'bgp/peers': value => join(any2array($peers), ',');

View File

@@ -0,0 +1,4 @@
---
features:
- |
The new ``neutron::agents::bagpipe::api_host`` parameter has been added.

View File

@@ -21,6 +21,7 @@ describe 'neutron::agents::bagpipe' do
let :params do
{
:my_as => 64512,
:api_host => '192.168.0.100',
:api_port => 8082,
:dataplane_driver_ipvpn => 'ovs',
:enabled => true,
@@ -58,6 +59,7 @@ describe 'neutron::agents::bagpipe' do
end
it 'configures bgp.conf' do
should contain_neutron_bgpvpn_bagpipe_config('api/host').with_value(p[:api_host])
should contain_neutron_bgpvpn_bagpipe_config('api/port').with_value(p[:api_port])
should contain_neutron_bgpvpn_bagpipe_config('bgp/local_address').with_value(p[:local_address])
should contain_neutron_bgpvpn_bagpipe_config('bgp/peers').with_value(p[:peers])