Add coordination uri support for net-ansible-ml2
networking-ansible-ml2 recently added a configuration option for coordination via tooz, this patch adds a new parameter to set it Change-Id: I09ae3a4ab3a473484fe71db4b79cd6fc7b93b617
This commit is contained in:
parent
47f97fcbf9
commit
dc9b89a4af
|
@ -21,6 +21,10 @@
|
|||
# "manage_vlans" => false},
|
||||
# }
|
||||
#
|
||||
# [*coordination_uri*]
|
||||
# (optional) URI to use as a backend for tooz coordination
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (optional) The intended state of the python-networking-ansible
|
||||
# package, i.e. any of the possible values of the 'ensure'
|
||||
|
@ -29,7 +33,8 @@
|
|||
#
|
||||
class neutron::plugins::ml2::networking_ansible(
|
||||
$host_configs,
|
||||
$package_ensure = 'present',
|
||||
$coordination_uri = $::os_service_default,
|
||||
$package_ensure = 'present'
|
||||
) {
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
@ -46,4 +51,6 @@ class neutron::plugins::ml2::networking_ansible(
|
|||
}
|
||||
)
|
||||
create_resources(neutron::plugins::ml2::networking_ansible_host, $host_configs)
|
||||
|
||||
neutron_plugin_ml2 {'ml2_ansible/coordination_uri': value => $coordination_uri; }
|
||||
}
|
||||
|
|
|
@ -18,7 +18,8 @@ describe 'neutron::plugins::ml2::networking_ansible' do
|
|||
'ansible_user' => 'ansible',
|
||||
'ansible_ssh_private_key_file' => '/path/to/key',
|
||||
'mac' => '01:23:45:67:89:AB',
|
||||
'manage_vlans' => false},}
|
||||
'manage_vlans' => false},},
|
||||
:coordination_uri => 'etcd://127.0.0.1:2379'
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -38,6 +39,11 @@ describe 'neutron::plugins::ml2::networking_ansible' do
|
|||
should contain_package('python2-networking-ansible').that_requires('Anchor[neutron::install::begin]')
|
||||
should contain_package('python2-networking-ansible').that_notifies('Anchor[neutron::install::end]')
|
||||
end
|
||||
|
||||
it 'should configure non-host config' do
|
||||
should contain_neutron_plugin_ml2('ml2_ansible/coordination_uri').with_value('etcd://127.0.0.1:2379')
|
||||
end
|
||||
|
||||
it {
|
||||
params[:host_configs].each do |host_config|
|
||||
should contain_neutron__plugins__ml2__networking_ansible_host(host_config.first)
|
||||
|
|
Loading…
Reference in New Issue