1 # == Class: nova::network::flatdhcp
3 # Configures nova-network with flat dhcp option
8 # (required) The IPv4 CIDR for the flat network
11 # (optional) FlatDHCP will bridge into this interface
14 # [*public_interface*]
18 # [*flat_network_bridge*]
19 # (optional) Bridge for simple network instances (
22 # [*force_dhcp_release*]
23 # (optional) Send a dhcp release on instance termination
27 # (optional) Whether to attempt to inject network setup into guest
31 # (optional) domain to use for building the hostnames
32 # Defaults to 'novalocal'
35 # (optional) 'location of nova-dhcpbridge'
36 # Defaults to '/usr/bin/nova-dhcpbridge'
38 # [*dhcpbridge_flagfile*]
39 # (optional) location of flagfiles for dhcpbridge
40 # Defaults to '/etc/nova/nova.conf
42 class nova::network::flatdhcp (
44 $flat_interface = undef,
45 $public_interface = undef,
46 $flat_network_bridge = 'br100',
47 $force_dhcp_release = true,
48 $flat_injected = false,
49 $dhcp_domain = 'novalocal',
50 $dhcpbridge = '/usr/bin/nova-dhcpbridge',
51 $dhcpbridge_flagfile = '/etc/nova/nova.conf'
54 if $::osfamily == 'RedHat' and $::operatingsystem != 'Fedora' {
55 package { 'dnsmasq-utils': ensure => present }
58 if $public_interface {
59 nova_config { 'DEFAULT/public_interface': value => $public_interface }
63 'DEFAULT/network_manager': value => 'nova.network.manager.FlatDHCPManager';
64 'DEFAULT/fixed_range': value => $fixed_range;
65 'DEFAULT/flat_interface': value => $flat_interface;
66 'DEFAULT/flat_network_bridge': value => $flat_network_bridge;
67 'DEFAULT/force_dhcp_release': value => $force_dhcp_release;
68 'DEFAULT/flat_injected': value => $flat_injected;
69 'DEFAULT/dhcp_domain': value => $dhcp_domain;
70 'DEFAULT/dhcpbridge': value => $dhcpbridge;
71 'DEFAULT/dhcpbridge_flagfile': value => $dhcpbridge_flagfile;