Update Midonet neutron plugin to 5.x
The newly released plugin no longer relies on a custom DHCP agent to work. Also, instead of completely overriding the neutron-db-sync we extend it with a subproject command. Change-Id: Ibd7cd38b2bcc2a0dc4814fb77cda8f90de7232bb
This commit is contained in:
parent
7ad7a07e50
commit
6570e84597
@ -110,9 +110,6 @@ class neutron::agents::dhcp (
|
|||||||
Package[$::neutron::params::dnsmasq_packages] -> Package<| title == 'neutron-dhcp-agent' |>
|
Package[$::neutron::params::dnsmasq_packages] -> Package<| title == 'neutron-dhcp-agent' |>
|
||||||
ensure_packages($::neutron::params::dnsmasq_packages)
|
ensure_packages($::neutron::params::dnsmasq_packages)
|
||||||
}
|
}
|
||||||
/^midonet.*/: {
|
|
||||||
ensure_packages($::neutron::params::midonet_server_package)
|
|
||||||
}
|
|
||||||
default: {
|
default: {
|
||||||
fail("Unsupported dhcp_driver ${dhcp_driver}")
|
fail("Unsupported dhcp_driver ${dhcp_driver}")
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,10 @@
|
|||||||
# in the midonet config.
|
# in the midonet config.
|
||||||
# Defaults to false.
|
# Defaults to false.
|
||||||
#
|
#
|
||||||
|
# [*package_ensure*]
|
||||||
|
# Whether to install the latest package, or a version for midonet plugin
|
||||||
|
# Defaults to 'present'.
|
||||||
|
#
|
||||||
# === Examples
|
# === Examples
|
||||||
#
|
#
|
||||||
# An example call would be:
|
# An example call would be:
|
||||||
@ -79,6 +83,7 @@ class neutron::plugins::midonet (
|
|||||||
$keystone_tenant = 'services',
|
$keystone_tenant = 'services',
|
||||||
$sync_db = false,
|
$sync_db = false,
|
||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
|
$package_ensure = 'present'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::neutron::deps
|
include ::neutron::deps
|
||||||
@ -95,6 +100,12 @@ class neutron::plugins::midonet (
|
|||||||
purge => $purge_config,
|
purge => $purge_config,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
package { 'python-networking-midonet':
|
||||||
|
ensure => $package_ensure,
|
||||||
|
name => $::neutron::params::midonet_server_package,
|
||||||
|
tag => ['neutron-package', 'openstack'],
|
||||||
|
}
|
||||||
|
|
||||||
neutron_plugin_midonet {
|
neutron_plugin_midonet {
|
||||||
'MIDONET/midonet_uri': value => "http://${midonet_api_ip}:${midonet_api_port}/midonet-api";
|
'MIDONET/midonet_uri': value => "http://${midonet_api_ip}:${midonet_api_port}/midonet-api";
|
||||||
'MIDONET/username': value => $keystone_username;
|
'MIDONET/username': value => $keystone_username;
|
||||||
@ -125,17 +136,18 @@ class neutron::plugins::midonet (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if $sync_db {
|
if $sync_db {
|
||||||
|
Package<| title == 'python-networking-midonet' |> ~> Exec['midonet-db-sync']
|
||||||
exec { 'midonet-db-sync':
|
exec { 'midonet-db-sync':
|
||||||
command => 'midonet-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head',
|
command => 'neutron-db-manage --subproject networking-midonet upgrade head',
|
||||||
path => '/usr/bin',
|
path => '/usr/bin',
|
||||||
subscribe => [
|
subscribe => [
|
||||||
Anchor['neutron::install::end'],
|
Anchor['neutron::install::end'],
|
||||||
Anchor['neutron::config::end'],
|
Anchor['neutron::config::end'],
|
||||||
Anchor['neutron::dbsync::begin']
|
Anchor['neutron::dbsync::begin'],
|
||||||
|
Exec['neutron-db-sync']
|
||||||
],
|
],
|
||||||
notify => Anchor['neutron::dbsync::end'],
|
notify => Anchor['neutron::dbsync::end'],
|
||||||
refreshonly => true
|
refreshonly => true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Midonet v5.x plugin doesn't rely anymore
|
||||||
|
on a custom DHCP agent, also it only uses
|
||||||
|
a subproject for db sync instead of the old
|
||||||
|
method of overriding the neutron-db-sync
|
||||||
|
completelly.
|
@ -4,8 +4,7 @@ describe 'neutron::plugins::midonet' do
|
|||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'neutron::server': password => 'password' }
|
"class { 'neutron::server': password => 'password' }
|
||||||
class { 'neutron': rabbit_password => 'passw0rd' }
|
class { 'neutron': rabbit_password => 'passw0rd' }"
|
||||||
package { 'python-networking-midonet': }"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
let :default_params do
|
let :default_params do
|
||||||
@ -35,6 +34,11 @@ describe 'neutron::plugins::midonet' do
|
|||||||
params.merge!(default_params)
|
params.merge!(default_params)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'should install package python-networking-midonet' do
|
||||||
|
is_expected.to contain_package('python-networking-midonet').with(
|
||||||
|
:ensure => 'present')
|
||||||
|
end
|
||||||
|
|
||||||
it 'should create plugin symbolic link' do
|
it 'should create plugin symbolic link' do
|
||||||
is_expected.to contain_file('/etc/neutron/plugin.ini').with(
|
is_expected.to contain_file('/etc/neutron/plugin.ini').with(
|
||||||
:ensure => 'link',
|
:ensure => 'link',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user