nova-network changes. might need to do more work.

This commit is contained in:
Joe Topjian 2012-10-15 07:05:36 +00:00
parent fc30821d4e
commit b252a23465
4 changed files with 13 additions and 6 deletions

View File

@ -38,9 +38,10 @@ Puppet::Type.type(:nova_network).provide(:nova_manage) do
end
nova_manage('network', 'create',
"--label=#{resource[:label]}",
"--fixed_range_v4=#{resource[:name]}",
"--num_networks=#{resource[:num_networks]}",
resource[:label],
resource[:name],
resource[:num_networks],
resource[:network_size],
optional_opts
)
end

View File

@ -31,17 +31,17 @@ Puppet::Type.newtype(:nova_network) do
desc 'project that the network is associated with'
end
# we are not currently using this stuff
newparam(:gateway) do
end
newparam(:dns2) do
end
newparam(:vlan_start) do
end
newparam(:network_size) do
defaultto('256')
end
validate do

View File

@ -8,6 +8,7 @@
define nova::manage::network (
$network,
$num_networks = 1,
$network_size = 255,
$project = undef
) {
@ -18,6 +19,7 @@ define nova::manage::network (
ensure => present,
network => $network,
num_networks => $num_networks,
network_size => $network_size,
project => $project,
}

View File

@ -16,6 +16,7 @@ class nova::network(
$fixed_range,
$public_interface = undef,
$num_networks = 1,
$network_size = 255,
$floating_range = false,
$enabled = false,
$network_manager = 'nova.network.manager.FlatDHCPManager',
@ -56,6 +57,7 @@ class nova::network(
nova::manage::network { 'nova-vm-net':
network => $fixed_range,
num_networks => $num_networks,
network_size => $network_size,
}
if $floating_range {
nova::manage::floating { 'nova-vm-floating':
@ -94,6 +96,8 @@ class nova::network(
$vlan_resource = { 'nova::network::vlan' => $resource_parameters }
create_resources('class', $vlan_resource)
}
# I don't think this is applicable to Folsom...
# If it is, the details will need changed. -jt
'nova.network.quantum.manager.QuantumManager': {
$parameters = { fixed_range => $fixed_range,
public_interface => $public_interface,