X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fnova%2Fmanifests%2Fnetwork%2Fflatdhcp.pp;fp=3rdparty%2Fmodules%2Fnova%2Fmanifests%2Fnetwork%2Fflatdhcp.pp;h=76869007fe036f62e76d939ac025f58deea8f7f8;hb=4631045ebb77ee8622f6fa09277a50c372bcc02e;hp=0000000000000000000000000000000000000000;hpb=3d4dc4fd9e59bd0e07646c99f6b356c7d9d859aa;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/nova/manifests/network/flatdhcp.pp b/3rdparty/modules/nova/manifests/network/flatdhcp.pp new file mode 100644 index 000000000..76869007f --- /dev/null +++ b/3rdparty/modules/nova/manifests/network/flatdhcp.pp @@ -0,0 +1,74 @@ +# == Class: nova::network::flatdhcp +# +# Configures nova-network with flat dhcp option +# +# === Parameters: +# +# [*fixed_range*] +# (required) The IPv4 CIDR for the flat network +# +# [*flat_interface*] +# (optional) FlatDHCP will bridge into this interface +# Defaults to undef +# +# [*public_interface*] +# (optional) +# Defaults to undef +# +# [*flat_network_bridge*] +# (optional) Bridge for simple network instances ( +# Defaults to 'br100' +# +# [*force_dhcp_release*] +# (optional) Send a dhcp release on instance termination +# Defaults to true +# +# [*flat_injected*] +# (optional) Whether to attempt to inject network setup into guest +# Defaults to false +# +# [*dhcp_domain*] +# (optional) domain to use for building the hostnames +# Defaults to 'novalocal' +# +# [*dhcpbridge*] +# (optional) 'location of nova-dhcpbridge' +# Defaults to '/usr/bin/nova-dhcpbridge' +# +# [*dhcpbridge_flagfile*] +# (optional) location of flagfiles for dhcpbridge +# Defaults to '/etc/nova/nova.conf +# +class nova::network::flatdhcp ( + $fixed_range, + $flat_interface = undef, + $public_interface = undef, + $flat_network_bridge = 'br100', + $force_dhcp_release = true, + $flat_injected = false, + $dhcp_domain = 'novalocal', + $dhcpbridge = '/usr/bin/nova-dhcpbridge', + $dhcpbridge_flagfile = '/etc/nova/nova.conf' +) { + + if $::osfamily == 'RedHat' and $::operatingsystem != 'Fedora' { + package { 'dnsmasq-utils': ensure => present } + } + + if $public_interface { + nova_config { 'DEFAULT/public_interface': value => $public_interface } + } + + nova_config { + 'DEFAULT/network_manager': value => 'nova.network.manager.FlatDHCPManager'; + 'DEFAULT/fixed_range': value => $fixed_range; + 'DEFAULT/flat_interface': value => $flat_interface; + 'DEFAULT/flat_network_bridge': value => $flat_network_bridge; + 'DEFAULT/force_dhcp_release': value => $force_dhcp_release; + 'DEFAULT/flat_injected': value => $flat_injected; + 'DEFAULT/dhcp_domain': value => $dhcp_domain; + 'DEFAULT/dhcpbridge': value => $dhcpbridge; + 'DEFAULT/dhcpbridge_flagfile': value => $dhcpbridge_flagfile; + } + +}