90277442a1
neutron::plugins::ml2::netwokring_ansible should be applied after neutron::plugins::ml2, otherwise purge_config can remove the parameters unexpectedly. Also, all plugin packages should be install before configuration completes, otherwise these packages can be missing when actual code should be referred. Change-Id: Ide4e65b6deac381df954341adbb804c9432d8643
53 lines
1.1 KiB
Ruby
53 lines
1.1 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'neutron::plugins::ml2::mellanox' do
|
|
let :pre_condition do
|
|
"class { 'neutron::keystone::authtoken':
|
|
password => 'passw0rd',
|
|
}
|
|
class { 'neutron::server': }
|
|
class { 'neutron':
|
|
core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin'
|
|
}"
|
|
end
|
|
|
|
let :default_params do
|
|
{
|
|
:package_ensure => 'present'
|
|
}
|
|
end
|
|
|
|
let :params do
|
|
{}
|
|
end
|
|
|
|
shared_examples 'neutron plugin mellanox ml2' do
|
|
before do
|
|
params.merge!(default_params)
|
|
end
|
|
|
|
it { should contain_class('neutron::params') }
|
|
|
|
it 'should have' do
|
|
should contain_package('python-networking-mlnx').with(
|
|
:ensure => params[:package_ensure],
|
|
:tag => ['openstack', 'neutron-plugin-ml2-package']
|
|
)
|
|
end
|
|
end
|
|
|
|
on_supported_os({
|
|
:supported_os => OSDefaults.get_supported_os
|
|
}).each do |os,facts|
|
|
context "on #{os}" do
|
|
let (:facts) do
|
|
facts.merge!(OSDefaults.get_facts())
|
|
end
|
|
|
|
if facts[:osfamily] == 'RedHat'
|
|
it_behaves_like 'neutron plugin mellanox ml2'
|
|
end
|
|
end
|
|
end
|
|
end
|