diff --git a/lib/puppet/provider/neutron_agent_linuxbridge/ini_setting.rb b/lib/puppet/provider/neutron_agent_linuxbridge/ini_setting.rb deleted file mode 100644 index 1b5855edd..000000000 --- a/lib/puppet/provider/neutron_agent_linuxbridge/ini_setting.rb +++ /dev/null @@ -1,10 +0,0 @@ -Puppet::Type.type(:neutron_agent_linuxbridge).provide( - :ini_setting, - :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) -) do - - def self.file_path - '/etc/neutron/plugins/ml2/linuxbridge_agent.ini' - end - -end diff --git a/lib/puppet/type/neutron_agent_linuxbridge.rb b/lib/puppet/type/neutron_agent_linuxbridge.rb deleted file mode 100644 index 76614870e..000000000 --- a/lib/puppet/type/neutron_agent_linuxbridge.rb +++ /dev/null @@ -1,28 +0,0 @@ -Puppet::Type.newtype(:neutron_agent_linuxbridge) do - - ensurable - - newparam(:name, :namevar => true) do - desc 'Section/setting name to manage from linuxbridge agent config.' - 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 - 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(:anchor) do - ['neutron::install::end'] - end - -end diff --git a/manifests/agents/ml2/linuxbridge.pp b/manifests/agents/ml2/linuxbridge.pp deleted file mode 100644 index c7180fcc1..000000000 --- a/manifests/agents/ml2/linuxbridge.pp +++ /dev/null @@ -1,174 +0,0 @@ -# == Class: neutron::agents::ml2::linuxbridge -# -# DEPRECATED !! -# Setups Linuxbridge Neutron agent for ML2 plugin. -# -# === Parameters -# -# [*package_ensure*] -# (optional) Package ensure state. -# Defaults to 'present'. -# -# [*enabled*] -# (required) Whether or not to enable the agent. -# Defaults to true. -# -# [*manage_service*] -# (optional) Whether to start/stop the service -# Defaults to true -# -# [*tunnel_types*] -# (optional) List of types of tunnels to use when utilizing tunnels. -# Supported tunnel types are: vxlan. -# Defaults to an empty list. -# -# [*local_ip*] -# (optional) Local IP address to use for VXLAN endpoints. -# Required when enabling tunneling. -# Defaults to false. -# -# [*vxlan_group*] -# (optional) Multicast group for vxlan interface. If unset, disables VXLAN -# multicast mode. Should be an Multicast IP (v4 or v6) address. -# Default to '224.0.0.1'. -# -# [*vxlan_ttl*] -# (optional) TTL for vxlan interface protocol packets.. -# Default to undef. -# -# [*vxlan_tos*] -# (optional) TOS for vxlan interface protocol packets.. -# Defaults to undef. -# -# [*polling_interval*] -# (optional) The number of seconds the agent will wait between -# polling for local device changes. -# Defaults to 2. -# -# [*rpc_response_max_timeout*] -# (Optional) Maximum seconds to wait for a response from an RPC call -# Defaults to: $facts['os_service_default'] -# -# [*l2_population*] -# (optional) Extension to use alongside ml2 plugin's l2population -# mechanism driver. It enables the plugin to populate VXLAN forwarding table. -# Defaults to false. -# -# [*physical_interface_mappings*] -# (optional) List of : -# tuples mapping physical network names to agent's node-specific physical -# network interfaces. Defaults to empty list. -# -# [*bridge_mappings*] -# (optional) List of : -# Defaults to empty list -# -# [*firewall_driver*] -# (optional) Firewall driver for realizing neutron security group function. -# Defaults to 'iptables'. -# -# [*purge_config*] -# (optional) Whether to set only the specified config options -# in the linuxbridge config. -# Defaults to false. -# -class neutron::agents::ml2::linuxbridge ( - $package_ensure = 'present', - Boolean $enabled = true, - Boolean $manage_service = true, - Array $tunnel_types = [], - $local_ip = false, - $vxlan_group = $facts['os_service_default'], - $vxlan_ttl = $facts['os_service_default'], - $vxlan_tos = $facts['os_service_default'], - $polling_interval = $facts['os_service_default'], - $rpc_response_max_timeout = $facts['os_service_default'], - $l2_population = $facts['os_service_default'], - Array $physical_interface_mappings = [], - Array $bridge_mappings = [], - $firewall_driver = 'iptables', - Boolean $purge_config = false, -) { - - include neutron::deps - include neutron::params - - warning('Support for the linuxbridge mechanism driver has been deprecated.') - - resources { 'neutron_agent_linuxbridge': - purge => $purge_config, - } - - if ('vxlan' in $tunnel_types) { - - if ! $local_ip { - fail('The local_ip parameter is required when vxlan tunneling is enabled') - } - - neutron_agent_linuxbridge { - 'vxlan/ttl': value => $vxlan_ttl; - 'vxlan/vxlan_group': value => $vxlan_group; - 'vxlan/tos': value => $vxlan_tos; - 'vxlan/local_ip': value => $local_ip; - 'vxlan/l2_population': value => $l2_population; - } - } else { - neutron_agent_linuxbridge { - 'vxlan/enable_vxlan': value => false; - 'vxlan/local_ip': ensure => absent; - } - } - - if size($tunnel_types) > 0 { - neutron_agent_linuxbridge { - 'agent/tunnel_types': value => join($tunnel_types, ','); - } - } else { - neutron_agent_linuxbridge { - 'agent/tunnel_types': ensure => absent; - } - } - - if size($bridge_mappings) > 0 { - neutron_agent_linuxbridge { - 'linux_bridge/bridge_mappings': value => join(any2array($bridge_mappings), ','); - } - } else { - neutron_agent_linuxbridge { - 'linux_bridge/bridge_mappings': ensure => absent; - } - } - - neutron_agent_linuxbridge { - 'agent/polling_interval': value => $polling_interval; - 'DEFAULT/rpc_response_max_timeout': value => $rpc_response_max_timeout; - 'linux_bridge/physical_interface_mappings': value => join($physical_interface_mappings, ','); - } - - if $firewall_driver { - neutron_agent_linuxbridge { 'securitygroup/firewall_driver': value => $firewall_driver } - } else { - neutron_agent_linuxbridge { 'securitygroup/firewall_driver': ensure => absent } - } - - package { 'neutron-plugin-linuxbridge-agent': - ensure => $package_ensure, - name => $::neutron::params::linuxbridge_agent_package, - tag => ['openstack', 'neutron-package'], - } - - if $manage_service { - if $enabled { - $service_ensure = 'running' - } else { - $service_ensure = 'stopped' - } - service { 'neutron-plugin-linuxbridge-agent': - ensure => $service_ensure, - name => $::neutron::params::linuxbridge_agent_service, - enable => $enabled, - tag => 'neutron-service', - } - Neutron_agent_linuxbridge<||> ~> Service['neutron-plugin-linuxbridge-agent'] - } -} diff --git a/manifests/config.pp b/manifests/config.pp index 7d805ef0b..27e78c20a 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -90,11 +90,6 @@ # [*plugin_ml2_config*] # (optional) Manage configuration of ml2_conf.ini # -# DEPRECATED PARAMETERS -# -# [*linuxbridge_agent_config*] -# (optional) Manage configuration of linuxbridge_agent.ini -# # NOTE: The configuration MUST NOT be already handled by this module # or Puppet catalog compilation will fail with duplicate resources. # @@ -122,26 +117,16 @@ class neutron::config ( Hash $taas_service_config = {}, Hash $bgp_dragent_config = {}, Hash $plugin_ml2_config = {}, - # DEPRECATED PARAMETERS - Optional[Hash] $linuxbridge_agent_config = undef, ) { include neutron::deps - if $linuxbridge_agent_config != undef { - warning('The linuxbridge_agent_config parameter is deprecated.') - $linuxbridge_agent_config_real = $linuxbridge_agent_config - } else { - $linuxbridge_agent_config_real = {} - } - create_resources('neutron_config', $server_config) create_resources('neutron_api_paste_ini', $api_paste_ini) create_resources('neutron_rootwrap_config', $rootwrap_config) create_resources('neutron_agent_ovs', $ovs_agent_config) create_resources('neutron_agent_ovn', $ovn_agent_config) create_resources('neutron_sriov_agent_config', $sriov_agent_config) - create_resources('neutron_agent_linuxbridge', $linuxbridge_agent_config_real) create_resources('neutron_agent_macvtap', $macvtap_agent_config) create_resources('neutron_bgpvpn_bagpipe_config', $bgpvpn_bagpipe_config) create_resources('neutron_bgpvpn_service_config', $bgpvpn_service_config) diff --git a/manifests/deps.pp b/manifests/deps.pp index d1d99af3e..e1737b50a 100644 --- a/manifests/deps.pp +++ b/manifests/deps.pp @@ -35,7 +35,6 @@ class neutron::deps { # All other inifile providers need to be processed in the config block Anchor['neutron::config::begin'] -> Neutron_api_paste_ini<||> -> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Neutron_api_uwsgi_config<||> -> Anchor['neutron::config::end'] - Anchor['neutron::config::begin'] -> Neutron_agent_linuxbridge<||> -> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Neutron_agent_macvtap<||> -> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Neutron_agent_ovs<||> -> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Neutron_agent_ovn<||> -> Anchor['neutron::config::end'] diff --git a/manifests/params.pp b/manifests/params.pp index 5769c31d4..0a7458738 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -7,7 +7,6 @@ class neutron::params { $client_package = 'python3-neutronclient' $ovs_agent_service = 'neutron-openvswitch-agent' - $linuxbridge_agent_service = 'neutron-linuxbridge-agent' $macvtap_agent_service = 'neutron-macvtap-agent' $dhcp_agent_service = 'neutron-dhcp-agent' $metering_agent_service = 'neutron-metering-agent' @@ -38,7 +37,6 @@ class neutron::params { $ovs_agent_package = 'openstack-neutron-openvswitch' $ovs_cleanup_service = 'neutron-ovs-cleanup' $destroy_patch_ports_service = 'neutron-destroy-patch-ports' - $linuxbridge_agent_package = 'openstack-neutron-linuxbridge' $sriov_nic_agent_service = 'neutron-sriov-nic-agent' $sriov_nic_agent_package = 'openstack-neutron-sriov-nic-agent' $macvtap_agent_package = 'openstack-neutron-macvtap-agent' @@ -102,7 +100,6 @@ class neutron::params { $ovs_agent_package = 'neutron-openvswitch-agent' $ovs_cleanup_service = undef $destroy_patch_ports_service = undef - $linuxbridge_agent_package = 'neutron-linuxbridge-agent' $sriov_nic_agent_service = 'neutron-sriov-agent' $sriov_nic_agent_package = 'neutron-sriov-agent' $macvtap_agent_package = 'neutron-macvtap-agent' diff --git a/manifests/plugins/ml2.pp b/manifests/plugins/ml2.pp index 3b129f848..b5f26f6f6 100644 --- a/manifests/plugins/ml2.pp +++ b/manifests/plugins/ml2.pp @@ -46,8 +46,7 @@ # (optional) An ordered list of networking mechanism driver # entrypoints to be loaded from the neutron.ml2.mechanism_drivers namespace. # Should be an array that can have these elements: -# logger, test, linuxbridge, openvswitch, arista, l2population, -# sriovnicswitch, macvtap +# logger, test, openvswitch, arista, l2population, sriovnicswitch, macvtap # Default to ['openvswitch']. # # [*flat_networks*] diff --git a/releasenotes/notes/remove-linuxbridge-b2a79c8fedb82037.yaml b/releasenotes/notes/remove-linuxbridge-b2a79c8fedb82037.yaml new file mode 100644 index 000000000..dc4dd08f2 --- /dev/null +++ b/releasenotes/notes/remove-linuxbridge-b2a79c8fedb82037.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + Support for linuxbridge mechanism driver has been removed. diff --git a/spec/acceptance/99_neutron_config_spec.rb b/spec/acceptance/99_neutron_config_spec.rb index fa08fd002..9ed7bb245 100644 --- a/spec/acceptance/99_neutron_config_spec.rb +++ b/spec/acceptance/99_neutron_config_spec.rb @@ -15,7 +15,6 @@ describe 'basic neutron_config resource' do '/etc/neutron/neutron_vpnaas.conf', '/etc/neutron/ovn_vpn_agent.ini', '/etc/neutron/taas_plugin.ini', - '/etc/neutron/plugins/ml2/linuxbridge_agent.ini', '/etc/neutron/plugins/ml2/openvswitch_agent.ini', '/etc/neutron/plugins/ml2/ovn_agent.ini', '/etc/neutron/plugins/ml2/sriov_agent.ini', @@ -36,7 +35,6 @@ describe 'basic neutron_config resource' do File <||> -> Neutron_vpnaas_service_config <||> File <||> -> Neutron_ovn_vpn_agent_config <||> File <||> -> Neutron_taas_service_config <||> - File <||> -> Neutron_agent_linuxbridge <||> File <||> -> Neutron_agent_ovs <||> File <||> -> Neutron_agent_ovn <||> File <||> -> Neutron_sriov_agent_config <||> @@ -61,7 +59,6 @@ describe 'basic neutron_config resource' do '/etc/neutron/neutron_vpnaas.conf', '/etc/neutron/ovn_vpn_agent.ini', '/etc/neutron/taas_plugin.ini', - '/etc/neutron/plugins/ml2/linuxbridge_agent.ini', '/etc/neutron/plugins/ml2/openvswitch_agent.ini', '/etc/neutron/plugins/ml2/ovn_agent.ini', '/etc/neutron/plugins/ml2/sriov_agent.ini', @@ -273,24 +270,6 @@ describe 'basic neutron_config resource' do ensure_absent_val => 'toto', } - neutron_agent_linuxbridge { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_agent_linuxbridge { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_agent_linuxbridge { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_agent_linuxbridge { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - neutron_agent_ovs { 'DEFAULT/thisshouldexist' : value => 'foo', } @@ -412,7 +391,6 @@ describe 'basic neutron_config resource' do 'neutron_vpnaas_service_config', 'neutron_ovn_vpn_agent_config', 'neutron_taas_service_config', - 'neutron_agent_linuxbridge', 'neutron_agent_ovs', 'neutron_agent_ovn', 'neutron_sriov_agent_config', diff --git a/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb b/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb deleted file mode 100644 index feeeb36a9..000000000 --- a/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb +++ /dev/null @@ -1,178 +0,0 @@ -require 'spec_helper' - -describe 'neutron::agents::ml2::linuxbridge' do - let :pre_condition do - "class { 'neutron': }" - end - - let :default_params do - { - :package_ensure => 'present', - :enabled => true, - :tunnel_types => [], - :local_ip => false, - :physical_interface_mappings => [], - :bridge_mappings => [], - :firewall_driver => 'iptables', - :purge_config => false,} - end - - let :params do - {} - end - - shared_examples 'neutron plugin linuxbridge agent with ml2 plugin' do - context 'with default parameters' do - it { should contain_class('neutron::params') } - - it 'passes purge to resource' do - should contain_resources('neutron_agent_linuxbridge').with({ - :purge => false - }) - end - - it 'configures ml2_conf.ini' do - should contain_neutron_agent_linuxbridge('DEFAULT/rpc_response_max_timeout').with_value('') - should contain_neutron_agent_linuxbridge('agent/polling_interval').with_value('') - should contain_neutron_agent_linuxbridge('linux_bridge/physical_interface_mappings').with_value(default_params[:physical_interface_mappings].join(',')) - should contain_neutron_agent_linuxbridge('linux_bridge/bridge_mappings').with_ensure('absent') - should contain_neutron_agent_linuxbridge('securitygroup/firewall_driver').with_value(default_params[:firewall_driver]) - should contain_neutron_agent_linuxbridge('agent/tunnel_types').with_ensure('absent') - end - - it 'installs neutron linuxbridge agent package' do - should contain_package('neutron-plugin-linuxbridge-agent').with( - :name => platform_params[:linuxbridge_agent_package], - :ensure => default_params[:package_ensure], - :tag => ['openstack', 'neutron-package'], - ) - end - - it 'configures neutron linuxbridge agent service' do - should contain_service('neutron-plugin-linuxbridge-agent').with( - :name => platform_params[:linuxbridge_agent_service], - :enable => true, - :ensure => 'running', - :tag => 'neutron-service', - ) - should contain_service('neutron-plugin-linuxbridge-agent').that_subscribes_to('Anchor[neutron::service::begin]') - should contain_service('neutron-plugin-linuxbridge-agent').that_notifies('Anchor[neutron::service::end]') - end - - context 'with manage_service as false' do - before :each do - params.merge!(:manage_service => false) - end - it 'should not manage the service' do - should_not contain_service('neutron-plugin-linuxbridge-agent') - end - end - - it 'does not configure VXLAN tunneling' do - should contain_neutron_agent_linuxbridge('vxlan/enable_vxlan').with_value(false) - should contain_neutron_agent_linuxbridge('vxlan/local_ip').with_ensure('absent') - should_not contain_neutron_agent_linuxbridge('vxlan/vxlan_group') - should_not contain_neutron_agent_linuxbridge('vxlan/l2_population') - end - end - - context 'with VXLAN tunneling enabled' do - before do - params.merge!({ - :tunnel_types => ['vxlan'], - :local_ip => '192.168.0.10' - }) - end - - context 'when providing all parameters' do - it 'configures ml2_conf.ini' do - should contain_neutron_agent_linuxbridge('vxlan/local_ip').with_value(params[:local_ip]) - should contain_neutron_agent_linuxbridge('vxlan/vxlan_group').with_value('') - should contain_neutron_agent_linuxbridge('vxlan/ttl').with_value('') - should contain_neutron_agent_linuxbridge('vxlan/tos').with_value('') - should contain_neutron_agent_linuxbridge('vxlan/l2_population').with_value('') - should contain_neutron_agent_linuxbridge('agent/tunnel_types').with_value(params[:tunnel_types]) - end - end - - context 'when not providing or overriding some parameters' do - before do - params.merge!({ - :vxlan_group => '224.0.0.2', - :vxlan_ttl => 10, - :vxlan_tos => 2, - :l2_population => true, - }) - end - - it 'configures ml2_conf.ini' do - should contain_neutron_agent_linuxbridge('vxlan/local_ip').with_value(params[:local_ip]) - should contain_neutron_agent_linuxbridge('vxlan/vxlan_group').with_value(params[:vxlan_group]) - should contain_neutron_agent_linuxbridge('vxlan/ttl').with_value(params[:vxlan_ttl]) - should contain_neutron_agent_linuxbridge('vxlan/tos').with_value(params[:vxlan_tos]) - should contain_neutron_agent_linuxbridge('vxlan/l2_population').with_value(params[:l2_population]) - end - end - end - - context 'when providing the physical_interface_mappings parameter' do - before do - params.merge!(:physical_interface_mappings => ['physnet0:eth0', 'physnet1:eth1']) - end - - it 'configures physical interface mappings' do - should contain_neutron_agent_linuxbridge('linux_bridge/physical_interface_mappings').with_value( - params[:physical_interface_mappings].join(',') - ) - end - end - - context 'when providing the bridge_mappings parameter' do - before do - params.merge!(:bridge_mappings => ['physnet0:br0', 'physnet1:br1']) - end - - it 'configures bridge mappings' do - should contain_neutron_agent_linuxbridge('linux_bridge/bridge_mappings').with_value( - params[:bridge_mappings].join(',') - ) - end - end - - context 'with firewall_driver parameter set to false' do - before :each do - params.merge!(:firewall_driver => false) - end - it 'removes firewall driver configuration' do - should contain_neutron_agent_linuxbridge('securitygroup/firewall_driver').with_ensure('absent') - 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 - - let (:platform_params) do - case facts[:os]['family'] - when 'Debian' - { - :linuxbridge_agent_package => 'neutron-linuxbridge-agent', - :linuxbridge_agent_service => 'neutron-linuxbridge-agent' - } - when 'RedHat' - { - :linuxbridge_agent_package => 'openstack-neutron-linuxbridge', - :linuxbridge_agent_service => 'neutron-linuxbridge-agent' - } - end - end - - it_behaves_like 'neutron plugin linuxbridge agent with ml2 plugin' - end - end -end diff --git a/spec/classes/neutron_config_spec.rb b/spec/classes/neutron_config_spec.rb index ea355623b..d0fa54d10 100644 --- a/spec/classes/neutron_config_spec.rb +++ b/spec/classes/neutron_config_spec.rb @@ -74,7 +74,6 @@ describe 'neutron::config' do { :ovs_agent_config => config_hash, :ovn_agent_config => config_hash, :sriov_agent_config => config_hash, - :linuxbridge_agent_config => config_hash, :macvtap_agent_config => config_hash, :l3_agent_config => config_hash, :dhcp_agent_config => config_hash, @@ -107,12 +106,6 @@ describe 'neutron::config' do should contain_neutron_sriov_agent_config('DEFAULT/baz').with_ensure('absent') end - it 'configures arbitrary neutron_agent_linuxbridge configurations' do - should contain_neutron_agent_linuxbridge('DEFAULT/foo').with_value('fooValue') - should contain_neutron_agent_linuxbridge('DEFAULT/bar').with_value('barValue') - should contain_neutron_agent_linuxbridge('DEFAULT/baz').with_ensure('absent') - end - it 'configures arbitrary neutron_agent_macvtap configurations' do should contain_neutron_agent_macvtap('DEFAULT/foo').with_value('fooValue') should contain_neutron_agent_macvtap('DEFAULT/bar').with_value('barValue') diff --git a/spec/unit/provider/neutron_agent_linuxbridge/ini_setting_spec.rb b/spec/unit/provider/neutron_agent_linuxbridge/ini_setting_spec.rb deleted file mode 100644 index bdf39bfea..000000000 --- a/spec/unit/provider/neutron_agent_linuxbridge/ini_setting_spec.rb +++ /dev/null @@ -1,51 +0,0 @@ -require 'spec_helper' - -provider_class = Puppet::Type.type(:neutron_agent_linuxbridge).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_agent_linuxbridge.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/ml2/linuxbridge_agent.ini') - end - - it 'should allow setting to be set explicitly' do - resource = Puppet::Type::Neutron_agent_linuxbridge.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/ml2/linuxbridge_agent.ini') - end - - it 'should ensure absent when is specified as a value' do - resource = Puppet::Type::Neutron_agent_linuxbridge.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_agent_linuxbridge.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_agent_linuxbridge_spec.rb b/spec/unit/type/neutron_agent_linuxbridge_spec.rb deleted file mode 100644 index 15df3081d..000000000 --- a/spec/unit/type/neutron_agent_linuxbridge_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'puppet' -require 'puppet/type/neutron_agent_linuxbridge' - -describe 'Puppet::Type.type(:neutron_agent_linuxbridge)' do - - before :each do - @neutron_agent_linuxbridge = Puppet::Type.type(:neutron_agent_linuxbridge).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_agent_linuxbridge - dependency = @neutron_agent_linuxbridge.autorequire - expect(dependency.size).to eq(1) - expect(dependency[0].target).to eq(@neutron_agent_linuxbridge) - expect(dependency[0].source).to eq(anchor) - end - -end