diff --git a/manifests/agents/ml2/ovs.pp b/manifests/agents/ml2/ovs.pp index e7edbfddf..2051bf4f3 100644 --- a/manifests/agents/ml2/ovs.pp +++ b/manifests/agents/ml2/ovs.pp @@ -46,6 +46,14 @@ # (Optional) The timeout in seconds for OVSDB commands. # Defaults to $facts['os_service_default'] # +# [*of_listen_address*] +# (Optional) Address to listen on for OpenFlow connections. +# Defaults to $facts['os_service_default'] +# +# [*of_listen_port*] +# (Optional) Port to listen on for OpenFlow connections. +# Defaults to $facts['os_service_default'] +# # [*of_connect_timeout*] # (Optional) Timeout in seconds to wait for the local switch # connecting to the controller. @@ -259,6 +267,8 @@ class neutron::agents::ml2::ovs ( $bridge_uplinks = [], $bridge_mappings = [], $ovsdb_timeout = $facts['os_service_default'], + $of_listen_address = $facts['os_service_default'], + $of_listen_port = $facts['os_service_default'], $of_connect_timeout = $facts['os_service_default'], $of_request_timeout = $facts['os_service_default'], $of_inactivity_probe = $facts['os_service_default'], @@ -466,6 +476,8 @@ class neutron::agents::ml2::ovs ( 'agent/tunnel_csum': value => $tunnel_csum; 'agent/explicitly_egress_direct': value => $explicitly_egress_direct; 'ovs/ovsdb_timeout': value => $ovsdb_timeout; + 'ovs/of_listen_address': value => $of_listen_address; + 'ovs/of_listen_port': value => $of_listen_port; 'ovs/of_connect_timeout': value => $of_connect_timeout; 'ovs/of_request_timeout': value => $of_request_timeout; 'ovs/of_inactivity_probe': value => $of_inactivity_probe; diff --git a/releasenotes/notes/of_listen_address-and-port-5aad4dd86516f7ed.yaml b/releasenotes/notes/of_listen_address-and-port-5aad4dd86516f7ed.yaml new file mode 100644 index 000000000..8df1aae4d --- /dev/null +++ b/releasenotes/notes/of_listen_address-and-port-5aad4dd86516f7ed.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The ``neutron::agents::ml2::ovs`` class now supports + the ``of_listen_address`` parameter and the ``of_listen_port`` parameter. diff --git a/spec/classes/neutron_agents_ml2_ovs_spec.rb b/spec/classes/neutron_agents_ml2_ovs_spec.rb index 04eaaeffe..a5f7245b6 100644 --- a/spec/classes/neutron_agents_ml2_ovs_spec.rb +++ b/spec/classes/neutron_agents_ml2_ovs_spec.rb @@ -50,6 +50,8 @@ describe 'neutron::agents::ml2::ovs' do should contain_neutron_agent_ovs('ovs/datapath_type').with_value('') should contain_neutron_agent_ovs('ovs/vhostuser_socket_dir').with_value('') should contain_neutron_agent_ovs('ovs/ovsdb_timeout').with_value('') + should contain_neutron_agent_ovs('ovs/of_listen_address').with_value('') + should contain_neutron_agent_ovs('ovs/of_listen_port').with_value('') should contain_neutron_agent_ovs('ovs/of_connect_timeout').with_value('') should contain_neutron_agent_ovs('ovs/of_request_timeout').with_value('') should contain_neutron_agent_ovs('ovs/of_inactivity_probe').with_value('') @@ -271,10 +273,29 @@ describe 'neutron::agents::ml2::ovs' do end end + context 'when setting of_listen_address and of_listen_port' do + before :each do + params.merge!( + :of_listen_address => '127.0.0.1', + :of_listen_port => 6633, + ) + end + + it 'configures of_listen_address' do + should contain_neutron_agent_ovs('ovs/of_listen_address').with_value(params[:of_listen_address]) + end + + it 'configures of_listen_port' do + should contain_neutron_agent_ovs('ovs/of_listen_port').with_value(params[:of_listen_port]) + end + end + context 'when setting of_connect_timeout and of_request_timeout' do before :each do - params.merge!( :of_connect_timeout => 30, - :of_request_timeout => 20 ) + params.merge!( + :of_connect_timeout => 30, + :of_request_timeout => 20 + ) end it 'configures of_connect_timeout' do