Adds configuration support for OpenDaylight SDN Controller
In order to use OpenDaylight with Neutron, ML2 must be configured to
point to the OpenDaylight controller instance. It also requires the
networking-odl python library to drive communication with ODL.
Additionally each Open vSwitch instance must be configured to set the ODL
Controller as it's manager.
Change-Id: If067e1057bec2d48f700838d86077a550bd27bd2
Signed-off-by: Tim Rozet <trozet@redhat.com>
(cherry picked from commit 45954a106a)
This commit is contained in:
committed by
Michael Chapman
parent
0f2cb57696
commit
e3ada8a858
73
spec/classes/neutron_plugins_ml2_opendaylight_spec.rb
Normal file
73
spec/classes/neutron_plugins_ml2_opendaylight_spec.rb
Normal file
@@ -0,0 +1,73 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'neutron::plugins::ml2::opendaylight' do
|
||||
|
||||
let :pre_condition do
|
||||
"class { 'neutron::server': auth_password => 'password'}
|
||||
class { 'neutron':
|
||||
rabbit_password => 'passw0rd',
|
||||
core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }"
|
||||
end
|
||||
|
||||
let :default_params do
|
||||
{
|
||||
:package_ensure => 'present',
|
||||
#:odl_username => '',
|
||||
#:odl_password => '',
|
||||
#:odl_url => '',
|
||||
}
|
||||
end
|
||||
|
||||
let :params do
|
||||
{
|
||||
}
|
||||
end
|
||||
|
||||
let :test_facts do
|
||||
{
|
||||
:operatingsystem => 'default',
|
||||
:operatingsystemrelease => 'default',
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
shared_examples_for 'neutron plugin opendaylight ml2' do
|
||||
before do
|
||||
params.merge!(default_params)
|
||||
end
|
||||
|
||||
it 'should have' do
|
||||
is_expected.to contain_package('python-networking-odl').with(
|
||||
:ensure => params[:package_ensure],
|
||||
:tag => 'openstack'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configures ml2_odl settings' do
|
||||
is_expected.to contain_neutron_plugin_ml2('ml2_odl/password').with_ensure('absent')
|
||||
is_expected.to contain_neutron_plugin_ml2('ml2_odl/username').with_ensure('absent')
|
||||
is_expected.to contain_neutron_plugin_ml2('ml2_odl/url').with_ensure('absent')
|
||||
end
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
test_facts.merge({
|
||||
:osfamily => 'RedHat',
|
||||
:operatingsystemrelease => '7'
|
||||
})
|
||||
end
|
||||
|
||||
it_configures 'neutron plugin opendaylight ml2'
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
test_facts.merge({
|
||||
:osfamily => 'Debian',
|
||||
})
|
||||
end
|
||||
|
||||
it_configures 'neutron plugin opendaylight ml2'
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user