diff --git a/manifests/agents/ml2/linuxbridge.pp b/manifests/agents/ml2/linuxbridge.pp index ee3518699..d8e2e99f5 100644 --- a/manifests/agents/ml2/linuxbridge.pp +++ b/manifests/agents/ml2/linuxbridge.pp @@ -101,6 +101,16 @@ class neutron::agents::ml2::linuxbridge ( } } + if size($tunnel_types) > 0 { + neutron_agent_linuxbridge { + 'agent/tunnel_types': value => join($tunnel_types, ','); + } + } else { + neutron_agent_linuxbridge { + 'agent/tunnel_types': ensure => absent; + } + } + neutron_agent_linuxbridge { 'agent/polling_interval': value => $polling_interval; 'linux_bridge/physical_interface_mappings': value => join($physical_interface_mappings, ','); diff --git a/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb b/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb index c483353f5..e05d7fefa 100644 --- a/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb +++ b/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb @@ -35,6 +35,7 @@ describe 'neutron::agents::ml2::linuxbridge' do is_expected.to contain_neutron_agent_linuxbridge('agent/polling_interval').with_value('') is_expected.to contain_neutron_agent_linuxbridge('linux_bridge/physical_interface_mappings').with_value(default_params[:physical_interface_mappings].join(',')) is_expected.to contain_neutron_agent_linuxbridge('securitygroup/firewall_driver').with_value(default_params[:firewall_driver]) + is_expected.to contain_neutron_agent_linuxbridge('agent/tunnel_types').with_ensure('absent') end it 'installs neutron linuxbridge agent package' do @@ -96,6 +97,7 @@ describe 'neutron::agents::ml2::linuxbridge' do is_expected.to contain_neutron_agent_linuxbridge('vxlan/vxlan_ttl').with_value('') is_expected.to contain_neutron_agent_linuxbridge('vxlan/vxlan_tos').with_value('') is_expected.to contain_neutron_agent_linuxbridge('vxlan/l2_population').with_value('') + is_expected.to contain_neutron_agent_linuxbridge('agent/tunnel_types').with_value(params[:tunnel_types]) end end