Merge "Deprecate support of networking-cisco"

This commit is contained in:
Zuul 2021-01-11 11:02:06 +00:00 committed by Gerrit Code Review
commit 350450032c
9 changed files with 12 additions and 313 deletions

View File

@ -1,4 +1,5 @@
#
# DEPRECATED !
# Install the Cisco plugins and generate the config file
# from parameters in the other classes.
#
@ -15,20 +16,5 @@ class neutron::plugins::ml2::cisco (
$package_ensure = 'present'
) {
include neutron::deps
include neutron::params
require neutron::plugins::ml2
if($::osfamily != 'Redhat') {
# Drivers are only packaged for RedHat at this time
fail("Unsupported osfamily ${::osfamily}")
}
ensure_resource('package', 'python-networking-cisco',
{
ensure => $package_ensure,
tag => ['openstack', 'neutron-plugin-ml2-package']
}
)
warning('python-networking-cisco package management is deprecated, it will be dropped in a future release.')
warning('Support for networking-cisco has been deprecated and has no effect')
}

View File

@ -1,5 +1,6 @@
# == Class: neutron::plugins::ml2::cisco::nexus
#
# DEPRECATED !
# Configure the Cisco Nexus Mech Driver for neutron ML2 plugin
# More info available here:
# http://networking-cisco.readthedocs.io
@ -70,19 +71,5 @@ class neutron::plugins::ml2::cisco::nexus (
$vxlan_global_config = true
) {
include neutron::deps
include neutron::plugins::ml2::cisco
neutron_plugin_ml2 {
'ml2_cisco/managed_physical_network' : value => $managed_physical_network;
'ml2_cisco/switch_heartbeat_time' : value => $switch_heartbeat_time;
'ml2_cisco/provider_vlan_auto_create' : value => $provider_vlan_auto_create;
'ml2_cisco/provider_vlan_auto_trunk' : value => $provider_vlan_auto_trunk;
'ml2_cisco/vxlan_global_config' : value => $vxlan_global_config;
}
create_resources(neutron::plugins::ml2::cisco::nexus_switch, $nexus_config)
create_resources(neutron::plugins::ml2::cisco::nexus_creds, $nexus_config)
warning('Support for networking-cisco has been deprecated and has no effect')
}

View File

@ -1,4 +1,5 @@
#
# DEPRECATED !
# Configure the Nexus VXLAN Type Driver
# More info available here:
# http://networking-cisco.readthedocs.io
@ -25,12 +26,7 @@ class neutron::plugins::ml2::cisco::type_nexus_vxlan (
$vni_ranges,
$mcast_ranges,
) {
include neutron::deps
include neutron::plugins::ml2::cisco
neutron_plugin_ml2 {
'ml2_type_nexus_vxlan/vni_ranges' : value => $vni_ranges;
'ml2_type_nexus_vxlan/mcast_ranges' : value => $mcast_ranges;
}
warning('Support for networking-cisco has been deprecated and has no effect')
}

View File

@ -57,18 +57,6 @@ class neutron::plugins::ml2::cisco::ucsm (
$ucsm_https_verify = $::os_service_default,
) {
include neutron::deps
include neutron::plugins::ml2::cisco
neutron_plugin_ml2 {
'ml2_cisco_ucsm/ucsm_ip' : value => $ucsm_ip;
'ml2_cisco_ucsm/ucsm_username' : value => $ucsm_username;
'ml2_cisco_ucsm/ucsm_password' : value => $ucsm_password, secret => true;
'ml2_cisco_ucsm/ucsm_host_list' : value => $ucsm_host_list;
'ml2_cisco_ucsm/sp_template_list' : value => $sp_template_list;
'ml2_cisco_ucsm/vnic_template_list' : value => $vnic_template_list;
'ml2_cisco_ucsm/supported_pci_devs' : value => $supported_pci_devs;
'ml2_cisco_ucsm/ucsm_https_verify' : value => $ucsm_https_verify;
}
warning('Support for networking-cisco has been deprecated and has no effect')
}

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
Support for networking-cisco has been deprecated and has no effect now. It
will be removed in a future release.

View File

@ -1,98 +0,0 @@
require 'spec_helper'
describe 'neutron::plugins::ml2::cisco::nexus' do
let :pre_condition do
"class { 'neutron::keystone::authtoken':
password => 'passw0rd',
}
class { 'neutron::server': }
class { 'neutron':
core_plugin => 'ml2'
}"
end
let :default_params do
{
:nexus_config => {
'cvf2leaff2' => {
'username' => 'prad',
"password" => "password",
"ip_address" => "172.18.117.28",
"nve_src_intf" => 1,
"physnet" => "physnet1",
"vpc_pool" => "",
"intfcfg_portchannel" => "",
"https_verify" => false,
"https_local_certificate" => "",
"servers" => {
"control02" => {
"hostname" => "control02",
"ports" => "portchannel:20"
},
"control01" => {
"hostname" => "control01",
"ports" => "portchannel:10"
}
}
}
},
:managed_physical_network => 'physnet1',
:switch_heartbeat_time => 30,
:provider_vlan_auto_create => true,
:provider_vlan_auto_trunk => true,
:vxlan_global_config => true
}
end
let :params do
{}
end
shared_examples 'neutron cisco ml2 nexus plugin' do
before do
params.merge!(default_params)
end
it { should contain_class('neutron::params') }
it do
should contain_neutron_plugin_ml2('ml2_cisco/managed_physical_network').with_value(params[:managed_physical_network])
should contain_neutron_plugin_ml2('ml2_cisco/switch_heartbeat_time').with_value(params[:switch_heartbeat_time])
should contain_neutron_plugin_ml2('ml2_cisco/provider_vlan_auto_create').with_value(params[:provider_vlan_auto_create])
should contain_neutron_plugin_ml2('ml2_cisco/provider_vlan_auto_trunk').with_value(params[:provider_vlan_auto_trunk])
should contain_neutron_plugin_ml2('ml2_cisco/vxlan_global_config').with_value(params[:vxlan_global_config])
end
it {
# Stored as an array of arrays with the first element consisting of the name and
# the second element consisting of the config hash
params[:nexus_config].each do |switch_config|
should contain_neutron__plugins__ml2__cisco__nexus_creds(switch_config.first)
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[:osfamily]
when 'RedHat'
{
:cisco_ml2_config_file => '/etc/neutron/conf.d/neutron-server/ml2_mech_cisco_nexus.conf'
}
end
end
if facts[:osfamily] == 'RedHat'
it_behaves_like 'neutron cisco ml2 nexus plugin'
end
end
end
end

View File

@ -1,52 +0,0 @@
require 'spec_helper'
describe 'neutron::plugins::ml2::cisco' do
let :pre_condition do
"class { 'neutron::keystone::authtoken':
password => 'passw0rd',
}
class { 'neutron::server': }
class { 'neutron':
core_plugin => 'ml2'
}"
end
let :default_params do
{
:package_ensure => 'present'
}
end
let :params do
{}
end
shared_examples 'neutron plugin cisco ml2' do
before do
params.merge!(default_params)
end
it { should contain_class('neutron::params') }
it 'should have' do
should contain_package('python-networking-cisco').with(
:ensure => params[:package_ensure],
: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
if facts[:osfamily] == 'RedHat'
it_behaves_like 'neutron plugin cisco ml2'
end
end
end
end

View File

@ -1,51 +0,0 @@
require 'spec_helper'
describe 'neutron::plugins::ml2::cisco::type_nexus_vxlan' do
let :pre_condition do
"class { 'neutron::keystone::authtoken':
password => 'passw0rd',
}
class { 'neutron::server': }
class { 'neutron':
core_plugin => 'ml2'
}"
end
let :default_params do
{
:vni_ranges => '20000:22000',
:mcast_ranges => '224.0.0.1:224.0.0.3,224.0.1.1:224.0.1.3'
}
end
let :params do
{}
end
shared_examples 'neutron cisco ml2 type nexus vxlan plugin' do
before do
params.merge!(default_params)
end
it { should contain_class('neutron::params') }
it do
should contain_neutron_plugin_ml2('ml2_type_nexus_vxlan/vni_ranges').with_value(params[:vni_ranges])
should contain_neutron_plugin_ml2('ml2_type_nexus_vxlan/mcast_ranges').with_value(params[:mcast_ranges])
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
if facts[:osfamily] == 'RedHat'
it_behaves_like 'neutron cisco ml2 type nexus vxlan plugin'
end
end
end
end

View File

@ -1,62 +0,0 @@
require 'spec_helper'
describe 'neutron::plugins::ml2::cisco::ucsm' do
let :pre_condition do
"class { 'neutron::keystone::authtoken':
password => 'passw0rd',
}
class { 'neutron::server': }
class { 'neutron':
core_plugin => 'ml2'
}"
end
let :default_params do
{
:ucsm_ip => '1.1.1.1',
:ucsm_username => 'admin',
:ucsm_password => 'password',
:ucsm_host_list => 'host1:profile1, host2:profile2',
:supported_pci_devs => [ '2222:3333', '4444:5555' ],
:ucsm_https_verify => 'True',
:sp_template_list => 'SP_Template1_path:SP_Template1:S1,S2 SP_Template2_path:SP_Template2:S3,S4,S5',
:vnic_template_list => 'physnet1:vnic_template_path1:vt1 physnet2:vnic_template_path2:vt2',
}
end
let :params do
{}
end
shared_examples 'neutron cisco ml2 ucsm plugin' do
before do
params.merge!(default_params)
end
it { should contain_class('neutron::params') }
it do
should contain_neutron_plugin_ml2('ml2_cisco_ucsm/ucsm_ip').with_value(params[:ucsm_ip])
should contain_neutron_plugin_ml2('ml2_cisco_ucsm/ucsm_username').with_value(params[:ucsm_username])
should contain_neutron_plugin_ml2('ml2_cisco_ucsm/ucsm_password').with_value(params[:ucsm_password]).with_secret(true)
should contain_neutron_plugin_ml2('ml2_cisco_ucsm/ucsm_host_list').with_value(params[:ucsm_host_list])
should contain_neutron_plugin_ml2('ml2_cisco_ucsm/supported_pci_devs').with_value(params[:supported_pci_devs])
should contain_neutron_plugin_ml2('ml2_cisco_ucsm/sp_template_list').with_value(params[:sp_template_list])
should contain_neutron_plugin_ml2('ml2_cisco_ucsm/vnic_template_list').with_value(params[:vnic_template_list])
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
if facts[:osfamily] == 'RedHat'
it_behaves_like 'neutron cisco ml2 ucsm plugin'
end
end
end
end