
Outdated Keystone authtoken options have been deprecated for a while (admin_*), removing them completely from manifests, providers and tests as a first step of moving puppet-neutron to keystone::resource::authtoken usage Depends-On: I3018932a106df562e94067e037b3bc862be97b51 Depends-On: Ic9e0302ce7350a49806e0c8dad1449b84dec8613 Change-Id: I51f05efa150fe7de13df02bfe19e50f49b3b7c0c Related-bug: #1604463
75 lines
1.8 KiB
Ruby
75 lines
1.8 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'neutron::plugins::ml2::opendaylight' do
|
|
|
|
let :pre_condition do
|
|
"class { 'neutron::server': password => 'password'}
|
|
class { 'neutron':
|
|
rabbit_password => 'passw0rd',
|
|
core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }"
|
|
end
|
|
|
|
let :default_params do
|
|
{
|
|
:package_ensure => 'present',
|
|
:odl_username => '<SERVICE DEFAULT>',
|
|
:odl_password => '<SERVICE DEFAULT>',
|
|
:odl_url => '<SERVICE DEFAULT>',
|
|
}
|
|
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_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])
|
|
end
|
|
end
|
|
|
|
|
|
context 'on RedHat platforms' do
|
|
let :facts do
|
|
@default_facts.merge(test_facts.merge({
|
|
:osfamily => 'RedHat',
|
|
:operatingsystemrelease => '7'
|
|
}))
|
|
end
|
|
|
|
it_configures 'neutron plugin opendaylight ml2'
|
|
end
|
|
|
|
context 'on Debian platforms' do
|
|
let :facts do
|
|
@default_facts.merge(test_facts.merge({
|
|
:osfamily => 'Debian',
|
|
}))
|
|
end
|
|
|
|
it_configures 'neutron plugin opendaylight ml2'
|
|
end
|
|
end
|