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:
@@ -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])
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'],
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user