puppetlabs/puppetlabs-nova — pull request #130 by jtopjian (2012-06-21 22:11:59+00:00)
Title: Reversed merge args

I was trying to debug a vlan issue that I had. It turns out that #128 enabled me to get around most of the problems that I found, but I ran into another issue with the `merge` functions in `network.pp`.

IMO, `$config_overrides` should override any parameter. As an example, my `$private_interface` is different than my `$vlan_interface`. Without reversing the args, `$private_interface` will always overwrite `$config_overrides['vlan_interface']` which is bad for me.

As an extended example, here is my full `nova::network` declaration:

class { 'nova::network':
enabled => true,
network_manager => 'nova.network.manager.VlanManager',
private_interface => $::params::cloud::private_interface,
public_interface => $::params::cloud::public_interface,
fixed_range => $::params::cloud::fixed_range,
floating_range => $::params::cloud::floating_range,
num_networks => $::params::cloud::num_networks,
config_overrides => {
vlan_start => $::params::cloud::vlan_start,
vlan_interface => $::params::cloud::vlan_interface,
}
}

I don't see how I can specify `$vlan_interface` cleanly other than reversing the `merge` args.

Further, but outside of the scope of this commit, I need a clean way to get `$vlan_interface` configured on all of my compute nodes. For now, I have:

nova_config { 'vlan_interface': value => $::params::cloud::vlan_interface }

on my main compute node class, but this seems a little sloppy.

I thought about declaring `nova::network::vlan` with the needed args in the main compute node class, but then unneeded `nova.conf` parameters are introduced.