try again, with puppetforge modules, correctly included now
[mirror/dsa-puppet.git] / 3rdparty / modules / nova / manifests / manage / network.pp
1 # === Parameters:
2 #
3 # [*network*]
4 #   (required) IPv4 CIDR of network to create.
5 #
6 # [*num_networks*]
7 #   (optional) Number of networks to split $network into.
8 #   Defaults to 1
9 #
10 # [*network_size*]
11 #   (optional) Size of the network to create
12 #   Defaults to 255
13 #
14 # [*vlan_start*]
15 #   (optional) The vlan number to use if in vlan mode
16 #   Defaults to undef
17 #
18 # [*project*]
19 #   (optional) Project that network should be associated with
20 #   Defaults to undef
21 #
22 define nova::manage::network (
23   $network,
24   $label        = 'novanetwork',
25   $num_networks = 1,
26   $network_size = 255,
27   $vlan_start   = undef,
28   $project      = undef
29 ) {
30
31   File['/etc/nova/nova.conf'] -> Nova_network[$name]
32   Exec<| title == 'nova-db-sync' |> -> Nova_network[$name]
33
34   nova_network { $name:
35     ensure       => present,
36     network      => $network,
37     label        => $label,
38     num_networks => $num_networks,
39     network_size => $network_size,
40     project      => $project,
41     vlan_start   => $vlan_start,
42   }
43
44 }