From 0e3f4a0eb353c8ada62ce1bf0dd8e53b436af686 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 19 Apr 2024 10:58:13 +0900 Subject: [PATCH] Remove networking-mlnx support ... which was deprecated during the previous cycle[1]. [1] 98ea1311fbedab83c054a3498a59803f50a48ff9 Change-Id: I2c5f180dd124983f3ab9dc429c6ea69c95f20ab4 --- .../provider/eswitchd_config/ini_setting.rb | 10 -- .../neutron_mlnx_agent_config/ini_setting.rb | 10 -- lib/puppet/type/eswitchd_config.rb | 27 ---- lib/puppet/type/neutron_mlnx_agent_config.rb | 27 ---- manifests/agents/ml2/mlnx.pp | 144 ------------------ manifests/params.pp | 10 -- manifests/plugins/ml2/mellanox.pp | 32 ---- .../plugins/ml2/mellanox/mlnx_sdn_assist.pp | 63 -------- spec/classes/neutron_agents_ml2_mlnx_spec.rb | 129 ---------------- .../neutron_plugins_ml2_mellanox_spec.rb | 53 ------- ...eutron_plugins_ml2_mlnx_sdn_assist_spec.rb | 51 ------- .../ini_setting_spec.rb | 51 ------- 12 files changed, 607 deletions(-) delete mode 100644 lib/puppet/provider/eswitchd_config/ini_setting.rb delete mode 100644 lib/puppet/provider/neutron_mlnx_agent_config/ini_setting.rb delete mode 100644 lib/puppet/type/eswitchd_config.rb delete mode 100644 lib/puppet/type/neutron_mlnx_agent_config.rb delete mode 100644 manifests/agents/ml2/mlnx.pp delete mode 100644 manifests/plugins/ml2/mellanox.pp delete mode 100644 manifests/plugins/ml2/mellanox/mlnx_sdn_assist.pp delete mode 100644 spec/classes/neutron_agents_ml2_mlnx_spec.rb delete mode 100644 spec/classes/neutron_plugins_ml2_mellanox_spec.rb delete mode 100644 spec/classes/neutron_plugins_ml2_mlnx_sdn_assist_spec.rb delete mode 100644 spec/unit/provider/neutron_mlnx_agent_config/ini_setting_spec.rb diff --git a/lib/puppet/provider/eswitchd_config/ini_setting.rb b/lib/puppet/provider/eswitchd_config/ini_setting.rb deleted file mode 100644 index 3f4c88b2a..000000000 --- a/lib/puppet/provider/eswitchd_config/ini_setting.rb +++ /dev/null @@ -1,10 +0,0 @@ -Puppet::Type.type(:eswitchd_config).provide( - :ini_setting, - :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) -) do - - def self.file_path - '/etc/neutron/plugins/ml2/eswitchd.conf' - end - -end diff --git a/lib/puppet/provider/neutron_mlnx_agent_config/ini_setting.rb b/lib/puppet/provider/neutron_mlnx_agent_config/ini_setting.rb deleted file mode 100644 index 31f98f00a..000000000 --- a/lib/puppet/provider/neutron_mlnx_agent_config/ini_setting.rb +++ /dev/null @@ -1,10 +0,0 @@ -Puppet::Type.type(:neutron_mlnx_agent_config).provide( - :ini_setting, - :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) -) do - - def self.file_path - '/etc/neutron/plugins/mlnx/mlnx_conf.ini' - end - -end diff --git a/lib/puppet/type/eswitchd_config.rb b/lib/puppet/type/eswitchd_config.rb deleted file mode 100644 index c98c84335..000000000 --- a/lib/puppet/type/eswitchd_config.rb +++ /dev/null @@ -1,27 +0,0 @@ -Puppet::Type.newtype(:eswitchd_config) do - - ensurable - - newparam(:name, :namevar => true) do - desc 'Section/setting name to manage from /etc/neutron/plugins/ml2/eswitchd.conf' - newvalues(/\S+\/\S+/) - 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 - - 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 -end diff --git a/lib/puppet/type/neutron_mlnx_agent_config.rb b/lib/puppet/type/neutron_mlnx_agent_config.rb deleted file mode 100644 index ca6593c6c..000000000 --- a/lib/puppet/type/neutron_mlnx_agent_config.rb +++ /dev/null @@ -1,27 +0,0 @@ -Puppet::Type.newtype(:neutron_mlnx_agent_config) do - - ensurable - - newparam(:name, :namevar => true) do - desc 'Section/setting name to manage from /etc/neutron/plugins/mlnx/mlnx_conf.ini' - newvalues(/\S+\/\S+/) - 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 - - 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 -end diff --git a/manifests/agents/ml2/mlnx.pp b/manifests/agents/ml2/mlnx.pp deleted file mode 100644 index c35bfae45..000000000 --- a/manifests/agents/ml2/mlnx.pp +++ /dev/null @@ -1,144 +0,0 @@ -# -# == Class: neutron::agents::ml2::mlnx -# -# DEPRECATED ! -# Setups MLNX neutron agent when using ML2 plugin -# -# === Parameters -# -# [*package_ensure*] -# (optional) The state of the package -# Defaults to 'present' -# -# [*enabled*] -# (required) Whether or not to enable the MLNX Agent -# Defaults to true -# -# [*manage_service*] -# (optional) Whether to start/stop the service -# Defaults to true -# -# [*manage_package*] -# (optional) Whether to install the package -# Defaults to true -# -# [*physical_interface_mappings*] -# (optional) Array of : -# All physical networks listed in network_vlan_ranges -# on the server should have mappings to appropriate -# interfaces on each agent. -# Value should be of type array, Defaults to $facts['os_service_default'] -# -# [*polling_interval*] -# (optional) The number of seconds the agent will wait between -# polling for local device changes. -# Defaults to $facts['os_service_default'] -# -# [*multi_interface_driver_mappings*] -# (optional) A per physnet interface driver mapping used by -# multidriver interface driver to manage the virtual -# interface per physnet. a virtual network e.g vxlan -# will map to the 'nil' physnet. -# Defaults to $facts['os_service_default'] -# -# [*ipoib_physical_interface*] -# (optional) Name of the IPoIB root device to use with -# ipoib interface driver. -# Defaults to $facts['os_service_default'] -# -# [*enable_multi_interface_driver_cache_maintenance*] -# (optional) Enable periodic job to perform maintenance to the -# embedded network cache for multi interface driver. -# Set to true if a multi interface driver instance will -# be active for an extended amount of time. -# Defaults to false -# -class neutron::agents::ml2::mlnx ( - $package_ensure = 'present', - Boolean $enabled = true, - Boolean $manage_service = true, - Boolean $manage_package = true, - $physical_interface_mappings = $facts['os_service_default'], - $polling_interval = $facts['os_service_default'], - $multi_interface_driver_mappings = $facts['os_service_default'], - $ipoib_physical_interface = $facts['os_service_default'], - $enable_multi_interface_driver_cache_maintenance = false, -) { - warning('Support for networking-mlnx has been deprecated') - - include neutron::deps - include neutron::params - - $mlnx_agent_package = $::neutron::params::mlnx_agent_package - $mlnx_agent_service = $::neutron::params::mlnx_agent_service - $eswitchd_package = $::neutron::params::eswitchd_package - $eswitchd_service = $::neutron::params::eswitchd_service - $mlnx_plugin_package = $::neutron::params::mlnx_plugin_package - - neutron_mlnx_agent_config { - 'eswitch/physical_interface_mappings': value => pick(join(any2array($physical_interface_mappings), ','), $facts['os_service_default']); - 'agent/polling_interval' : value => $polling_interval; - } - - eswitchd_config { - 'DAEMON/fabrics': value => pick(join(any2array($physical_interface_mappings), ','), $facts['os_service_default']); - } - - $mappings_array = pick(join(any2array($multi_interface_driver_mappings), ','), $facts['os_service_default']); - - neutron_dhcp_agent_config { - 'DEFAULT/multi_interface_driver_mappings' : value => $mappings_array; - 'DEFAULT/ipoib_physical_interface' : value => $ipoib_physical_interface; - 'DEFAULT/enable_multi_interface_driver_cache_maintenance' : value => $enable_multi_interface_driver_cache_maintenance; - } - - neutron_l3_agent_config { - 'DEFAULT/multi_interface_driver_mappings' : value => $mappings_array; - 'DEFAULT/ipoib_physical_interface' : value => $ipoib_physical_interface; - 'DEFAULT/enable_multi_interface_driver_cache_maintenance' : value => $enable_multi_interface_driver_cache_maintenance; - } - - if $manage_package { - if $mlnx_agent_package != $mlnx_plugin_package { - $mlnx_agent_package_tag = ['openstack', 'neutron-package'] - } else { - $mlnx_agent_package_tag = ['openstack', 'neutron-plugin-ml2-package'] - Package[$mlnx_agent_package] -> Neutron_mlnx_agent_config<||> - } - ensure_packages($mlnx_agent_package, { - ensure => $package_ensure, - tag => $mlnx_agent_package_tag, - }) - - # NOTE(tkajinam): Ubuntu/Debian requires a separate package for eswitchd - # service. - if $eswitchd_package { - ensure_packages($eswitchd_package, { - ensure => $package_ensure, - tag => ['openstack', 'neutron-package'], - }) - } - } - - if $manage_service { - if $enabled { - $service_ensure = 'running' - } else { - $service_ensure = 'stopped' - } - - service { $mlnx_agent_service: - ensure => $service_ensure, - name => $mlnx_agent_service, - enable => $enabled, - tag => 'neutron-service', - } - - service { $eswitchd_service: - ensure => $service_ensure, - name => $eswitchd_service, - enable => $enabled, - tag => 'neutron-service', - } - } -} diff --git a/manifests/params.pp b/manifests/params.pp index 5c0a4d2de..c2385d68f 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -64,11 +64,6 @@ class neutron::params { $networking_baremetal_package = 'python3-networking-baremetal' $networking_baremetal_agent_package = 'python3-ironic-neutron-agent' $networking_baremetal_agent_service = 'ironic-neutron-agent' - $mlnx_agent_package = 'python3-networking-mlnx' - $mlnx_plugin_package = 'python3-networking-mlnx' - $eswitchd_package = undef - $mlnx_agent_service = 'neutron-mlnx-agent' - $eswitchd_service = 'eswitchd' } 'Debian': { $package_name = 'neutron-common' @@ -120,11 +115,6 @@ class neutron::params { $networking_baremetal_package = 'python3-ironic-neutron-agent' $networking_baremetal_agent_package = 'ironic-neutron-agent' $networking_baremetal_agent_service = 'ironic-neutron-agent' - $mlnx_agent_package = 'neutron-mlnx-agent' - $mlnx_plugin_package = 'python3-networking-mlnx' - $eswitchd_package = 'networking-mlnx-eswitchd' - $mlnx_agent_service = 'neutron-mlnx-agent' - $eswitchd_service = 'networking-mlnx-eswitchd' } default: { fail("Unsupported osfamily: ${facts['os']['family']}") diff --git a/manifests/plugins/ml2/mellanox.pp b/manifests/plugins/ml2/mellanox.pp deleted file mode 100644 index 59fe0b814..000000000 --- a/manifests/plugins/ml2/mellanox.pp +++ /dev/null @@ -1,32 +0,0 @@ -# -# == Class: neutron::plugins::ml2::mellanox -# -# DEPRECATED ! -# Install the Mellanox plugins and generate the config file -# from parameters in the other classes. -# -# === Parameters -# -# [*package_ensure*] -# (optional) The intended state of the networking-mlnx -# package, i.e. any of the possible values of the 'ensure' -# property for a package resource type. -# Defaults to 'present' -# - -class neutron::plugins::ml2::mellanox ( - $package_ensure = 'present' -) { - warning('Support for networking-mlnx has been deprecated') - - include neutron::deps - include neutron::params - require neutron::plugins::ml2 - - $mlnx_plugin_package = $::neutron::params::mlnx_plugin_package - - ensure_packages($mlnx_plugin_package, { - ensure => $package_ensure, - tag => ['openstack', 'neutron-plugin-ml2-package'], - }) -} diff --git a/manifests/plugins/ml2/mellanox/mlnx_sdn_assist.pp b/manifests/plugins/ml2/mellanox/mlnx_sdn_assist.pp deleted file mode 100644 index a07416971..000000000 --- a/manifests/plugins/ml2/mellanox/mlnx_sdn_assist.pp +++ /dev/null @@ -1,63 +0,0 @@ -# -# == Class: neutron::plugins::ml2::mellanox::mlnx_sdn_assist -# -# DEPRECATED ! -# Install the OpenDaylight and generate config file -# from parameters in the other classes. -# -# === Parameters -# -# [*sdn_token*] -# (optional) The Mellanox controller token -# Defaults to $facts['os_service_default'] -# Example: 'abcdef' -# -# [*sdn_url*] -# (optional) The Mellanox controller neutron URL -# Defaults to $facts['os_service_default'] -# Example: 'http://127.0.0.1/ufmRestV3/' -# -# [*sdn_domain*] -# (optional) The Mellanox controller domain -# Defaults to $facts['os_service_default'] -# Example: 'cloudx' -# -# [*sync_enabled*] -# (optional) Whether synchronising state to an -# SDN provider is enabled. -# Defaults to true -# -# [*bind_normal_ports*] -# (optional) Allow the binding of normal ports for ports -# associated with a physnet from bind_normal_ports_physnets -# Defaults to false -# -# [*bind_normal_ports_physnets*] -# (optional) A list of physnets in which binding of normal -# ports is allowed. This option is used in conjunction -# with bind_normal_ports. -# The list must be a subset of physical_networks -# Defaults to [] -# -class neutron::plugins::ml2::mellanox::mlnx_sdn_assist ( - $sdn_token = $facts['os_service_default'], - $sdn_url = $facts['os_service_default'], - $sdn_domain = $facts['os_service_default'], - $sync_enabled = true, - $bind_normal_ports = false, - $bind_normal_ports_physnets = [], -) { - warning('Support for networking-mlnx has been deprecated') - - include neutron::deps - require neutron::plugins::ml2 - - neutron_plugin_ml2 { - 'sdn/token': value => $sdn_token, secret => true; - 'sdn/url': value => $sdn_url; - 'sdn/domain': value => $sdn_domain; - 'sdn/sync_enabled': value => $sync_enabled; - 'sdn/bind_normal_ports': value => $bind_normal_ports; - 'sdn/bind_normal_ports_physnets': value => $bind_normal_ports_physnets; - } -} diff --git a/spec/classes/neutron_agents_ml2_mlnx_spec.rb b/spec/classes/neutron_agents_ml2_mlnx_spec.rb deleted file mode 100644 index f882ef496..000000000 --- a/spec/classes/neutron_agents_ml2_mlnx_spec.rb +++ /dev/null @@ -1,129 +0,0 @@ -require 'spec_helper' - -describe 'neutron::agents::ml2::mlnx' do - let :pre_condition do - "class { 'neutron': }" - end - - let :params do - {} - end - - shared_examples 'neutron mlnx agent with ml2 plugin' do - it { should contain_class('neutron::params') } - - - it 'configures /etc/neutron/plugins/mlnx/mlnx_config.ini' do - should contain_neutron_mlnx_agent_config('eswitch/physical_interface_mappings').with_value('') - end - - - it 'installs neutron mlnx agent package' do - should contain_package(platform_params[:mlnx_agent_package]).with( - :name => platform_params[:mlnx_agent_package], - :ensure => 'installed', - :tag => platform_params[:mlnx_agent_package_tag] - ) - - if platform_params[:eswitchd_package] - should contain_package(platform_params[:eswitchd_package]).with( - :name => platform_params[:eswitchd_package], - :ensure => 'installed', - :tag => ['openstack', 'neutron-package'], - ) - end - end - - it 'configures neutron mlnx agent service' do - should contain_service(platform_params[:mlnx_agent_service]).with( - :name => platform_params[:mlnx_agent_service], - :enable => true, - :ensure => 'running', - :tag => 'neutron-service', - ) - should contain_service(platform_params[:eswitchd_service]).with( - :name => platform_params[:eswitchd_service], - :enable => true, - :ensure => 'running', - :tag => 'neutron-service', - ) - end - - context 'with manage_service as false' do - before :each do - params.merge!(:manage_service => false) - end - it 'should not manage the services' do - should_not contain_service(platform_params[:mlnx_agent_service]) - should_not contain_service(platform_params[:eswitchd_service]) - end - end - - context 'when supplying device mapping' do - before :each do - params.merge!(:physical_interface_mappings => ['physnet1:eth1']) - end - - it 'configures physical device mappings' do - should contain_neutron_mlnx_agent_config('eswitch/physical_interface_mappings').with_value(['physnet1:eth1']) - should contain_eswitchd_config('DAEMON/fabrics').with_value(['physnet1:eth1']) - end - end - - context 'when supplying empty device mapping' do - before :each do - params.merge!(:physical_interface_mappings => "") - end - - it 'configures physical device mappings with exclusion' do - should contain_neutron_mlnx_agent_config('eswitch/physical_interface_mappings').with_value('') - should contain_eswitchd_config('DAEMON/fabrics').with_value('') - end - end - - it 'configures neutron dhcp agent' do - should contain_neutron_dhcp_agent_config('DEFAULT/multi_interface_driver_mappings').with_value('') - should contain_neutron_dhcp_agent_config('DEFAULT/ipoib_physical_interface').with_value('') - should contain_neutron_dhcp_agent_config('DEFAULT/enable_multi_interface_driver_cache_maintenance').with_value(false) - end - - it 'configures neutron l3 agent' do - should contain_neutron_l3_agent_config('DEFAULT/multi_interface_driver_mappings').with_value('') - should contain_neutron_l3_agent_config('DEFAULT/ipoib_physical_interface').with_value('') - should contain_neutron_l3_agent_config('DEFAULT/enable_multi_interface_driver_cache_maintenance').with_value(false) - 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' - { - :mlnx_agent_package => 'neutron-mlnx-agent', - :mlnx_agent_service => 'neutron-mlnx-agent', - :eswitchd_package => 'networking-mlnx-eswitchd', - :eswitchd_service => 'networking-mlnx-eswitchd', - :mlnx_agent_package_tag => ['openstack', 'neutron-package'], - } - when 'RedHat' - { - :mlnx_agent_package => 'python3-networking-mlnx', - :mlnx_agent_service => 'neutron-mlnx-agent', - :eswitchd_package => false, - :eswitchd_service => 'eswitchd', - :mlnx_agent_package_tag => ['openstack', 'neutron-plugin-ml2-package'], - } - end - end - - it_behaves_like 'neutron mlnx agent with ml2 plugin' - end - end -end diff --git a/spec/classes/neutron_plugins_ml2_mellanox_spec.rb b/spec/classes/neutron_plugins_ml2_mellanox_spec.rb deleted file mode 100644 index eae4fb460..000000000 --- a/spec/classes/neutron_plugins_ml2_mellanox_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -require 'spec_helper' - -describe 'neutron::plugins::ml2::mellanox' do - let :pre_condition do - "class { 'neutron::keystone::authtoken': - password => 'passw0rd', - } - class { 'neutron::server': } - class { 'neutron': - core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' - }" - end - - let :params do - {} - end - - shared_examples 'neutron plugin mellanox ml2' do - it { should contain_class('neutron::params') } - - it 'should have' do - should contain_package(platform_params[:mlnx_plugin_package]).with( - :ensure => 'installed', - :tag => ['openstack', 'neutron-plugin-ml2-package'] - ) - 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' - { - :mlnx_plugin_package => 'python3-networking-mlnx', - } - when 'RedHat' - { - :mlnx_plugin_package => 'python3-networking-mlnx', - } - end - end - - it_behaves_like 'neutron plugin mellanox ml2' - end - end -end diff --git a/spec/classes/neutron_plugins_ml2_mlnx_sdn_assist_spec.rb b/spec/classes/neutron_plugins_ml2_mlnx_sdn_assist_spec.rb deleted file mode 100644 index 729597079..000000000 --- a/spec/classes/neutron_plugins_ml2_mlnx_sdn_assist_spec.rb +++ /dev/null @@ -1,51 +0,0 @@ -require 'spec_helper' - -describe 'neutron::plugins::ml2::mellanox::mlnx_sdn_assist' do - let :pre_condition do - "class { 'neutron::keystone::authtoken': - password => 'passw0rd', - } - class { 'neutron::server': } - class { 'neutron': - core_plugin => 'ml2' - }" - end - - let :default_params do - { - :sdn_url => '', - } - end - - let :params do - { - :sdn_token => 'token', - } - end - - shared_examples 'neutron plugin mellanox ml2 mlnx_sdn_assist' do - before do - params.merge!(default_params) - end - - it 'configures sdn settings' do - should contain_neutron_plugin_ml2('sdn/token').with_value(params[:sdn_token]).with_secret(true) - should contain_neutron_plugin_ml2('sdn/url').with_value(params[:sdn_url]) - should contain_neutron_plugin_ml2('sdn/sync_enabled').with_value('true') - should contain_neutron_plugin_ml2('sdn/bind_normal_ports').with_value('false') - should contain_neutron_plugin_ml2('sdn/bind_normal_ports_physnets').with_value([]) - 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 plugin mellanox ml2 mlnx_sdn_assist' - end - end -end diff --git a/spec/unit/provider/neutron_mlnx_agent_config/ini_setting_spec.rb b/spec/unit/provider/neutron_mlnx_agent_config/ini_setting_spec.rb deleted file mode 100644 index 1a02ae085..000000000 --- a/spec/unit/provider/neutron_mlnx_agent_config/ini_setting_spec.rb +++ /dev/null @@ -1,51 +0,0 @@ -require 'spec_helper' - -provider_class = Puppet::Type.type(:neutron_mlnx_agent_config).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_mlnx_agent_config.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/mlnx/mlnx_conf.ini') - end - - it 'should allow setting to be set explicitly' do - resource = Puppet::Type::Neutron_mlnx_agent_config.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/mlnx/mlnx_conf.ini') - end - - it 'should ensure absent when is specified as a value' do - resource = Puppet::Type::Neutron_mlnx_agent_config.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_mlnx_agent_config.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