Skip to content

Commit

Permalink
nova-network changes. might need to do more work.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtopjian committed Oct 15, 2012
1 parent fc30821 commit b252a23
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
7 changes: 4 additions & 3 deletions lib/puppet/provider/nova_network/nova_manage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ def create
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
Expand Down
6 changes: 3 additions & 3 deletions lib/puppet/type/nova_network.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@
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
Expand Down
2 changes: 2 additions & 0 deletions manifests/manage/network.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
define nova::manage::network (
$network,
$num_networks = 1,
$network_size = 255,
$project = undef
) {

Expand All @@ -18,6 +19,7 @@
ensure => present,
network => $network,
num_networks => $num_networks,
network_size => $network_size,
project => $project,
}

Expand Down
4 changes: 4 additions & 0 deletions manifests/network.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
$fixed_range,
$public_interface = undef,
$num_networks = 1,
$network_size = 255,
$floating_range = false,
$enabled = false,
$network_manager = 'nova.network.manager.FlatDHCPManager',
Expand Down Expand Up @@ -56,6 +57,7 @@
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':
Expand Down Expand Up @@ -94,6 +96,8 @@
$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,
Expand Down

0 comments on commit b252a23

Please sign in to comment.