]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/nova/spec/classes/nova_network_vlan_spec.rb
ddfaaba1e47c51ff18d1db6548d11d1a9ef8474b
[dsa-puppet.git] / 3rdparty / modules / nova / spec / classes / nova_network_vlan_spec.rb
1 require 'spec_helper'
2
3 describe 'nova::network::vlan' do
4
5   describe 'with only required parameters' do
6     let :params do
7       {
8         :vlan_interface => 'eth1',
9         :fixed_range    => '10.0.0.0/32'
10       }
11     end
12
13     it { should contain_nova_config('DEFAULT/network_manager').with_value('nova.network.manager.VlanManager') }
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/vlan_start').with_value('300') }
17     it { should contain_nova_config('DEFAULT/vlan_interface').with_value('eth1') }
18     it { should contain_nova_config('DEFAULT/force_dhcp_release').with_value(true) }
19     it { should contain_nova_config('DEFAULT/dhcpbridge').with_value('/usr/bin/nova-dhcpbridge') }
20     it { should contain_nova_config('DEFAULT/dhcpbridge_flagfile').with_value('/etc/nova/nova.conf') }
21
22   end
23
24   describe 'with parameters overridden' do
25
26     let :params do
27       {
28         :vlan_interface   => 'eth1',
29         :fixed_range      => '10.0.0.0/32',
30         :public_interface => 'eth0',
31         :vlan_start       => '100',
32         :force_dhcp_release  => false,
33         :dhcpbridge          => '/usr/bin/dhcpbridge',
34         :dhcpbridge_flagfile => '/etc/nova/nova-dhcp.conf'
35       }
36     end
37
38     it { should contain_nova_config('DEFAULT/network_manager').with_value('nova.network.manager.VlanManager') }
39     it { should contain_nova_config('DEFAULT/public_interface').with_value('eth0') }
40     it { should contain_nova_config('DEFAULT/fixed_range').with_value('10.0.0.0/32') }
41     it { should contain_nova_config('DEFAULT/vlan_start').with_value('100') }
42     it { should contain_nova_config('DEFAULT/vlan_interface').with_value('eth1') }
43     it { should contain_nova_config('DEFAULT/force_dhcp_release').with_value(false) }
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') }
46   end
47 end