Files
puppet-neutron/spec/classes/neutron_plugins_ml2_bigswitch_spec.rb
Jiri Stransky f8ec8a20a0 Configure Big Switch ML2 plugin
Adds a class to install the Big Switch ML2 plugin and another one to
configure the [restproxy] section of ml2_conf.ini. Currently, only
RedHat osfamily is supported.

Change-Id: If027762f70695c31dbca6151373a0ebe6e75d071
2015-08-24 11:44:18 +02:00

61 lines
1.3 KiB
Ruby

require 'spec_helper'
describe 'neutron::plugins::ml2::bigswitch' 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'
}
end
let :params do
{}
end
let :default_facts do
{
:operatingsystem => 'default',
:operatingsystemrelease => 'default',
}
end
shared_examples_for 'neutron plugin bigswitch ml2' do
before do
params.merge!(default_params)
end
it { is_expected.to contain_class('neutron::params') }
it 'should have' do
is_expected.to contain_package('python-networking-bigswitch').with(
:ensure => params[:package_ensure],
:tag => 'openstack'
)
end
end
context 'on RedHat platforms' do
let :facts do
default_facts.merge({:osfamily => 'RedHat'})
end
it_configures 'neutron plugin bigswitch ml2'
end
context 'on Debian platforms' do
let :facts do
default_facts.merge({:osfamily => 'Debian'})
end
it { is_expected.to raise_error(Puppet::Error, /Unsupported osfamily Debian/) }
end
end