Remove support for Midonet plugin

... because it was deprecated during Wallaby cucle[1].

[1] a86f572e4f

Change-Id: I2ae75ce152aaeade2575e4d731e0a66e4beeefc8
This commit is contained in:
Takashi Kajinami 2021-09-11 22:21:56 +09:00
parent c4918bea49
commit fda16dec3c
12 changed files with 7 additions and 350 deletions

View File

@ -1,15 +0,0 @@
Puppet::Type.type(:neutron_plugin_midonet).provide(
:ini_setting,
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def self.file_path
'/etc/neutron/plugins/midonet/midonet.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -42,7 +42,7 @@ Puppet::Type.newtype(:neutron_network) do
newproperty(:provider_network_type) do
desc 'The physical mechanism by which the virtual network is realized.'
newvalues(:flat, :vlan, :local, :gre, :l3_ext, :vxlan, :uplink)
newvalues(:flat, :vlan, :local, :gre, :l3_ext, :vxlan)
end
newproperty(:provider_physical_network) do

View File

@ -1,56 +0,0 @@
Puppet::Type.newtype(:neutron_plugin_midonet) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from midonet.ini'
newvalues(/\S+\/\S+/)
end
newproperty(:value) do
desc 'The value of the setting to be defined.'
munge do |value|
value = value.to_s.strip
value.capitalize! if value =~ /^(true|false)$/i
value
end
def is_to_s( currentvalue )
if resource.secret?
return '[old secret redacted]'
else
return currentvalue
end
end
def should_to_s( newvalue )
if resource.secret?
return '[new secret redacted]'
else
return newvalue
end
end
end
newparam(:secret, :boolean => true) do
desc 'Whether to hide the value from Puppet logs. Defaults to `false`.'
newvalues(:true, :false)
defaultto false
end
newparam(:ensure_absent_val) do
desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
defaultto('<SERVICE DEFAULT>')
end
autorequire(:file) do
['/etc/neutron/plugins/midonet']
end
autorequire(:anchor) do
['neutron::install::end']
end
end

View File

@ -92,9 +92,6 @@
# [*api_config*]
# (optional) Manage configuration of api-paste.ini
#
# [*plugin_midonet_config*]
# (optional) Manage configuration of plugins/midonet/midonet.ini
#
# NOTE: The configuration MUST NOT be already handled by this module
# or Puppet catalog compilation will fail with duplicate resources.
#
@ -123,7 +120,6 @@ class neutron::config (
$plugin_nvp_config = {},
# DEPRECATED PARAMETERS
$api_config = undef,
$plugin_midonet_config = undef,
) {
include neutron::deps
@ -136,10 +132,6 @@ will be removed in a future release. Use the api_paste_ini parameter instead.')
$api_paste_ini_real = $api_paste_ini
}
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', $api_paste_ini_real)
validate_legacy(Hash, 'validate_hash', $ovs_agent_config)

View File

@ -24,8 +24,8 @@
# [*core_plugin*]
# (optional) Neutron plugin provider
# Defaults to ml2
# Could be bigswitch, brocade, embrane, hyperv, midonet,
# ml2, mlnx, nec, nicira, ryu, nuage, opencontrail, nsx
# Could be bigswitch, brocade, embrane, hyperv, ml2, mlnx, nec, nicira, ryu,
# nuage, opencontrail, nsx
#
# Example for nuage:
#

View File

@ -1,115 +0,0 @@
# == Class: midonet::neutron_plugin
#
# DEPERECATED !
# Install and configure Midonet Neutron Plugin. Please note that this manifest
# does not install the 'python-networking-midonet' package, it only
# configures Neutron to do so needed for this deployment. Check out the
# MidoNet module to do so.
#
# === Parameters
#
# [*midonet_cluster_ip*]
# IP address of the MidoNet Cluster service.
# Defaults to '127.0.0.1'
#
# [*midonet_cluster_port*]
# Port on which the MidoNet Cluster listens.
# Defaults to '8181'
#
# [*keystone_username*]
# Username with which MidoNet Cluster will authenticate against Keystone.
# Defaults to 'neutron'
#
# [*keystone_password*]
# Password for the user that will be used to authenticate against Keystone.
# Defaults to $::os_service_default
#
# [*keystone_tenant*]
# Tenant for the user that will be used to authenticate against Keystone.
# Defaults to 'services'
#
# [*sync_db*]
# Whether 'midonet-db-manage' should run to create and/or sync the database
# with MidoNet specific tables.
# Defaults to false
#
# [*purge_config*]
# (optional) Whether to set only the specified config options
# in the midonet config.
# Defaults to false
#
# [*package_ensure*]
# Whether to install the latest package, or a specific version
# of the MidoNet plugin.
# Defaults to 'present'
#
# DEPRECATED PARAMETERS
#
# [*midonet_api_ip*]
# (DEPRECATED) IP address of the MidoNet API service.
# Defaults to undef
#
# [*midonet_api_port*]
# (DEPRECATED) Port on which the MidoNet API service listens.
# Defaults to undef
#
# === Examples
#
# An example call would be:
#
# class {'neutron:plugins::midonet':
# midonet_cluster_ip => '23.123.5.32',
# midonet_cluster_port => '8181',
# keystone_username => 'neutron',
# keystone_password => '32kjaxT0k3na',
# keystone_tenant => 'services',
# sync_db => true
# }
#
# You can alternatively use the Hiera's yaml style:
# neutron::plugin::midonet::midonet_cluster_ip: '23.213.5.32'
# neutron::plugin::midonet::port: '8181'
# neutron::plugin::midonet::keystone_username: 'neutron'
# neutron::plugin::midonet::keystone_password: '32kjaxT0k3na'
# neutron::plugin::midonet::keystone_tenant: 'services'
# neutron::plugin::midonet::sync_db: true
#
# === Authors
#
# Midonet (http://MidoNet.org)
#
# === Copyright
#
# Copyright (c) 2015 Midokura SARL, All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
class neutron::plugins::midonet (
$midonet_cluster_ip = '127.0.0.1',
$midonet_cluster_port = '8181',
$keystone_username = 'neutron',
$keystone_password = $::os_service_default,
$keystone_tenant = 'services',
$sync_db = false,
$purge_config = false,
$package_ensure = 'present',
# DEPRECATED PARAMETERS
$midonet_api_ip = undef,
$midonet_api_port = undef,
) {
include neutron::deps
include neutron::params
warning('Support for the midonet plugin has been deprecated and has no effect')
}

View File

@ -1,33 +0,0 @@
# == Class: neutron::plugins::ml2::midonet
#
# DEPRECATED !
# Configure the Mech Driver for midonet neutron plugin
#
# === Parameters:
#
# [*midonet_uri*]
# (required) MidoNet API server URI.
# Usually of the form 'http://<midonet-api-hostname>:8080/midonet-api'
#
# [*username*]
# (required) MidoNet admin username.
#
# [*password*]
# (required) MidoNet admin password.
#
# [*project_id*]
# (optional) Name of the project that MidoNet admin user belongs to.
# Defaults to 'services'
#
class neutron::plugins::ml2::midonet (
$midonet_uri,
$username,
$password,
$project_id = 'services',
) {
include neutron::deps
warning('Support for the midonet plugin has been deprecated and has no effect')
}

View File

@ -115,9 +115,6 @@ define neutron::plugins::ml2::type_driver (
elsif ($name == 'nexus_vxlan') {
# Nexus_vxlan type driver has its own class separate from this one
}
elsif ($name == 'midonet') or ($name == 'uplink') {
# midonet type driver has its own class separate from this one
}
elsif ($name == 'geneve') {
validate_vni_ranges($vni_ranges)
if !is_service_default($max_header_size) {

View File

@ -0,0 +1,4 @@
---
upgrade:
- |
Support for the midonet plugin has been removed.

View File

@ -15,7 +15,6 @@ describe 'basic neutron_config resource' do
'/etc/neutron/plugins/ml2/ml2_conf.ini',
'/etc/neutron/plugins/nicira/nvp.ini',
'/etc/neutron/vpn_agent.ini',
'/etc/neutron/plugins/midonet/midonet.ini',
'/etc/neutron/plugins/opencontrail/ContrailPlugin.ini',
'/etc/neutron/plugins/vmware/nsx.ini',
'/etc/neutron/plugins/ml2/ml2_conf_sriov.ini',
@ -37,7 +36,6 @@ describe 'basic neutron_config resource' do
File <||> -> Neutron_plugin_nvp <||>
File <||> -> Neutron_l2gw_service_config <||>
File <||> -> Neutron_vpnaas_agent_config <||>
File <||> -> Neutron_plugin_midonet <||>
File <||> -> Neutron_plugin_opencontrail <||>
File <||> -> Neutron_agent_linuxbridge <||>
File <||> -> Neutron_agent_ovs <||>
@ -53,7 +51,6 @@ describe 'basic neutron_config resource' do
'/etc/neutron/plugins/linuxbridge',
'/etc/neutron/plugins/ml2',
'/etc/neutron/plugins/nicira',
'/etc/neutron/plugins/midonet',
'/etc/neutron/plugins/opencontrail',
'/etc/neutron/plugins/vmware']
@ -70,7 +67,6 @@ describe 'basic neutron_config resource' do
'/etc/neutron/plugins/ml2/ml2_conf.ini',
'/etc/neutron/plugins/nicira/nvp.ini',
'/etc/neutron/vpn_agent.ini',
'/etc/neutron/plugins/midonet/midonet.ini',
'/etc/neutron/plugins/opencontrail/ContrailPlugin.ini',
'/etc/neutron/plugins/vmware/nsx.ini',
'/etc/neutron/plugins/ml2/ml2_conf_sriov.ini',
@ -282,24 +278,6 @@ describe 'basic neutron_config resource' do
ensure_absent_val => 'toto',
}
neutron_plugin_midonet { 'DEFAULT/thisshouldexist' :
value => 'foo',
}
neutron_plugin_midonet { 'DEFAULT/thisshouldnotexist' :
value => '<SERVICE DEFAULT>',
}
neutron_plugin_midonet { 'DEFAULT/thisshouldexist2' :
value => '<SERVICE DEFAULT>',
ensure_absent_val => 'toto',
}
neutron_plugin_midonet { 'DEFAULT/thisshouldnotexist2' :
value => 'toto',
ensure_absent_val => 'toto',
}
neutron_plugin_opencontrail { 'DEFAULT/thisshouldexist' :
value => 'foo',
}
@ -475,7 +453,6 @@ describe 'basic neutron_config resource' do
'neutron_plugin_ml2',
'neutron_plugin_nvp',
'neutron_vpnaas_agent_config',
'neutron_plugin_midonet',
'neutron_plugin_opencontrail',
'neutron_agent_linuxbridge',
'neutron_agent_ovs',

View File

@ -1,74 +0,0 @@
$LOAD_PATH.push(
File.join(
File.dirname(__FILE__),
'..',
'..',
'..',
'fixtures',
'modules',
'inifile',
'lib')
)
$LOAD_PATH.push(
File.join(
File.dirname(__FILE__),
'..',
'..',
'..',
'fixtures',
'modules',
'openstacklib',
'lib')
)
require 'spec_helper'
provider_class = Puppet::Type.type(:neutron_plugin_midonet).provider(:ini_setting)
describe provider_class do
it 'should default to the default setting when no other one is specified' do
resource = Puppet::Type::Neutron_plugin_midonet.new(
{
:name => 'DEFAULT/foo',
:value => 'bar'
}
)
provider = provider_class.new(resource)
expect(provider.section).to eq('DEFAULT')
expect(provider.setting).to eq('foo')
expect(provider.file_path).to eq('/etc/neutron/plugins/midonet/midonet.ini')
end
it 'should allow setting to be set explicitly' do
resource = Puppet::Type::Neutron_plugin_midonet.new(
{
:name => 'dude/foo',
:value => 'bar'
}
)
provider = provider_class.new(resource)
expect(provider.section).to eq('dude')
expect(provider.setting).to eq('foo')
expect(provider.file_path).to eq('/etc/neutron/plugins/midonet/midonet.ini')
end
it 'should ensure absent when <SERVICE DEFAULT> is specified as a value' do
resource = Puppet::Type::Neutron_plugin_midonet.new(
{:name => 'dude/foo', :value => '<SERVICE DEFAULT>'}
)
provider = provider_class.new(resource)
provider.exists?
expect(resource[:ensure]).to eq :absent
end
it 'should ensure absent when value matches ensure_absent_val' do
resource = Puppet::Type::Neutron_plugin_midonet.new(
{:name => 'dude/foo', :value => 'foo', :ensure_absent_val => 'foo' }
)
provider = provider_class.new(resource)
provider.exists?
expect(resource[:ensure]).to eq :absent
end
end

View File

@ -1,20 +0,0 @@
require 'puppet'
require 'puppet/type/neutron_plugin_midonet'
describe 'Puppet::Type.type(:neutron_plugin_midonet)' do
before :each do
@neutron_plugin_midonet = Puppet::Type.type(:neutron_plugin_midonet).new(:name => 'DEFAULT/foo', :value => 'bar')
end
it 'should autorequire the package that install the file' do
catalog = Puppet::Resource::Catalog.new
anchor = Puppet::Type.type(:anchor).new(:name => 'neutron::install::end')
catalog.add_resource anchor, @neutron_plugin_midonet
dependency = @neutron_plugin_midonet.autorequire
expect(dependency.size).to eq(1)
expect(dependency[0].target).to eq(@neutron_plugin_midonet)
expect(dependency[0].source).to eq(anchor)
end
end