From 4706298d29708903870b23ce967c97abfd767180 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 11 Sep 2021 22:10:29 +0900 Subject: [PATCH] Remove support for monolithic cisco plugin ... because it was deprecated during Wallaby cycle[1]. [1] bc50622a2db80e7759f7fe4caaf58f4ce5b8567a Change-Id: I5425f744c70c9a320adb36c0f5a112815bbffcfd --- .../neutron_plugin_cisco/ini_setting.rb | 15 --- .../ini_setting.rb | 15 --- .../ini_setting.rb | 15 --- .../ini_setting.rb | 15 --- lib/puppet/type/neutron_plugin_cisco.rb | 56 -------- .../type/neutron_plugin_cisco_credentials.rb | 57 -------- .../type/neutron_plugin_cisco_db_conn.rb | 32 ----- .../type/neutron_plugin_cisco_l2network.rb | 32 ----- manifests/config.pp | 24 ---- manifests/deps.pp | 4 - manifests/init.pp | 2 +- manifests/params.pp | 1 - manifests/plugins/cisco.pp | 125 ------------------ ...neutron-plugin-cisco-0a20b62ef773a8d2.yaml | 4 + spec/acceptance/neutron_config_spec.rb | 89 ------------- .../neutron_plugin_cisco/ini_setting_spec.rb | 74 ----------- .../ini_setting_spec.rb | 74 ----------- .../ini_setting_spec.rb | 74 ----------- .../ini_setting_spec.rb | 74 ----------- .../neutron_plugin_cisco_credentials_spec.rb | 20 --- .../type/neutron_plugin_cisco_db_conn_spec.rb | 20 --- .../neutron_plugin_cisco_l2network_spec.rb | 20 --- spec/unit/type/neutron_plugin_cisco_spec.rb | 20 --- 23 files changed, 5 insertions(+), 857 deletions(-) delete mode 100644 lib/puppet/provider/neutron_plugin_cisco/ini_setting.rb delete mode 100644 lib/puppet/provider/neutron_plugin_cisco_credentials/ini_setting.rb delete mode 100644 lib/puppet/provider/neutron_plugin_cisco_db_conn/ini_setting.rb delete mode 100644 lib/puppet/provider/neutron_plugin_cisco_l2network/ini_setting.rb delete mode 100644 lib/puppet/type/neutron_plugin_cisco.rb delete mode 100644 lib/puppet/type/neutron_plugin_cisco_credentials.rb delete mode 100644 lib/puppet/type/neutron_plugin_cisco_db_conn.rb delete mode 100644 lib/puppet/type/neutron_plugin_cisco_l2network.rb delete mode 100644 manifests/plugins/cisco.pp create mode 100644 releasenotes/notes/remove-neutron-plugin-cisco-0a20b62ef773a8d2.yaml delete mode 100644 spec/unit/provider/neutron_plugin_cisco/ini_setting_spec.rb delete mode 100644 spec/unit/provider/neutron_plugin_cisco_credentials/ini_setting_spec.rb delete mode 100644 spec/unit/provider/neutron_plugin_cisco_db_conn/ini_setting_spec.rb delete mode 100644 spec/unit/provider/neutron_plugin_cisco_l2network/ini_setting_spec.rb delete mode 100644 spec/unit/type/neutron_plugin_cisco_credentials_spec.rb delete mode 100644 spec/unit/type/neutron_plugin_cisco_db_conn_spec.rb delete mode 100644 spec/unit/type/neutron_plugin_cisco_l2network_spec.rb delete mode 100644 spec/unit/type/neutron_plugin_cisco_spec.rb diff --git a/lib/puppet/provider/neutron_plugin_cisco/ini_setting.rb b/lib/puppet/provider/neutron_plugin_cisco/ini_setting.rb deleted file mode 100644 index fcbc8f72c..000000000 --- a/lib/puppet/provider/neutron_plugin_cisco/ini_setting.rb +++ /dev/null @@ -1,15 +0,0 @@ -Puppet::Type.type(:neutron_plugin_cisco).provide( - :ini_setting, - :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) -) do - - def self.file_path - '/etc/neutron/plugins/cisco/cisco_plugins.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/provider/neutron_plugin_cisco_credentials/ini_setting.rb b/lib/puppet/provider/neutron_plugin_cisco_credentials/ini_setting.rb deleted file mode 100644 index b3733410c..000000000 --- a/lib/puppet/provider/neutron_plugin_cisco_credentials/ini_setting.rb +++ /dev/null @@ -1,15 +0,0 @@ -Puppet::Type.type(:neutron_plugin_cisco_credentials).provide( - :ini_setting, - :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) -) do - - def self.file_path - '/etc/neutron/plugins/cisco/credentials.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/provider/neutron_plugin_cisco_db_conn/ini_setting.rb b/lib/puppet/provider/neutron_plugin_cisco_db_conn/ini_setting.rb deleted file mode 100644 index 11bec04da..000000000 --- a/lib/puppet/provider/neutron_plugin_cisco_db_conn/ini_setting.rb +++ /dev/null @@ -1,15 +0,0 @@ -Puppet::Type.type(:neutron_plugin_cisco_db_conn).provide( - :ini_setting, - :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) -) do - - def self.file_path - '/etc/neutron/plugins/cisco/db_conn.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/provider/neutron_plugin_cisco_l2network/ini_setting.rb b/lib/puppet/provider/neutron_plugin_cisco_l2network/ini_setting.rb deleted file mode 100644 index 25f61e650..000000000 --- a/lib/puppet/provider/neutron_plugin_cisco_l2network/ini_setting.rb +++ /dev/null @@ -1,15 +0,0 @@ -Puppet::Type.type(:neutron_plugin_cisco_l2network).provide( - :ini_setting, - :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) -) do - - def self.file_path - '/etc/neutron/plugins/cisco/l2network_plugin.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_plugin_cisco.rb b/lib/puppet/type/neutron_plugin_cisco.rb deleted file mode 100644 index 1f0254c18..000000000 --- a/lib/puppet/type/neutron_plugin_cisco.rb +++ /dev/null @@ -1,56 +0,0 @@ -Puppet::Type.newtype(:neutron_plugin_cisco) do - - ensurable - - newparam(:name, :namevar => true) do - desc 'Section/setting name to manage from cisco_plugins.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/cisco'] - end - - autorequire(:anchor) do - ['neutron::install::end'] - end - -end diff --git a/lib/puppet/type/neutron_plugin_cisco_credentials.rb b/lib/puppet/type/neutron_plugin_cisco_credentials.rb deleted file mode 100644 index fdb2be94e..000000000 --- a/lib/puppet/type/neutron_plugin_cisco_credentials.rb +++ /dev/null @@ -1,57 +0,0 @@ -Puppet::Type.newtype(:neutron_plugin_cisco_credentials) do - - ensurable - - newparam(:name, :namevar => true) do - desc 'Section/setting name to manage from credentials.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/cisco'] - end - - autorequire(:anchor) do - ['neutron::install::end'] - end - -end diff --git a/lib/puppet/type/neutron_plugin_cisco_db_conn.rb b/lib/puppet/type/neutron_plugin_cisco_db_conn.rb deleted file mode 100644 index 910fcb704..000000000 --- a/lib/puppet/type/neutron_plugin_cisco_db_conn.rb +++ /dev/null @@ -1,32 +0,0 @@ -Puppet::Type.newtype(:neutron_plugin_cisco_db_conn) do - - ensurable - - newparam(:name, :namevar => true) do - desc 'Section/setting name to manage from plugins/cisco/db_conn.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 - 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/cisco'] - end - - autorequire(:anchor) do - ['neutron::install::end'] - end - -end diff --git a/lib/puppet/type/neutron_plugin_cisco_l2network.rb b/lib/puppet/type/neutron_plugin_cisco_l2network.rb deleted file mode 100644 index 96149e15d..000000000 --- a/lib/puppet/type/neutron_plugin_cisco_l2network.rb +++ /dev/null @@ -1,32 +0,0 @@ -Puppet::Type.newtype(:neutron_plugin_cisco_l2network) do - - ensurable - - newparam(:name, :namevar => true) do - desc 'Section/setting name to manage from plugins/cisco/l2network_plugin.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 - 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/cisco'] - end - - autorequire(:anchor) do - ['neutron::install::end'] - end - -end diff --git a/manifests/config.pp b/manifests/config.pp index 57824aa54..b5eceb937 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -92,15 +92,6 @@ # [*api_config*] # (optional) Manage configuration of api-paste.ini # -# [*plugin_cisco_db_conn_config*] -# (optional) Manage configuration of plugins/cisco/db_conn.ini -# -# [*plugin_cisco_l2network_config*] -# (optional) Manage configuration of plugins/cisco/l2network_plugin.ini -# -# [*plugin_cisco_config*] -# (optional) Manage configuration of cisco_plugins.ini -# # [*plugin_plumgrid_config*] # (optional) Manage configuration of plugins/plumgrid/plumgrid.ini # @@ -135,9 +126,6 @@ class neutron::config ( $plugin_nvp_config = {}, # DEPRECATED PARAMETERS $api_config = undef, - $plugin_cisco_db_conn_config = undef, - $plugin_cisco_l2network_config = undef, - $plugin_cisco_config = undef, $plugin_plumgrid_config = undef, $plugin_midonet_config = undef, ) { @@ -156,18 +144,6 @@ will be removed in a future release. Use the api_paste_ini parameter instead.') $api_paste_ini_real = $api_paste_ini } - $cisco_plugin_param_names = [ - 'plugin_cisco_db_conn_config', - 'plugin_cisco_l2network_config', - 'plugin_cisco_config', - ] - $cisco_plugin_param_names.each |$param_name| { - $param = getvar($param_name) - if $param != undef{ - warning("The ${param_name} parameter is deprecated and has no effect.") - } - } - if $plugin_midonet_config != undef { warning('The plugin_midonet_config parameter has been deprecated and has no effect') } diff --git a/manifests/deps.pp b/manifests/deps.pp index 6453e28bc..92c163d60 100644 --- a/manifests/deps.pp +++ b/manifests/deps.pp @@ -49,10 +49,6 @@ class neutron::deps { Anchor['neutron::config::begin'] -> Neutron_metadata_agent_config<||> ~> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Neutron_metering_agent_config<||> ~> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Neutron_bgp_dragent_config<||> ~> Anchor['neutron::config::end'] - Anchor['neutron::config::begin'] -> Neutron_plugin_cisco_credentials<||> ~> Anchor['neutron::config::end'] - Anchor['neutron::config::begin'] -> Neutron_plugin_cisco_db_conn<||> ~> Anchor['neutron::config::end'] - Anchor['neutron::config::begin'] -> Neutron_plugin_cisco<||> ~> 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_l2gw_service_config<||> ~> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Neutron_plugin_ml2<||> ~> Anchor['neutron::config::end'] diff --git a/manifests/init.pp b/manifests/init.pp index 07c854a77..ce5bf705c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -24,7 +24,7 @@ # [*core_plugin*] # (optional) Neutron plugin provider # Defaults to ml2 -# Could be bigswitch, brocade, cisco, embrane, hyperv, midonet, +# Could be bigswitch, brocade, embrane, hyperv, midonet, # ml2, mlnx, nec, nicira, ryu, nuage, opencontrail, nsx # # Example for nuage: diff --git a/manifests/params.pp b/manifests/params.pp index 8069617c0..c9e407532 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -9,7 +9,6 @@ class neutron::params { $ovs_agent_service = 'neutron-openvswitch-agent' $destroy_patch_ports_service = 'neutron-destroy-patch-ports' $linuxbridge_agent_service = 'neutron-linuxbridge-agent' - $cisco_config_file = '/etc/neutron/plugins/cisco/cisco_plugins.ini' $opencontrail_plugin_package = 'neutron-plugin-contrail' $opencontrail_config_file = '/etc/neutron/plugins/opencontrail/ContrailPlugin.ini' $ovn_plugin_package = 'python3-networking-ovn' diff --git a/manifests/plugins/cisco.pp b/manifests/plugins/cisco.pp deleted file mode 100644 index c6fd1e83a..000000000 --- a/manifests/plugins/cisco.pp +++ /dev/null @@ -1,125 +0,0 @@ -# -# DEPRECATED ! -# Configure the cisco neutron plugin -# More info available here: -# https://wiki.openstack.org/wiki/Cisco-neutron -# -# === Parameters -# -# [*database_pass*] -# The password that will be used to connect to the db -# -# [*keystone_password*] -# The password for the supplied username -# -# [*database_name*] -# The name of the db table to use -# Defaults to neutron -# -# [*database_user*] -# The user that will be used to connect to the db -# Defaults to neutron -# -# [*database_host*] -# The address or hostname of the database -# Defaults to 127.0.0.1 -# -# [*keystone_username*] -# The admin username for the plugin to use -# Defaults to neutron -# -# [*keystone_auth_url*] -# The url against which to authenticate -# Defaults to http://127.0.0.1:5000/v3/ -# -# [*keystone_tenant*] -# The tenant the supplied user has admin privs in -# Defaults to services -# -# [*vswitch_plugin*] -# (optional) The openvswitch plugin to use -# Defaults to ovs_neutron_plugin.OVSNeutronPluginV2 -# -# [*nexus_plugin*] -# (optional) The nexus plugin to use -# Defaults to $::os_service_default. This will not set a nexus plugin to use -# Can be set to neutron.plugins.cisco.nexus.cisco_nexus_plugin_v2.NexusPlugin -# -# [*vlan_start*] -# (optional) First VLAN for private networks. -# Defaults to '100'. -# -# [*vlan_end*] -# (optional) Last VLAN for private networks. -# Defaults to '3000'. -# -# [*vlan_name_prefix*] -# (optional) VLAN Name prefix -# Defaults to 'q-' -# -# [*model_class*] -# (optional) Model Class -# Defaults to 'neutron.plugins.cisco.models.virt_phy_sw_v2.VirtualPhysicalSwitchModelV2' -# -# [*max_ports*] -# (optional) Number max of ports -# Defaults to '100' -# -# [*max_port_profiles*] -# (optional) Number max of port profiles -# Defaults to '65568' -# -# [*manager_class*] -# (optional) Manager Class -# Defaults to 'neutron.plugins.cisco.segmentation.l2network_vlan_mgr_v2.L2NetworkVLANMgr' -# -# [*max_networks*] -# (optional) -# Defaults to '65568' -# -# [*package_ensure*] -# (optional) the ensure state of the package resource -# Defaults to 'present' -# -# [*purge_config*] -# (optional) Whether to set only the specified config options -# in the cisco config. -# Defaults to false. -# -# Other parameters are currently not used by the plugin and -# can be left unchanged, but in grizzly the plugin will fail -# to launch if they are not there. The config for Havana will -# move to a single config file and this will be simplified. - -class neutron::plugins::cisco( - $keystone_password, - $database_pass, - - # Database connection - $database_name = 'neutron', - $database_user = 'neutron', - $database_host = '127.0.0.1', - - # Keystone connection - $keystone_username = 'neutron', - $keystone_tenant = 'services', - $keystone_auth_url = 'http://127.0.0.1:5000/v3/', - - $vswitch_plugin = 'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2', - $nexus_plugin = $::os_service_default, - - # Plugin minimum configuration - $vlan_start = '100', - $vlan_end = '3000', - $vlan_name_prefix = 'q-', - $model_class = 'neutron.plugins.cisco.models.virt_phy_sw_v2.VirtualPhysicalSwitchModelV2', - $max_ports = '100', - $max_port_profiles = '65568', - $manager_class = 'neutron.plugins.cisco.segmentation.l2network_vlan_mgr_v2.L2NetworkVLANMgr', - $max_networks = '65568', - $package_ensure = 'present', - $purge_config = false, -) { - - warning('Support for the Neutron Cisco plugin was deprecated and has no effect') -} diff --git a/releasenotes/notes/remove-neutron-plugin-cisco-0a20b62ef773a8d2.yaml b/releasenotes/notes/remove-neutron-plugin-cisco-0a20b62ef773a8d2.yaml new file mode 100644 index 000000000..103d7e989 --- /dev/null +++ b/releasenotes/notes/remove-neutron-plugin-cisco-0a20b62ef773a8d2.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + The ``neutron::plugins::cisco`` class has been removed. diff --git a/spec/acceptance/neutron_config_spec.rb b/spec/acceptance/neutron_config_spec.rb index f2881747e..a2c6d8ba8 100644 --- a/spec/acceptance/neutron_config_spec.rb +++ b/spec/acceptance/neutron_config_spec.rb @@ -11,10 +11,6 @@ describe 'basic neutron_config resource' do '/etc/neutron/metering_agent.ini', '/etc/neutron/l2gw_plugin.ini', '/etc/neutron/l2gateway_agent.ini', - '/etc/neutron/plugins/cisco/cisco_plugins.ini', - '/etc/neutron/plugins/cisco/credentials.ini', - '/etc/neutron/plugins/cisco/db_conn.ini', - '/etc/neutron/plugins/cisco/l2network_plugin.ini', '/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini', '/etc/neutron/plugins/ml2/ml2_conf.ini', '/etc/neutron/plugins/nicira/nvp.ini', @@ -36,10 +32,6 @@ describe 'basic neutron_config resource' do File <||> -> Neutron_l3_agent_config <||> File <||> -> Neutron_metadata_agent_config <||> File <||> -> Neutron_metering_agent_config <||> - File <||> -> Neutron_plugin_cisco <||> - File <||> -> Neutron_plugin_cisco_credentials <||> - File <||> -> Neutron_plugin_cisco_db_conn <||> - File <||> -> Neutron_plugin_cisco_l2network <||> File <||> -> Neutron_plugin_linuxbridge <||> File <||> -> Neutron_plugin_ml2 <||> File <||> -> Neutron_plugin_nvp <||> @@ -58,7 +50,6 @@ describe 'basic neutron_config resource' do $neutron_directories = ['/etc/neutron', '/etc/neutron/plugins', - '/etc/neutron/plugins/cisco', '/etc/neutron/plugins/linuxbridge', '/etc/neutron/plugins/ml2', '/etc/neutron/plugins/nicira', @@ -75,10 +66,6 @@ describe 'basic neutron_config resource' do '/etc/neutron/metering_agent.ini', '/etc/neutron/l2gw_plugin.ini', '/etc/neutron/l2gateway_agent.ini', - '/etc/neutron/plugins/cisco/cisco_plugins.ini', - '/etc/neutron/plugins/cisco/credentials.ini', - '/etc/neutron/plugins/cisco/db_conn.ini', - '/etc/neutron/plugins/cisco/l2network_plugin.ini', '/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini', '/etc/neutron/plugins/ml2/ml2_conf.ini', '/etc/neutron/plugins/nicira/nvp.ini', @@ -223,78 +210,6 @@ describe 'basic neutron_config resource' do ensure_absent_val => 'toto', } - neutron_plugin_cisco { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_cisco { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_cisco { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco_credentials { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_cisco_credentials { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_cisco_credentials { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco_credentials { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco_db_conn { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_cisco_db_conn { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_cisco_db_conn { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco_db_conn { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco_l2network { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_cisco_l2network { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_cisco_l2network { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco_l2network { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - neutron_plugin_linuxbridge { 'DEFAULT/thisshouldexist' : value => 'foo', } @@ -555,10 +470,6 @@ describe 'basic neutron_config resource' do 'neutron_fwaas_service_config', 'neutron_l3_agent_config', 'neutron_metadata_agent_config', - 'neutron_plugin_cisco', - 'neutron_plugin_cisco_credentials', - 'neutron_plugin_cisco_db_conn', - 'neutron_plugin_cisco_l2network', 'neutron_plugin_linuxbridge', 'neutron_metering_agent_config', 'neutron_plugin_ml2', diff --git a/spec/unit/provider/neutron_plugin_cisco/ini_setting_spec.rb b/spec/unit/provider/neutron_plugin_cisco/ini_setting_spec.rb deleted file mode 100644 index 33c03a274..000000000 --- a/spec/unit/provider/neutron_plugin_cisco/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_cisco).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_cisco.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/cisco/cisco_plugins.ini') - end - - it 'should allow setting to be set explicitly' do - resource = Puppet::Type::Neutron_plugin_cisco.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/cisco/cisco_plugins.ini') - end - - it 'should ensure absent when is specified as a value' do - resource = Puppet::Type::Neutron_plugin_cisco.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_cisco.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/provider/neutron_plugin_cisco_credentials/ini_setting_spec.rb b/spec/unit/provider/neutron_plugin_cisco_credentials/ini_setting_spec.rb deleted file mode 100644 index 4596e888c..000000000 --- a/spec/unit/provider/neutron_plugin_cisco_credentials/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_cisco_credentials).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_cisco_credentials.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/cisco/credentials.ini') - end - - it 'should allow setting to be set explicitly' do - resource = Puppet::Type::Neutron_plugin_cisco_credentials.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/cisco/credentials.ini') - end - - it 'should ensure absent when is specified as a value' do - resource = Puppet::Type::Neutron_plugin_cisco_credentials.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_cisco_credentials.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/provider/neutron_plugin_cisco_db_conn/ini_setting_spec.rb b/spec/unit/provider/neutron_plugin_cisco_db_conn/ini_setting_spec.rb deleted file mode 100644 index 056cbf944..000000000 --- a/spec/unit/provider/neutron_plugin_cisco_db_conn/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_cisco_db_conn).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_cisco_db_conn.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/cisco/db_conn.ini') - end - - it 'should allow setting to be set explicitly' do - resource = Puppet::Type::Neutron_plugin_cisco_db_conn.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/cisco/db_conn.ini') - end - - it 'should ensure absent when is specified as a value' do - resource = Puppet::Type::Neutron_plugin_cisco_db_conn.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_cisco_db_conn.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/provider/neutron_plugin_cisco_l2network/ini_setting_spec.rb b/spec/unit/provider/neutron_plugin_cisco_l2network/ini_setting_spec.rb deleted file mode 100644 index 93d3a801f..000000000 --- a/spec/unit/provider/neutron_plugin_cisco_l2network/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_cisco_l2network).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_cisco_l2network.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/cisco/l2network_plugin.ini') - end - - it 'should allow setting to be set explicitly' do - resource = Puppet::Type::Neutron_plugin_cisco_l2network.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/cisco/l2network_plugin.ini') - end - - it 'should ensure absent when is specified as a value' do - resource = Puppet::Type::Neutron_plugin_cisco_l2network.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_cisco_l2network.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_cisco_credentials_spec.rb b/spec/unit/type/neutron_plugin_cisco_credentials_spec.rb deleted file mode 100644 index a046a6471..000000000 --- a/spec/unit/type/neutron_plugin_cisco_credentials_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'puppet' -require 'puppet/type/neutron_plugin_cisco_credentials' - -describe 'Puppet::Type.type(:neutron_plugin_cisco_credentials)' do - - before :each do - @neutron_plugin_cisco_credentials = Puppet::Type.type(:neutron_plugin_cisco_credentials).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_cisco_credentials - dependency = @neutron_plugin_cisco_credentials.autorequire - expect(dependency.size).to eq(1) - expect(dependency[0].target).to eq(@neutron_plugin_cisco_credentials) - expect(dependency[0].source).to eq(anchor) - end - -end diff --git a/spec/unit/type/neutron_plugin_cisco_db_conn_spec.rb b/spec/unit/type/neutron_plugin_cisco_db_conn_spec.rb deleted file mode 100644 index bce7bd241..000000000 --- a/spec/unit/type/neutron_plugin_cisco_db_conn_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'puppet' -require 'puppet/type/neutron_plugin_cisco_db_conn' - -describe 'Puppet::Type.type(:neutron_plugin_cisco_db_conn)' do - - before :each do - @neutron_plugin_cisco_db_conn = Puppet::Type.type(:neutron_plugin_cisco_db_conn).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_cisco_db_conn - dependency = @neutron_plugin_cisco_db_conn.autorequire - expect(dependency.size).to eq(1) - expect(dependency[0].target).to eq(@neutron_plugin_cisco_db_conn) - expect(dependency[0].source).to eq(anchor) - end - -end diff --git a/spec/unit/type/neutron_plugin_cisco_l2network_spec.rb b/spec/unit/type/neutron_plugin_cisco_l2network_spec.rb deleted file mode 100644 index 63973d121..000000000 --- a/spec/unit/type/neutron_plugin_cisco_l2network_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'puppet' -require 'puppet/type/neutron_plugin_cisco_l2network' - -describe 'Puppet::Type.type(:neutron_plugin_cisco_l2network)' do - - before :each do - @neutron_plugin_cisco_l2network = Puppet::Type.type(:neutron_plugin_cisco_l2network).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_cisco_l2network - dependency = @neutron_plugin_cisco_l2network.autorequire - expect(dependency.size).to eq(1) - expect(dependency[0].target).to eq(@neutron_plugin_cisco_l2network) - expect(dependency[0].source).to eq(anchor) - end - -end diff --git a/spec/unit/type/neutron_plugin_cisco_spec.rb b/spec/unit/type/neutron_plugin_cisco_spec.rb deleted file mode 100644 index dbf03374a..000000000 --- a/spec/unit/type/neutron_plugin_cisco_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'puppet' -require 'puppet/type/neutron_plugin_cisco' - -describe 'Puppet::Type.type(:nova_plugin_cisco)' do - - before :each do - @neutron_plugin_cisco = Puppet::Type.type(:neutron_plugin_cisco).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_cisco - dependency = @neutron_plugin_cisco.autorequire - expect(dependency.size).to eq(1) - expect(dependency[0].target).to eq(@neutron_plugin_cisco) - expect(dependency[0].source).to eq(anchor) - end - -end