From b6a102f2d061213af6df50dd8eeb65476c7b0b57 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Sat, 3 Dec 2016 03:13:04 +0000 Subject: [PATCH] Use stevedore aliases for firewall_driver options Those are public; import paths are private and are not supposed to be used by operators. Change-Id: If6e36389eb5a8e5101e060414fd5f86b0dff8e8c --- manifests/agents/ml2/linuxbridge.pp | 4 ++-- manifests/agents/ml2/ovs.pp | 4 ++-- manifests/agents/ml2/sriov.pp | 2 +- spec/classes/neutron_agents_ml2_linuxbridge_spec.rb | 2 +- spec/classes/neutron_agents_ml2_ovs_spec.rb | 2 +- spec/classes/neutron_agents_ml2_sriov_spec.rb | 2 +- spec/classes/neutron_plugins_ml2_spec.rb | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/manifests/agents/ml2/linuxbridge.pp b/manifests/agents/ml2/linuxbridge.pp index 4564c4798..788e34755 100644 --- a/manifests/agents/ml2/linuxbridge.pp +++ b/manifests/agents/ml2/linuxbridge.pp @@ -56,7 +56,7 @@ # # [*firewall_driver*] # (optional) Firewall driver for realizing neutron security group function. -# Defaults to 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver'. +# Defaults to 'iptables'. # # [*purge_config*] # (optional) Whether to set only the specified config options @@ -75,7 +75,7 @@ class neutron::agents::ml2::linuxbridge ( $polling_interval = $::os_service_default, $l2_population = $::os_service_default, $physical_interface_mappings = [], - $firewall_driver = 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver', + $firewall_driver = 'iptables', $purge_config = false, ) { diff --git a/manifests/agents/ml2/ovs.pp b/manifests/agents/ml2/ovs.pp index 88f12d3e9..af8c47b4c 100644 --- a/manifests/agents/ml2/ovs.pp +++ b/manifests/agents/ml2/ovs.pp @@ -81,7 +81,7 @@ # # [*firewall_driver*] # (optional) Firewall driver for realizing neutron security group function. -# Defaults to 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'. +# Defaults to 'iptables_hybrid'. # # [*enable_distributed_routing*] # (optional) Set to True on L2 agents to enable support @@ -165,7 +165,7 @@ class neutron::agents::ml2::ovs ( $polling_interval = $::os_service_default, $l2_population = $::os_service_default, $arp_responder = $::os_service_default, - $firewall_driver = 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', + $firewall_driver = 'iptables_hybrid', $enable_distributed_routing = $::os_service_default, $drop_flows_on_start = false, $manage_vswitch = true, diff --git a/manifests/agents/ml2/sriov.pp b/manifests/agents/ml2/sriov.pp index 4d532c986..9b25b43bb 100644 --- a/manifests/agents/ml2/sriov.pp +++ b/manifests/agents/ml2/sriov.pp @@ -95,7 +95,7 @@ class neutron::agents::ml2::sriov ( 'agent/extensions': value => join(any2array($extensions), ','); # As of now security groups are not supported for SR-IOV ports. # It is required to disable Firewall driver in the SR-IOV agent config. - 'securitygroup/firewall_driver': value => 'neutron.agent.firewall.NoopFirewallDriver'; + 'securitygroup/firewall_driver': value => 'noop'; } if !is_service_default($number_of_vfs) and !empty($number_of_vfs) { diff --git a/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb b/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb index fdce0684e..da448bd3d 100644 --- a/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb +++ b/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb @@ -13,7 +13,7 @@ describe 'neutron::agents::ml2::linuxbridge' do :tunnel_types => [], :local_ip => false, :physical_interface_mappings => [], - :firewall_driver => 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver', + :firewall_driver => 'iptables', :purge_config => false,} end diff --git a/spec/classes/neutron_agents_ml2_ovs_spec.rb b/spec/classes/neutron_agents_ml2_ovs_spec.rb index 308f30988..c0907d0ba 100644 --- a/spec/classes/neutron_agents_ml2_ovs_spec.rb +++ b/spec/classes/neutron_agents_ml2_ovs_spec.rb @@ -15,7 +15,7 @@ describe 'neutron::agents::ml2::ovs' do :tunnel_types => [], :tunnel_bridge => 'br-tun', :drop_flows_on_start => false, - :firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', + :firewall_driver => 'iptables_hybrid', :manage_vswitch => true, :purge_config => false, :enable_dpdk => false, diff --git a/spec/classes/neutron_agents_ml2_sriov_spec.rb b/spec/classes/neutron_agents_ml2_sriov_spec.rb index 5b2fa35c0..e8e6d4b18 100644 --- a/spec/classes/neutron_agents_ml2_sriov_spec.rb +++ b/spec/classes/neutron_agents_ml2_sriov_spec.rb @@ -44,7 +44,7 @@ describe 'neutron::agents::ml2::sriov' do is_expected.to contain_neutron_sriov_agent_config('sriov_nic/exclude_devices').with_value('') is_expected.to contain_neutron_sriov_agent_config('sriov_nic/physical_device_mappings').with_value('') is_expected.to contain_neutron_sriov_agent_config('agent/extensions').with_value(['']) - is_expected.to contain_neutron_sriov_agent_config('securitygroup/firewall_driver').with_value('neutron.agent.firewall.NoopFirewallDriver') + is_expected.to contain_neutron_sriov_agent_config('securitygroup/firewall_driver').with_value('noop') end it 'does not configure numvfs by default' do diff --git a/spec/classes/neutron_plugins_ml2_spec.rb b/spec/classes/neutron_plugins_ml2_spec.rb index 9fdd617b2..4b8c28fad 100644 --- a/spec/classes/neutron_plugins_ml2_spec.rb +++ b/spec/classes/neutron_plugins_ml2_spec.rb @@ -106,12 +106,12 @@ describe 'neutron::plugins::ml2' do before :each do params.merge!( :enable_security_group => true, - :firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', + :firewall_driver => 'iptables_hybrid', ) end it 'configures enable_security_group and firewall_driver options' do is_expected.to contain_neutron_plugin_ml2('securitygroup/enable_security_group').with_value('true') - is_expected.to contain_neutron_plugin_ml2('securitygroup/firewall_driver').with_value('neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver') + is_expected.to contain_neutron_plugin_ml2('securitygroup/firewall_driver').with_value('iptables_hybrid') end end