From b252a23465ec0bf5091df661154b6d4223568f5f Mon Sep 17 00:00:00 2001 From: Joe Topjian Date: Mon, 15 Oct 2012 07:05:36 +0000 Subject: [PATCH] nova-network changes. might need to do more work. --- lib/puppet/provider/nova_network/nova_manage.rb | 7 ++++--- lib/puppet/type/nova_network.rb | 6 +++--- manifests/manage/network.pp | 2 ++ manifests/network.pp | 4 ++++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/puppet/provider/nova_network/nova_manage.rb b/lib/puppet/provider/nova_network/nova_manage.rb index efa613215..6eb293756 100644 --- a/lib/puppet/provider/nova_network/nova_manage.rb +++ b/lib/puppet/provider/nova_network/nova_manage.rb @@ -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 diff --git a/lib/puppet/type/nova_network.rb b/lib/puppet/type/nova_network.rb index 1355b3b9e..48a8ca75c 100644 --- a/lib/puppet/type/nova_network.rb +++ b/lib/puppet/type/nova_network.rb @@ -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 diff --git a/manifests/manage/network.pp b/manifests/manage/network.pp index 4421bcb78..cedc02bc1 100644 --- a/manifests/manage/network.pp +++ b/manifests/manage/network.pp @@ -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, } diff --git a/manifests/network.pp b/manifests/network.pp index 0cc7cb1ec..4b7600805 100644 --- a/manifests/network.pp +++ b/manifests/network.pp @@ -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,