3 describe 'neutron::agents::linuxbridge' do
6 "class { 'neutron': rabbit_password => 'passw0rd' }\n" +
7 "class { 'neutron::plugins::linuxbridge': }"
11 { :physical_interface_mappings => 'physnet:eth0',
12 :firewall_driver => 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver',
13 :package_ensure => 'present',
18 shared_examples_for 'neutron linuxbridge agent' do
20 it { should contain_class('neutron::params') }
22 it 'configures neutron linuxbridge agent service' do
23 should contain_service('neutron-plugin-linuxbridge-service').with(
25 :name => platform_params[:linuxbridge_agent_service],
26 :enable => params[:enable]
30 context 'with manage_service as false' do
32 params.merge!(:manage_service => false)
34 it 'should not start/stop service' do
35 should contain_service('neutron-plugin-linuxbridge-service').without_ensure
39 it 'configures linuxbridge_conf.ini' do
40 should contain_neutron_plugin_linuxbridge('LINUX_BRIDGE/physical_interface_mappings').with(
41 :value => params[:physical_interface_mappings]
43 should contain_neutron_plugin_linuxbridge('SECURITYGROUP/firewall_driver').with(
44 :value => params[:firewall_driver]
50 context 'on Debian platforms' do
52 { :osfamily => 'Debian' }
55 let :platform_params do
56 { :linuxbridge_agent_package => 'neutron-plugin-linuxbridge-agent',
57 :linuxbridge_agent_service => 'neutron-plugin-linuxbridge-agent' }
60 it_configures 'neutron linuxbridge agent'
62 it 'installs neutron linuxbridge agent package' do
63 should contain_package('neutron-plugin-linuxbridge-agent').with(
64 :ensure => params[:package_ensure],
65 :name => platform_params[:linuxbridge_agent_package]
70 context 'on RedHat platforms' do
72 { :osfamily => 'RedHat' }
75 let :platform_params do
76 { :linuxbridge_server_package => 'openstack-neutron-linuxbridge',
77 :linuxbridge_agent_service => 'neutron-linuxbridge-agent' }
80 it_configures 'neutron linuxbridge agent'
82 it 'installs neutron linuxbridge package' do
83 should contain_package('neutron-plugin-linuxbridge').with(
84 :ensure => params[:package_ensure],
85 :name => platform_params[:linuxbridge_server_package]