Merge "Deprecate support for the midonet plugin"
This commit is contained in:
commit
f62cc00aa7
@ -75,9 +75,6 @@
|
|||||||
# [*plugin_nvp_config*]
|
# [*plugin_nvp_config*]
|
||||||
# (optional) Manage configuration of /etc/neutron/plugins/nicira/nvp.ini
|
# (optional) Manage configuration of /etc/neutron/plugins/nicira/nvp.ini
|
||||||
#
|
#
|
||||||
# [*plugin_midonet_config*]
|
|
||||||
# (optional) Manage configuration of plugins/midonet/midonet.ini
|
|
||||||
#
|
|
||||||
# [*plugin_opencontrail_config*]
|
# [*plugin_opencontrail_config*]
|
||||||
# (optional) Manage configuration of plugins/opencontrail/ContrailPlugin.ini
|
# (optional) Manage configuration of plugins/opencontrail/ContrailPlugin.ini
|
||||||
#
|
#
|
||||||
@ -107,6 +104,9 @@
|
|||||||
# [*plugin_plumgrid_config*]
|
# [*plugin_plumgrid_config*]
|
||||||
# (optional) Manage configuration of plugins/plumgrid/plumgrid.ini
|
# (optional) Manage configuration of plugins/plumgrid/plumgrid.ini
|
||||||
#
|
#
|
||||||
|
# [*plugin_midonet_config*]
|
||||||
|
# (optional) Manage configuration of plugins/midonet/midonet.ini
|
||||||
|
#
|
||||||
# NOTE: The configuration MUST NOT be already handled by this module
|
# NOTE: The configuration MUST NOT be already handled by this module
|
||||||
# or Puppet catalog compilation will fail with duplicate resources.
|
# or Puppet catalog compilation will fail with duplicate resources.
|
||||||
#
|
#
|
||||||
@ -128,7 +128,6 @@ class neutron::config (
|
|||||||
$vpnaas_agent_config = {},
|
$vpnaas_agent_config = {},
|
||||||
$bgp_dragent_config = {},
|
$bgp_dragent_config = {},
|
||||||
$plugin_linuxbridge_config = {},
|
$plugin_linuxbridge_config = {},
|
||||||
$plugin_midonet_config = {},
|
|
||||||
$plugin_opencontrail_config = {},
|
$plugin_opencontrail_config = {},
|
||||||
$plugin_nuage_config = {},
|
$plugin_nuage_config = {},
|
||||||
$plugin_ml2_config = {},
|
$plugin_ml2_config = {},
|
||||||
@ -140,6 +139,7 @@ class neutron::config (
|
|||||||
$plugin_cisco_l2network_config = undef,
|
$plugin_cisco_l2network_config = undef,
|
||||||
$plugin_cisco_config = undef,
|
$plugin_cisco_config = undef,
|
||||||
$plugin_plumgrid_config = undef,
|
$plugin_plumgrid_config = undef,
|
||||||
|
$plugin_midonet_config = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include neutron::deps
|
include neutron::deps
|
||||||
@ -168,6 +168,10 @@ will be removed in a future release. Use the api_paste_ini parameter instead.')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $plugin_midonet_config != undef {
|
||||||
|
warning('The plugin_midonet_config parameter has been deprecated and has no effect')
|
||||||
|
}
|
||||||
|
|
||||||
validate_legacy(Hash, 'validate_hash', $server_config)
|
validate_legacy(Hash, 'validate_hash', $server_config)
|
||||||
validate_legacy(Hash, 'validate_hash', $api_paste_ini_real)
|
validate_legacy(Hash, 'validate_hash', $api_paste_ini_real)
|
||||||
validate_legacy(Hash, 'validate_hash', $ovs_agent_config)
|
validate_legacy(Hash, 'validate_hash', $ovs_agent_config)
|
||||||
@ -185,7 +189,6 @@ will be removed in a future release. Use the api_paste_ini parameter instead.')
|
|||||||
validate_legacy(Hash, 'validate_hash', $vpnaas_agent_config)
|
validate_legacy(Hash, 'validate_hash', $vpnaas_agent_config)
|
||||||
validate_legacy(Hash, 'validate_hash', $bgp_dragent_config)
|
validate_legacy(Hash, 'validate_hash', $bgp_dragent_config)
|
||||||
validate_legacy(Hash, 'validate_hash', $plugin_linuxbridge_config)
|
validate_legacy(Hash, 'validate_hash', $plugin_linuxbridge_config)
|
||||||
validate_legacy(Hash, 'validate_hash', $plugin_midonet_config)
|
|
||||||
validate_legacy(Hash, 'validate_hash', $plugin_opencontrail_config)
|
validate_legacy(Hash, 'validate_hash', $plugin_opencontrail_config)
|
||||||
validate_legacy(Hash, 'validate_hash', $plugin_nuage_config)
|
validate_legacy(Hash, 'validate_hash', $plugin_nuage_config)
|
||||||
validate_legacy(Hash, 'validate_hash', $plugin_ml2_config)
|
validate_legacy(Hash, 'validate_hash', $plugin_ml2_config)
|
||||||
@ -207,7 +210,6 @@ will be removed in a future release. Use the api_paste_ini parameter instead.')
|
|||||||
create_resources('neutron_vpnaas_agent_config', $vpnaas_agent_config)
|
create_resources('neutron_vpnaas_agent_config', $vpnaas_agent_config)
|
||||||
create_resources('neutron_bgp_dragent_config', $bgp_dragent_config)
|
create_resources('neutron_bgp_dragent_config', $bgp_dragent_config)
|
||||||
create_resources('neutron_plugin_linuxbridge', $plugin_linuxbridge_config)
|
create_resources('neutron_plugin_linuxbridge', $plugin_linuxbridge_config)
|
||||||
create_resources('neutron_plugin_midonet', $plugin_midonet_config)
|
|
||||||
create_resources('neutron_plugin_opencontrail', $plugin_opencontrail_config)
|
create_resources('neutron_plugin_opencontrail', $plugin_opencontrail_config)
|
||||||
create_resources('neutron_plugin_nuage', $plugin_nuage_config)
|
create_resources('neutron_plugin_nuage', $plugin_nuage_config)
|
||||||
create_resources('neutron_plugin_ml2', $plugin_ml2_config)
|
create_resources('neutron_plugin_ml2', $plugin_ml2_config)
|
||||||
|
@ -55,7 +55,6 @@ class neutron::deps {
|
|||||||
Anchor['neutron::config::begin'] -> Neutron_plugin_cisco_l2network<||> ~> Anchor['neutron::config::end']
|
Anchor['neutron::config::begin'] -> Neutron_plugin_cisco_l2network<||> ~> Anchor['neutron::config::end']
|
||||||
Anchor['neutron::config::begin'] -> Neutron_plugin_linuxbridge<||> ~> Anchor['neutron::config::end']
|
Anchor['neutron::config::begin'] -> Neutron_plugin_linuxbridge<||> ~> Anchor['neutron::config::end']
|
||||||
Anchor['neutron::config::begin'] -> Neutron_l2gw_service_config<||> ~> Anchor['neutron::config::end']
|
Anchor['neutron::config::begin'] -> Neutron_l2gw_service_config<||> ~> Anchor['neutron::config::end']
|
||||||
Anchor['neutron::config::begin'] -> Neutron_plugin_midonet<||> ~> Anchor['neutron::config::end']
|
|
||||||
Anchor['neutron::config::begin'] -> Neutron_plugin_ml2<||> ~> Anchor['neutron::config::end']
|
Anchor['neutron::config::begin'] -> Neutron_plugin_ml2<||> ~> Anchor['neutron::config::end']
|
||||||
Anchor['neutron::config::begin'] -> Neutron_plugin_nuage<||> ~> Anchor['neutron::config::end']
|
Anchor['neutron::config::begin'] -> Neutron_plugin_nuage<||> ~> Anchor['neutron::config::end']
|
||||||
Anchor['neutron::config::begin'] -> Neutron_plugin_nvp<||> ~> Anchor['neutron::config::end']
|
Anchor['neutron::config::begin'] -> Neutron_plugin_nvp<||> ~> Anchor['neutron::config::end']
|
||||||
|
@ -13,9 +13,6 @@ class neutron::params {
|
|||||||
$cisco_config_file = '/etc/neutron/plugins/cisco/cisco_plugins.ini'
|
$cisco_config_file = '/etc/neutron/plugins/cisco/cisco_plugins.ini'
|
||||||
$opencontrail_plugin_package = 'neutron-plugin-contrail'
|
$opencontrail_plugin_package = 'neutron-plugin-contrail'
|
||||||
$opencontrail_config_file = '/etc/neutron/plugins/opencontrail/ContrailPlugin.ini'
|
$opencontrail_config_file = '/etc/neutron/plugins/opencontrail/ContrailPlugin.ini'
|
||||||
$midonet_server_package = "python${pyvers}-networking-midonet"
|
|
||||||
$midonet_server_package_ext = "python${pyvers}-networking-midonet-ext"
|
|
||||||
$midonet_config_file = '/etc/neutron/plugins/midonet/midonet.ini'
|
|
||||||
$ovn_plugin_package = "python${pyvers}-networking-ovn"
|
$ovn_plugin_package = "python${pyvers}-networking-ovn"
|
||||||
$vpp_plugin_package = "python${pyvers}-networking-vpp"
|
$vpp_plugin_package = "python${pyvers}-networking-vpp"
|
||||||
$vpp_agent_service = 'neutron-vpp-agent'
|
$vpp_agent_service = 'neutron-vpp-agent'
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# == Class: midonet::neutron_plugin
|
# == Class: midonet::neutron_plugin
|
||||||
#
|
#
|
||||||
|
# DEPERECATED !
|
||||||
# Install and configure Midonet Neutron Plugin. Please note that this manifest
|
# Install and configure Midonet Neutron Plugin. Please note that this manifest
|
||||||
# does not install the 'python-networking-midonet' package, it only
|
# does not install the 'python-networking-midonet' package, it only
|
||||||
# configures Neutron to do so needed for this deployment. Check out the
|
# configures Neutron to do so needed for this deployment. Check out the
|
||||||
@ -110,83 +111,5 @@ class neutron::plugins::midonet (
|
|||||||
include neutron::deps
|
include neutron::deps
|
||||||
include neutron::params
|
include neutron::params
|
||||||
|
|
||||||
if $midonet_api_ip {
|
warning('Support for the midonet plugin has been deprecated and has no effect')
|
||||||
# If we got midonet_api_ip here, display deprecation warning and use this value.
|
|
||||||
warning('The midonet_api_ip parameter is going to be removed in future releases. Use the midonet_cluster_ip parameter instead.')
|
|
||||||
$cluster_ip = $midonet_api_ip
|
|
||||||
} else {
|
|
||||||
$cluster_ip = $midonet_cluster_ip
|
|
||||||
}
|
|
||||||
|
|
||||||
if $midonet_api_port {
|
|
||||||
# If we got midonet_api_port here, display deprecation warning and use this value.
|
|
||||||
warning('The midonet_api_port parameter is going to be removed in future releases. Use the midonet_cluster_port parameter instead.')
|
|
||||||
$cluster_port = $midonet_api_port
|
|
||||||
} else {
|
|
||||||
$cluster_port = $midonet_cluster_port
|
|
||||||
}
|
|
||||||
|
|
||||||
ensure_resource('file', '/etc/neutron/plugins/midonet',
|
|
||||||
{
|
|
||||||
ensure => directory,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'neutron',
|
|
||||||
mode => '0640'
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
resources { 'neutron_plugin_midonet':
|
|
||||||
purge => $purge_config,
|
|
||||||
}
|
|
||||||
|
|
||||||
package { 'python-networking-midonet':
|
|
||||||
ensure => $package_ensure,
|
|
||||||
name => $::neutron::params::midonet_server_package,
|
|
||||||
tag => ['openstack', 'neutron-package'],
|
|
||||||
}
|
|
||||||
|
|
||||||
neutron_plugin_midonet {
|
|
||||||
'MIDONET/midonet_uri': value => "http://${cluster_ip}:${cluster_port}/midonet-api";
|
|
||||||
'MIDONET/username': value => $keystone_username;
|
|
||||||
'MIDONET/password': value => $keystone_password, secret =>true;
|
|
||||||
'MIDONET/project_id': value => $keystone_tenant;
|
|
||||||
}
|
|
||||||
|
|
||||||
if $::osfamily == 'Debian' {
|
|
||||||
file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG':
|
|
||||||
path => '/etc/default/neutron-server',
|
|
||||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
|
||||||
line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::midonet_config_file}",
|
|
||||||
tag => 'neutron-file-line',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# In RH, this link is used to start Neutron process but in Debian, it's used only
|
|
||||||
# to manage database synchronization.
|
|
||||||
if defined(File['/etc/neutron/plugin.ini']) {
|
|
||||||
File <| path == '/etc/neutron/plugin.ini' |> { target => $::neutron::params::midonet_config_file }
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
file {'/etc/neutron/plugin.ini':
|
|
||||||
ensure => link,
|
|
||||||
target => $::neutron::params::midonet_config_file,
|
|
||||||
tag => 'neutron-config-file'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if $sync_db {
|
|
||||||
Package<| title == 'python-networking-midonet' |> ~> Exec['midonet-db-sync']
|
|
||||||
exec { 'midonet-db-sync':
|
|
||||||
command => 'neutron-db-manage --subproject networking-midonet upgrade head',
|
|
||||||
path => '/usr/bin',
|
|
||||||
subscribe => [
|
|
||||||
Anchor['neutron::install::end'],
|
|
||||||
Anchor['neutron::config::end'],
|
|
||||||
Anchor['neutron::dbsync::begin'],
|
|
||||||
Exec['neutron-db-sync']
|
|
||||||
],
|
|
||||||
notify => Anchor['neutron::dbsync::end'],
|
|
||||||
refreshonly => true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# == Class: neutron::plugins::ml2::midonet
|
# == Class: neutron::plugins::ml2::midonet
|
||||||
#
|
#
|
||||||
|
# DEPRECATED !
|
||||||
# Configure the Mech Driver for midonet neutron plugin
|
# Configure the Mech Driver for midonet neutron plugin
|
||||||
#
|
#
|
||||||
# === Parameters:
|
# === Parameters:
|
||||||
@ -27,11 +28,6 @@ class neutron::plugins::ml2::midonet (
|
|||||||
|
|
||||||
include neutron::deps
|
include neutron::deps
|
||||||
|
|
||||||
neutron_plugin_ml2 {
|
warning('Support for the midonet plugin has been deprecated and has no effect')
|
||||||
'MIDONET/midonet_uri' : value => $midonet_uri;
|
|
||||||
'MIDONET/username' : value => $username;
|
|
||||||
'MIDONET/password' : value => $password, secret => true;
|
|
||||||
'MIDONET/project_id' : value => $project_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
Support for the midonet plugin has been deprecated and has no effect now.
|
||||||
|
It will be removed completely in a future release.
|
@ -128,7 +128,6 @@ describe 'neutron::config' do
|
|||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:plugin_linuxbridge_config => config_hash,
|
:plugin_linuxbridge_config => config_hash,
|
||||||
:plugin_midonet_config => config_hash,
|
|
||||||
:plugin_nsx_config => config_hash,
|
:plugin_nsx_config => config_hash,
|
||||||
:plugin_nvp_config => config_hash,
|
:plugin_nvp_config => config_hash,
|
||||||
:plugin_opencontrail_config => config_hash,
|
:plugin_opencontrail_config => config_hash,
|
||||||
@ -143,12 +142,6 @@ describe 'neutron::config' do
|
|||||||
should contain_neutron_plugin_linuxbridge('DEFAULT/baz').with_ensure('absent')
|
should contain_neutron_plugin_linuxbridge('DEFAULT/baz').with_ensure('absent')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configures arbitrary neutron_plugin_midonet configurations' do
|
|
||||||
should contain_neutron_plugin_midonet('DEFAULT/foo').with_value('fooValue')
|
|
||||||
should contain_neutron_plugin_midonet('DEFAULT/bar').with_value('barValue')
|
|
||||||
should contain_neutron_plugin_midonet('DEFAULT/baz').with_ensure('absent')
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configures arbitrary neutron_plugin_nsx configurations' do
|
it 'configures arbitrary neutron_plugin_nsx configurations' do
|
||||||
should contain_neutron_plugin_nsx('DEFAULT/foo').with_value('fooValue')
|
should contain_neutron_plugin_nsx('DEFAULT/foo').with_value('fooValue')
|
||||||
should contain_neutron_plugin_nsx('DEFAULT/bar').with_value('barValue')
|
should contain_neutron_plugin_nsx('DEFAULT/bar').with_value('barValue')
|
||||||
|
@ -1,113 +0,0 @@
|
|||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'neutron::plugins::midonet' do
|
|
||||||
let :pre_condition do
|
|
||||||
"class { 'neutron::keystone::authtoken':
|
|
||||||
password => 'passw0rd',
|
|
||||||
}
|
|
||||||
class { 'neutron::server': }
|
|
||||||
class { 'neutron': }"
|
|
||||||
end
|
|
||||||
|
|
||||||
let :default_params do
|
|
||||||
{
|
|
||||||
:midonet_cluster_ip => '127.0.0.1',
|
|
||||||
:midonet_cluster_port => '8181',
|
|
||||||
:keystone_username => 'neutron',
|
|
||||||
:keystone_password => 'test_midonet',
|
|
||||||
:keystone_tenant => 'services',
|
|
||||||
:purge_config => false,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
shared_examples 'neutron midonet plugin' do
|
|
||||||
|
|
||||||
let :params do
|
|
||||||
{}
|
|
||||||
end
|
|
||||||
|
|
||||||
before do
|
|
||||||
params.merge!(default_params)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'should install package python-networking-midonet' do
|
|
||||||
should contain_package('python-networking-midonet').with(
|
|
||||||
:ensure => 'present')
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'should create plugin symbolic link' do
|
|
||||||
should contain_file('/etc/neutron/plugin.ini').with(
|
|
||||||
:ensure => 'link',
|
|
||||||
:target => '/etc/neutron/plugins/midonet/midonet.ini')
|
|
||||||
should contain_file('/etc/neutron/plugin.ini').that_requires('Anchor[neutron::config::begin]')
|
|
||||||
should contain_file('/etc/neutron/plugin.ini').that_notifies('Anchor[neutron::config::end]')
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'passes purge to resource' do
|
|
||||||
should contain_resources('neutron_plugin_midonet').with({
|
|
||||||
:purge => false
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'should perform default configuration of' do
|
|
||||||
midonet_uri = "http://" + params[:midonet_cluster_ip] + ":" + params[:midonet_cluster_port] + "/midonet-api";
|
|
||||||
should contain_neutron_plugin_midonet('MIDONET/midonet_uri').with_value(midonet_uri)
|
|
||||||
should contain_neutron_plugin_midonet('MIDONET/username').with_value(params[:keystone_username])
|
|
||||||
should contain_neutron_plugin_midonet('MIDONET/password').with_value(params[:keystone_password])
|
|
||||||
should contain_neutron_plugin_midonet('MIDONET/project_id').with_value(params[:keystone_tenant])
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
shared_examples 'neutron midonet plugin using deprecated params' do
|
|
||||||
let :params do
|
|
||||||
{
|
|
||||||
:midonet_api_ip => '192.168.0.1',
|
|
||||||
:midonet_api_port => '8181',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
before do
|
|
||||||
params.merge!(default_params)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'should take into account deprecated parameters first' do
|
|
||||||
midonet_uri = "http://" + params[:midonet_api_ip] + ":" + params[:midonet_api_port] + "/midonet-api";
|
|
||||||
should contain_neutron_plugin_midonet('MIDONET/midonet_uri').with_value(midonet_uri)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'should take into account deprecated parameters first' do
|
|
||||||
bad_midonet_uri = "http://" + params[:midonet_cluster_ip] + ":" + params[:midonet_cluster_port] + "/midonet-api";
|
|
||||||
should_not contain_neutron_plugin_midonet('MIDONET/midonet_uri').with_value(bad_midonet_uri)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
shared_examples 'neutron midonet plugin on Debian' do
|
|
||||||
it 'configures /etc/default/neutron-server' do
|
|
||||||
should contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').with(
|
|
||||||
:path => '/etc/default/neutron-server',
|
|
||||||
:match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
|
||||||
:line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugins/midonet/midonet.ini',
|
|
||||||
)
|
|
||||||
should contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_requires('Anchor[neutron::config::begin]')
|
|
||||||
should contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_notifies('Anchor[neutron::config::end]')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
on_supported_os({
|
|
||||||
:supported_os => OSDefaults.get_supported_os
|
|
||||||
}).each do |os,facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let (:facts) do
|
|
||||||
facts.merge!(OSDefaults.get_facts())
|
|
||||||
end
|
|
||||||
|
|
||||||
it_behaves_like 'neutron midonet plugin'
|
|
||||||
it_behaves_like 'neutron midonet plugin using deprecated params'
|
|
||||||
|
|
||||||
if facts[:osfamily] == 'Debian'
|
|
||||||
it_behaves_like 'neutron midonet plugin on Debian'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,64 +0,0 @@
|
|||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'neutron::plugins::ml2::midonet' do
|
|
||||||
let :pre_condition do
|
|
||||||
"class { 'neutron::keystone::authtoken':
|
|
||||||
password => 'passw0rd',
|
|
||||||
}
|
|
||||||
class { 'neutron::server': }
|
|
||||||
class { 'neutron':
|
|
||||||
core_plugin => 'ml2'
|
|
||||||
}"
|
|
||||||
end
|
|
||||||
|
|
||||||
let :default_params do
|
|
||||||
{
|
|
||||||
:midonet_uri => 'http://localhost:8080/midonet-api',
|
|
||||||
:username => 'admin',
|
|
||||||
:password => 'passw0rd',
|
|
||||||
:project_id => 'admin',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
let :params do
|
|
||||||
{}
|
|
||||||
end
|
|
||||||
|
|
||||||
shared_examples 'neutron ml2 midonet plugin' do
|
|
||||||
before do
|
|
||||||
params.merge!(default_params)
|
|
||||||
end
|
|
||||||
|
|
||||||
it { should contain_class('neutron::params') }
|
|
||||||
|
|
||||||
it do
|
|
||||||
should contain_neutron_plugin_ml2('MIDONET/midonet_uri').with_value(params[:midonet_uri])
|
|
||||||
should contain_neutron_plugin_ml2('MIDONET/username').with_value(params[:username])
|
|
||||||
should contain_neutron_plugin_ml2('MIDONET/password').with_value(params[:password])
|
|
||||||
should contain_neutron_plugin_ml2('MIDONET/project_id').with_value(params[:project_id])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
on_supported_os({
|
|
||||||
:supported_os => OSDefaults.get_supported_os
|
|
||||||
}).each do |os,facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let (:facts) do
|
|
||||||
facts.merge!(OSDefaults.get_facts())
|
|
||||||
end
|
|
||||||
|
|
||||||
let (:platform_params) do
|
|
||||||
case facts[:osfamily]
|
|
||||||
when 'RedHat'
|
|
||||||
{
|
|
||||||
:midonet_ml2_config_file => '/etc/neutron/conf.d/neutron-server/ml2_mech_midonet.conf'
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if facts[:osfamily] == 'RedHat'
|
|
||||||
it_behaves_like 'neutron ml2 midonet plugin'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user