diff --git a/lib/puppet/provider/neutron_plugin_midonet/ini_setting.rb b/lib/puppet/provider/neutron_plugin_midonet/ini_setting.rb deleted file mode 100644 index 10d494403..000000000 --- a/lib/puppet/provider/neutron_plugin_midonet/ini_setting.rb +++ /dev/null @@ -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 diff --git a/lib/puppet/type/neutron_network.rb b/lib/puppet/type/neutron_network.rb index 650b1622c..c4ab9cde5 100644 --- a/lib/puppet/type/neutron_network.rb +++ b/lib/puppet/type/neutron_network.rb @@ -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 diff --git a/lib/puppet/type/neutron_plugin_midonet.rb b/lib/puppet/type/neutron_plugin_midonet.rb deleted file mode 100644 index 999eb9869..000000000 --- a/lib/puppet/type/neutron_plugin_midonet.rb +++ /dev/null @@ -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('') - end - - autorequire(:file) do - ['/etc/neutron/plugins/midonet'] - end - - autorequire(:anchor) do - ['neutron::install::end'] - end - -end diff --git a/manifests/config.pp b/manifests/config.pp index c9909e3a8..49ee91bc0 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -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) diff --git a/manifests/init.pp b/manifests/init.pp index ce5bf705c..3d3538f2c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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: # diff --git a/manifests/plugins/midonet.pp b/manifests/plugins/midonet.pp deleted file mode 100644 index 68b2ba4e5..000000000 --- a/manifests/plugins/midonet.pp +++ /dev/null @@ -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') -} diff --git a/manifests/plugins/ml2/midonet.pp b/manifests/plugins/ml2/midonet.pp deleted file mode 100644 index cd5f50cb3..000000000 --- a/manifests/plugins/ml2/midonet.pp +++ /dev/null @@ -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://: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') - -} diff --git a/manifests/plugins/ml2/type_driver.pp b/manifests/plugins/ml2/type_driver.pp index 1a5081403..aa2593137 100644 --- a/manifests/plugins/ml2/type_driver.pp +++ b/manifests/plugins/ml2/type_driver.pp @@ -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) { diff --git a/releasenotes/notes/remove-midonet-cdd807af92001d78.yaml b/releasenotes/notes/remove-midonet-cdd807af92001d78.yaml new file mode 100644 index 000000000..f16572c8a --- /dev/null +++ b/releasenotes/notes/remove-midonet-cdd807af92001d78.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + Support for the midonet plugin has been removed. diff --git a/spec/acceptance/neutron_config_spec.rb b/spec/acceptance/neutron_config_spec.rb index a2c6d8ba8..10bfc6c5e 100644 --- a/spec/acceptance/neutron_config_spec.rb +++ b/spec/acceptance/neutron_config_spec.rb @@ -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 => '', - } - - neutron_plugin_midonet { 'DEFAULT/thisshouldexist2' : - value => '', - 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', diff --git a/spec/unit/provider/neutron_plugin_midonet/ini_setting_spec.rb b/spec/unit/provider/neutron_plugin_midonet/ini_setting_spec.rb deleted file mode 100644 index 42597b5a8..000000000 --- a/spec/unit/provider/neutron_plugin_midonet/ini_setting_spec.rb +++ /dev/null @@ -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 is specified as a value' do - resource = Puppet::Type::Neutron_plugin_midonet.new( - {:name => 'dude/foo', :value => ''} - ) - 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 diff --git a/spec/unit/type/neutron_plugin_midonet_spec.rb b/spec/unit/type/neutron_plugin_midonet_spec.rb deleted file mode 100644 index b61fcc40f..000000000 --- a/spec/unit/type/neutron_plugin_midonet_spec.rb +++ /dev/null @@ -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