Merge "vpp: Allow setting the host parameter"

This commit is contained in:
Zuul 2021-06-28 11:21:18 +00:00 committed by Gerrit Code Review
commit a5af9624d9
3 changed files with 20 additions and 1 deletions

View File

@ -16,6 +16,10 @@
# (optional) Whether to start/stop the service
# Defaults to true
#
# [*host*]
# (optional) Hostname to be used by the server, agents and services.
# Defaults to $::hostname
#
# [*physnets*]
# (optional) Comma-separated list of <physical_network>:<physical_interface>
# tuples mapping physical network names to agent's node-specific physical
@ -46,6 +50,7 @@ class neutron::agents::ml2::vpp (
$package_ensure = 'present',
$enabled = true,
$manage_service = true,
$host = $::host,
$physnets = $::os_service_default,
$etcd_host = $::os_service_default,
$etcd_port = $::os_service_default,
@ -66,7 +71,7 @@ class neutron::agents::ml2::vpp (
'ml2_vpp/etcd_port': value => $etcd_port;
'ml2_vpp/etcd_user': value => $etcd_user;
'ml2_vpp/etcd_pass': value => $etcd_pass;
'DEFAULT/host': value => $::hostname;
'DEFAULT/host': value => $host;
}
package { 'neutron-vpp-agent':

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``host`` parameter has been added to
the ``neutron::agents::ml2::vpp`` class.

View File

@ -65,6 +65,15 @@ describe 'neutron::agents::ml2::vpp' do
end
end
context 'with the host parameter' do
before :each do
params.merge!(:host => 'myhost')
end
it 'should set the host parameter' do
should contain_neutron_agent_vpp('DEFAULT/host').with_value('myhost')
end
end
context 'when supplying a physnet mapping' do
before :each do
params.merge!(:physnets => 'physnet0:GigabitEthernet2/2/0,physnet1:GigabitEthernet2/2/1')