Merge "Remove support for Cisco VTS mechanism driver"

This commit is contained in:
Zuul 2024-04-25 15:11:27 +00:00 committed by Gerrit Code Review
commit ee49632f08
4 changed files with 6 additions and 146 deletions

View File

@ -46,8 +46,8 @@
# (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, hyperv, ncs, arista, cisco_nexus,
# l2population, sriovnicswitch, macvtap
# logger, test, linuxbridge, openvswitch, arista, l2population,
# sriovnicswitch, macvtap
# Default to ['openvswitch'].
#
# [*flat_networks*]

View File

@ -1,78 +0,0 @@
# == Class: neutron::plugins::ml2::cisco::vts
#
# DEPRECATED !!
# Install the Cisco VTS driver and generate the ML2 config file
# from parameters in the other classes.
#
# === Parameters
#
# [*vts_username*]
# (optional) The VTS controller username
# Example: 'admin'
# Defaults to $facts['os_service_default']
#
# [*vts_password*]
# (optional) The VTS controller password
# Example: 'admin'
# Defaults to $facts['os_service_default']
#
# [*vts_url*]
# (optional) The VTS controller neutron URL
# Example: 'http://127.0.0.1:8888/api/running/openstack'
# Defaults to $facts['os_service_default']
#
# [*vts_timeout*]
# (optional) Timeout for connection to vts host REST interface.
# Defaults to $facts['os_service_default']
#
# [*vts_sync_timeout*]
# (optional) Timeout for synchronization to VTS.
# Defaults to $facts['os_service_default']
#
# [*vts_retry_count*]
# (optional) Number of retries for synchronization with VTS.
# Defaults to $facts['os_service_default']
#
# [*vts_vmmid*]
# (optional) Virtual Machine Manager ID as assigned by VTS
# Defaults to $facts['os_service_default']
#
# [*package_ensure*]
# (optional) The intended state of the cisco-vts-ml2-driver
# package, i.e. any of the possible values of the 'ensure'
# property for a package resource type.
# Defaults to 'present'
#
class neutron::plugins::ml2::cisco::vts (
$vts_username = $facts['os_service_default'],
$vts_password = $facts['os_service_default'],
$vts_url = $facts['os_service_default'],
$vts_vmmid = $facts['os_service_default'],
$vts_timeout = $facts['os_service_default'],
$vts_sync_timeout = $facts['os_service_default'],
$vts_retry_count = $facts['os_service_default'],
$package_ensure = 'present'
) {
include neutron::deps
require neutron::plugins::ml2
warning('Support for Cisco VTS mechanism driver has been deprecated')
ensure_resource('package', 'python-cisco-controller',
{
ensure => $package_ensure,
tag => ['openstack', 'neutron-plugin-ml2-package']
}
)
neutron_plugin_ml2 {
'ml2_cc/username': value => $vts_username;
'ml2_cc/password': value => $vts_password, secret => true;
'ml2_cc/url': value => $vts_url;
'ml2_cc/timeout': value => $vts_timeout;
'ml2_cc/sync_timeout': value => $vts_sync_timeout;
'ml2_cc/retry_count': value => $vts_retry_count;
'ml2_cc/vmm_id': value => $vts_vmmid;
}
}

View File

@ -0,0 +1,4 @@
---
upgrade:
- |
Support for Cisco VTS mechanism driver has been removed.

View File

@ -1,66 +0,0 @@
require 'spec_helper'
describe 'neutron::plugins::ml2::cisco::vts' do
let :pre_condition do
"class { 'neutron::keystone::authtoken':
password => 'passw0rd',
}
class { 'neutron::server': }
class { 'neutron':
core_plugin => 'ml2'
}"
end
let :default_params do
{
:vts_timeout => '<SERVICE DEFAULT>',
:vts_sync_timeout => '<SERVICE DEFAULT>',
:vts_retry_count => '<SERVICE DEFAULT>',
:package_ensure => 'present',
}
end
let :params do
{
:vts_username => 'user',
:vts_password => 'password',
:vts_url => 'http://abc123',
:vts_vmmid => '12345',
}
end
shared_examples 'neutron plugin ml2 cisco vts' do
before do
params.merge!(default_params)
end
it 'should have' do
should contain_package('python-cisco-controller').with(
:ensure => params[:package_ensure],
:tag => ['openstack', 'neutron-plugin-ml2-package']
)
end
it 'configures ml2_cc cisco_vts settings' do
should contain_neutron_plugin_ml2('ml2_cc/password').with_value(params[:vts_password]).with_secret(true)
should contain_neutron_plugin_ml2('ml2_cc/username').with_value(params[:vts_username])
should contain_neutron_plugin_ml2('ml2_cc/url').with_value(params[:vts_url])
should contain_neutron_plugin_ml2('ml2_cc/timeout').with_value(params[:vts_timeout])
should contain_neutron_plugin_ml2('ml2_cc/sync_timeout').with_value(params[:vts_sync_timeout])
should contain_neutron_plugin_ml2('ml2_cc/retry_count').with_value(params[:vts_retry_count])
should contain_neutron_plugin_ml2('ml2_cc/vmm_id').with_value(params[:vts_vmmid])
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 ml2 cisco vts'
end
end
end