Deprecated supported_pci_vendor_devs which is removed in neutron
Parameter supported_pci_vendor_devs has no effect in neutron as it has been removed in Ocata. This patch is deprecating this parameter and will be removed in future release. Neutron commit - https://review.openstack.org/#/c/391911/ Change-Id: I0d1bd5c8b67131223df2744ff711ffc697a07de0
This commit is contained in:
parent
afa1634d7f
commit
0609096107
@ -101,12 +101,6 @@
|
||||
# (optional) Ensure state for package.
|
||||
# Defaults to 'present'.
|
||||
#
|
||||
# [*supported_pci_vendor_devs*]
|
||||
# (optional) Supported PCI vendor devices, defined by
|
||||
# vendor_id:product_id according to the PCI ID
|
||||
# Repository. Should be an array of devices.
|
||||
# Defaults to ['15b3:1004', '8086:10ca'] (Intel & Mellanox SR-IOV capable NICs)
|
||||
#
|
||||
# [*physical_network_mtus*]
|
||||
# (optional) For L2 mechanism drivers, per-physical network MTU setting.
|
||||
# Should be an array with 'physnetX1:9000'.
|
||||
@ -133,6 +127,13 @@
|
||||
# are 4 and 6.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
# [*supported_pci_vendor_devs*]
|
||||
# (optional) Supported PCI vendor devices, defined by
|
||||
# vendor_id:product_id according to the PCI ID
|
||||
# Repository. Should be an array of devices.
|
||||
# Defaults to undef
|
||||
#
|
||||
class neutron::plugins::ml2 (
|
||||
$type_drivers = ['local', 'flat', 'vlan', 'gre', 'vxlan'],
|
||||
$extension_drivers = $::os_service_default,
|
||||
@ -146,12 +147,13 @@ class neutron::plugins::ml2 (
|
||||
$enable_security_group = $::os_service_default,
|
||||
$firewall_driver = $::os_service_default,
|
||||
$package_ensure = 'present',
|
||||
$supported_pci_vendor_devs = ['15b3:1004', '8086:10ca'],
|
||||
$physical_network_mtus = $::os_service_default,
|
||||
$path_mtu = 0,
|
||||
$purge_config = false,
|
||||
$max_header_size = $::os_service_default,
|
||||
$overlay_ip_version = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$supported_pci_vendor_devs = undef,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
@ -165,6 +167,10 @@ class neutron::plugins::ml2 (
|
||||
warning('Security groups will not work without properly set firewall_driver')
|
||||
}
|
||||
|
||||
if $supported_pci_vendor_devs {
|
||||
warning ('supported_pci_vendor_devs is deprecated, has no effect and will be removed in a future release.')
|
||||
}
|
||||
|
||||
if !is_service_default($overlay_ip_version) and !($overlay_ip_version in [4, 6]) {
|
||||
fail('Invalid IP version for overlay_ip_version')
|
||||
}
|
||||
@ -215,10 +221,6 @@ class neutron::plugins::ml2 (
|
||||
max_header_size => $max_header_size
|
||||
}
|
||||
|
||||
neutron::plugins::ml2::mech_driver { $mechanism_drivers:
|
||||
supported_pci_vendor_devs => $supported_pci_vendor_devs,
|
||||
}
|
||||
|
||||
neutron_plugin_ml2 {
|
||||
'ml2/type_drivers': value => join(any2array($type_drivers), ',');
|
||||
'ml2/tenant_network_types': value => join(any2array($tenant_network_types), ',');
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
deprecations:
|
||||
- Parameter 'supported_pci_vendor_devs' of the class neutron::plugins::ml2
|
||||
has been deprecated, as this configuration is removed in neutron in Ocata.
|
@ -287,17 +287,6 @@ describe 'neutron::plugins::ml2' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'when running sriov mechanism driver' do
|
||||
before :each do
|
||||
params.merge!(
|
||||
:mechanism_drivers => ['openvswitch', 'sriovnicswitch'],
|
||||
)
|
||||
end
|
||||
it 'configures sriov mechanism driver' do
|
||||
is_expected.to contain_neutron_plugin_sriov('ml2_sriov/supported_pci_vendor_devs').with_value(['15b3:1004,8086:10ca'])
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Ubuntu operating systems' do
|
||||
before do
|
||||
facts.merge!({:operatingsystem => 'Ubuntu'})
|
||||
|
@ -1,50 +0,0 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'neutron::plugins::ml2::mech_driver' do
|
||||
|
||||
let :title do
|
||||
'mech_driver'
|
||||
end
|
||||
|
||||
let :params do {
|
||||
:name => 'sriovnicswitch',
|
||||
:supported_pci_vendor_devs => '8086:10ed',
|
||||
}
|
||||
end
|
||||
|
||||
describe 'provide sriov configuration for Debian' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
end
|
||||
|
||||
it 'configures supported_pci_vendor_devs' do
|
||||
is_expected.to contain_neutron_plugin_sriov('ml2_sriov/supported_pci_vendor_devs').with_value('8086:10ed')
|
||||
end
|
||||
|
||||
it 'adds ml2_conf_sriov.ini to neutron_server' do
|
||||
is_expected.to contain_file_line('DAEMON_ARGS').with(
|
||||
:path => '/etc/default/neutron-server',
|
||||
:line => 'DAEMON_ARGS="$DAEMON_ARGS --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini"',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'provide sriov configuration for Redhat' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
it 'configures supported_pci_vendor_devs' do
|
||||
is_expected.to contain_neutron_plugin_sriov('ml2_sriov/supported_pci_vendor_devs').with_value('8086:10ed')
|
||||
end
|
||||
|
||||
it 'creates symbolic link for ml2_conf_sriov.ini config.d directory' do
|
||||
is_expected.to contain_file('/etc/neutron/conf.d/neutron-server/ml2_conf_sriov.conf').with(
|
||||
:ensure => 'link',
|
||||
:target => '/etc/neutron/plugins/ml2/ml2_conf_sriov.ini'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user