3 describe 'nova::network::flatdhcp' do
5 describe 'with only required parameters' do
8 :flat_interface => 'eth1',
9 :fixed_range => '10.0.0.0/32'
13 it { should contain_nova_config('DEFAULT/network_manager').with_value('nova.network.manager.FlatDHCPManager') }
14 it { should_not contain_nova_config('DEFAULT/public_interface') }
15 it { should contain_nova_config('DEFAULT/fixed_range').with_value('10.0.0.0/32') }
16 it { should contain_nova_config('DEFAULT/flat_interface').with_value('eth1') }
17 it { should contain_nova_config('DEFAULT/flat_interface').with_value('eth1') }
18 it { should contain_nova_config('DEFAULT/flat_network_bridge').with_value('br100') }
19 it { should contain_nova_config('DEFAULT/force_dhcp_release').with_value(true) }
20 it { should contain_nova_config('DEFAULT/flat_injected').with_value(false) }
21 it { should contain_nova_config('DEFAULT/dhcpbridge').with_value('/usr/bin/nova-dhcpbridge') }
22 it { should contain_nova_config('DEFAULT/dhcpbridge_flagfile').with_value('/etc/nova/nova.conf') }
25 describe 'when overriding class parameters' do
29 :flat_interface => 'eth1',
30 :fixed_range => '10.0.0.0/32',
31 :public_interface => 'eth0',
32 :flat_network_bridge => 'br1001',
33 :force_dhcp_release => false,
34 :flat_injected => true,
35 :dhcpbridge => '/usr/bin/dhcpbridge',
36 :dhcpbridge_flagfile => '/etc/nova/nova-dhcp.conf'
40 it { should contain_nova_config('DEFAULT/public_interface').with_value('eth0') }
41 it { should contain_nova_config('DEFAULT/flat_network_bridge').with_value('br1001') }
42 it { should contain_nova_config('DEFAULT/force_dhcp_release').with_value(false) }
43 it { should contain_nova_config('DEFAULT/flat_injected').with_value(true) }
44 it { should contain_nova_config('DEFAULT/dhcpbridge').with_value('/usr/bin/dhcpbridge') }
45 it { should contain_nova_config('DEFAULT/dhcpbridge_flagfile').with_value('/etc/nova/nova-dhcp.conf') }