Add Opendaylight ML2 configuration options

Two additional config options, port_binding_controller and
odl_hostconf_uri are added to Opendaylight ML2 config file.
Those settings are required for integrating VPP with Honeycomb
agent support.

Partial-Bug: 1675211

Change-Id: I5004fdeb238dea81bc4f7e9437843a8a080d5b46
Signed-off-by: Feng Pan <fpan@redhat.com>
(cherry picked from commit 5adc803d22)
(cherry picked from commit c35df3a6c3)
This commit is contained in:
Feng Pan 2017-02-02 18:36:08 -05:00 committed by Tim Rozet
parent 628fc95121
commit 859c5abb7c
2 changed files with 29 additions and 13 deletions

View File

@ -29,12 +29,22 @@
# (optional) The URI used to connect to the local OVSDB server
# Defaults to 'tcp:127.0.0.1:6639'
#
# [*port_binding_controller*]
# (optional) Name of the controller to be used for port binding.
# Defaults to $::os_service_default
#
# [*odl_hostconf_uri*]
# (optional) Path for ODL host configuration REST interface.
# Defaults to $::os_service_default
#
class neutron::plugins::ml2::opendaylight (
$package_ensure = 'present',
$odl_username = $::os_service_default,
$odl_password = $::os_service_default,
$odl_url = $::os_service_default,
$ovsdb_connection = 'tcp:127.0.0.1:6639',
$package_ensure = 'present',
$odl_username = $::os_service_default,
$odl_password = $::os_service_default,
$odl_url = $::os_service_default,
$ovsdb_connection = 'tcp:127.0.0.1:6639',
$port_binding_controller = $::os_service_default,
$odl_hostconf_uri = $::os_service_default,
) {
include ::neutron::deps
@ -48,9 +58,11 @@ class neutron::plugins::ml2::opendaylight (
)
neutron_plugin_ml2 {
'ml2_odl/username': value => $odl_username;
'ml2_odl/password': value => $odl_password;
'ml2_odl/url': value => $odl_url;
'ml2_odl/username': value => $odl_username;
'ml2_odl/password': value => $odl_password;
'ml2_odl/url': value => $odl_url;
'ml2_odl/port_binding_controller': value => $port_binding_controller;
'ml2_odl/odl_hostconf_uri': value => $odl_hostconf_uri;
}
neutron_config {

View File

@ -11,11 +11,13 @@ describe 'neutron::plugins::ml2::opendaylight' do
let :default_params do
{
:package_ensure => 'present',
:odl_username => '<SERVICE DEFAULT>',
:odl_password => '<SERVICE DEFAULT>',
:odl_url => '<SERVICE DEFAULT>',
:ovsdb_connection => 'tcp:127.0.0.1:6639'
:package_ensure => 'present',
:odl_username => '<SERVICE DEFAULT>',
:odl_password => '<SERVICE DEFAULT>',
:odl_url => '<SERVICE DEFAULT>',
:ovsdb_connection => 'tcp:127.0.0.1:6639',
:port_binding_controller => '<SERVICE DEFAULT>',
:odl_hostconf_uri => '<SERVICE DEFAULT>'
}
end
@ -48,6 +50,8 @@ describe 'neutron::plugins::ml2::opendaylight' do
is_expected.to contain_neutron_plugin_ml2('ml2_odl/password').with_value(params[:odl_password])
is_expected.to contain_neutron_plugin_ml2('ml2_odl/username').with_value(params[:odl_username])
is_expected.to contain_neutron_plugin_ml2('ml2_odl/url').with_value(params[:odl_url])
is_expected.to contain_neutron_plugin_ml2('ml2_odl/port_binding_controller').with_value(params[:port_binding_controller])
is_expected.to contain_neutron_plugin_ml2('ml2_odl/odl_hostconf_uri').with_value(params[:odl_hostconf_uri])
end
it 'configures neutron server settings' do