Update nova_network type

This commits changes two things related to nova_network.

Adds vlan_start parameter. This parameter is neeed when the vlan being
created is not the first one that is created (b/c it cannot use the
vlan_start flag from nova.conf if the vlan already exists)

Removes the default openstack tenant from nova::manage::network so that the
vlans are automatically assigned to projects by default.
This commit is contained in:
Dan Bode
2012-05-08 11:47:11 -07:00
parent 6c9cb5159b
commit b65667f356
3 changed files with 8 additions and 3 deletions

View File

@@ -29,7 +29,8 @@ Puppet::Type.type(:nova_network).provide(:nova_manage) do
:project => '--project_id',
:dns2 => '--dns2',
:gateway => '--gateway',
:bridge => '--bridge'
:bridge => '--bridge',
:vlan_start => '--vlan'
}.each do |param, opt|
if resource[param]
optional_opts.push(opt).push(resource[param])

View File

@@ -40,6 +40,10 @@ Puppet::Type.newtype(:nova_network) do
end
newparam(:vlan_start) do
end
validate do
raise(Puppet::Error, 'Label must be set') unless self[:label]
end

View File

@@ -8,7 +8,7 @@
define nova::manage::network (
$network,
$num_networks = 1,
$project = 'openstack'
$project = undef
) {
File['/etc/nova/nova.conf'] -> Nova_network[$name]
@@ -18,7 +18,7 @@ define nova::manage::network (
ensure => present,
network => $network,
num_networks => $num_networks,
project => $project,
project => undef,
notify => Exec['nova-db-sync'],
}