From fb2b74d6d9ff3d36005b4220d479b9dcefaafa7a Mon Sep 17 00:00:00 2001 From: Sanjay Upadhyay Date: Thu, 16 Jun 2016 18:50:01 +0530 Subject: [PATCH] Cleanup for sriov-agent sriov-agent-required As per mitaka release sriov-agent is enabled by default Hence removing this option for sriov-agent. If mech driver has sriovnicswitch, then sriov-agent is enabled by default. Implements: blueprint tripleo-sriov Change-Id: I01bdda6df995f3b09fc55e6b1a016246b68eea26 --- manifests/plugins/ml2.pp | 23 +++++++++++++---------- manifests/plugins/ml2/mech_driver.pp | 5 ----- spec/classes/neutron_plugins_ml2_spec.rb | 4 +--- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/manifests/plugins/ml2.pp b/manifests/plugins/ml2.pp index 179c703eb..e725b77e2 100644 --- a/manifests/plugins/ml2.pp +++ b/manifests/plugins/ml2.pp @@ -107,12 +107,6 @@ # Repository. Should be an array of devices. # Defaults to ['15b3:1004', '8086:10ca'] (Intel & Mellanox SR-IOV capable NICs) # -# [*sriov_agent_required*] -# (optional) SRIOV neutron agent is required for port binding. -# Only set to true if SRIOV network adapters support VF link state setting -# and if admin state management is desired. -# Defaults to false. -# # [*physical_network_mtus*] # (optional) For L2 mechanism drivers, per-physical network MTU setting. # Should be an array with 'physnetX1:9000'. @@ -134,7 +128,12 @@ # the maximum MTU for the driver. # Defaults to $::os_service_default # - +# DEPRECATED PARAMETERS +# +# [*sriov_agent_required*] +# (optional) Deprecated. +# Defaults to undef. +# class neutron::plugins::ml2 ( $type_drivers = ['local', 'flat', 'vlan', 'gre', 'vxlan'], $extension_drivers = $::os_service_default, @@ -149,11 +148,12 @@ class neutron::plugins::ml2 ( $firewall_driver = $::os_service_default, $package_ensure = 'present', $supported_pci_vendor_devs = ['15b3:1004', '8086:10ca'], - $sriov_agent_required = false, $physical_network_mtus = $::os_service_default, $path_mtu = 0, $purge_config = false, - $max_header_size = $::os_service_default + $max_header_size = $::os_service_default, + # DEPRECATED PARAMETERS + $sriov_agent_required = undef, ) { include ::neutron::deps @@ -213,9 +213,12 @@ class neutron::plugins::ml2 ( max_header_size => $max_header_size } + if $sriov_agent_required { + warning ('sriov_agent_required is deprecated, has no effect and will be removed in a future release.') + } + neutron::plugins::ml2::mech_driver { $mechanism_drivers: supported_pci_vendor_devs => $supported_pci_vendor_devs, - sriov_agent_required => $sriov_agent_required, } neutron_plugin_ml2 { diff --git a/manifests/plugins/ml2/mech_driver.pp b/manifests/plugins/ml2/mech_driver.pp index 7f2817c07..b8427cc42 100644 --- a/manifests/plugins/ml2/mech_driver.pp +++ b/manifests/plugins/ml2/mech_driver.pp @@ -23,12 +23,8 @@ # (required) Supported PCI vendor devices, defined by vendor_id:product_id according # to the PCI ID Repository. Default enables support for Intel and Mellanox SR-IOV capable NICs # -# [*sriov_agent_required*] -# (optional) SRIOV neutron agent is always required for port binding -# define neutron::plugins::ml2::mech_driver ( $supported_pci_vendor_devs, - $sriov_agent_required = true, ){ include ::neutron::deps @@ -36,7 +32,6 @@ define neutron::plugins::ml2::mech_driver ( if ($name == 'sriovnicswitch') { neutron_plugin_sriov { 'ml2_sriov/supported_pci_vendor_devs': value => join(any2array($supported_pci_vendor_devs), ','); - 'ml2_sriov/agent_required': value => $sriov_agent_required; } } } diff --git a/spec/classes/neutron_plugins_ml2_spec.rb b/spec/classes/neutron_plugins_ml2_spec.rb index e29e3c784..4a38952eb 100644 --- a/spec/classes/neutron_plugins_ml2_spec.rb +++ b/spec/classes/neutron_plugins_ml2_spec.rb @@ -263,11 +263,9 @@ describe 'neutron::plugins::ml2' do before :each do params.merge!( :mechanism_drivers => ['openvswitch', 'sriovnicswitch'], - :sriov_agent_required => true, ) end - it 'configures sriov mechanism driver with agent_enabled' do - is_expected.to contain_neutron_plugin_sriov('ml2_sriov/agent_required').with_value('true') + 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