diff --git a/neutron/conf/plugins/ml2/drivers/ovs_conf.py b/neutron/conf/plugins/ml2/drivers/ovs_conf.py index 79f7dd46a2b..24b1fd7c961 100644 --- a/neutron/conf/plugins/ml2/drivers/ovs_conf.py +++ b/neutron/conf/plugins/ml2/drivers/ovs_conf.py @@ -155,9 +155,6 @@ agent_opts = [ cfg.BoolOpt('tunnel_csum', default=False, help=_("Set or un-set the tunnel header checksum on " "outgoing IP packet carrying GRE/VXLAN tunnel.")), - cfg.StrOpt('agent_type', default=n_const.AGENT_TYPE_OVS, - deprecated_for_removal=True, - help=_("Selects the Agent Type reported.")), cfg.BoolOpt('baremetal_smartnic', default=False, help=_("Enable the agent to process Smart NIC ports.")), ] diff --git a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py index c563eec6794..9353be33408 100644 --- a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py +++ b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py @@ -320,7 +320,7 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin, 'baremetal_smartnic': self.conf.AGENT.baremetal_smartnic}, 'resource_versions': resources.LOCAL_RESOURCE_VERSIONS, - 'agent_type': agent_conf.agent_type, + 'agent_type': n_const.AGENT_TYPE_OVS, 'start_flag': True} report_interval = agent_conf.report_interval diff --git a/neutron/tests/functional/cmd/test_netns_cleanup.py b/neutron/tests/functional/cmd/test_netns_cleanup.py index d60ea6212e4..2dee9237c82 100644 --- a/neutron/tests/functional/cmd/test_netns_cleanup.py +++ b/neutron/tests/functional/cmd/test_netns_cleanup.py @@ -151,7 +151,6 @@ class TestNETNSCLIConfig(basetest.BaseTestCase): def test_netns_opts_registration(self): self.assertFalse(self.conf.force) - self.assertIsNone(self.conf.get('agent_type')) # to unregister opts self.conf.reset() self.conf.unregister_opts(cmd.netns_opts) diff --git a/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py b/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py index d1d7b6c374e..cf27d096c18 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py +++ b/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py @@ -256,34 +256,6 @@ class TestOvsNeutronAgent(object): for tag in exception: self.assertNotIn(tag, available_vlan) - def test_agent_type_alt(self): - with mock.patch.object(self.mod_agent.OVSNeutronAgent, - 'setup_integration_br'),\ - mock.patch.object(self.mod_agent.OVSNeutronAgent, - 'setup_ancillary_bridges', - return_value=[]), \ - mock.patch('neutron.agent.linux.ip_lib.get_device_mac', - return_value='00:00:00:00:00:01'), \ - mock.patch( - 'neutron.agent.common.ovs_lib.BaseOVS.get_bridges'), \ - mock.patch('oslo_service.loopingcall.FixedIntervalLoopingCall', - new=MockFixedIntervalLoopingCall), \ - mock.patch( - 'neutron.agent.common.ovs_lib.OVSBridge.' 'get_vif_ports', - return_value=[]),\ - mock.patch('neutron.agent.rpc.PluginReportStateAPI.' - 'has_alive_neutron_server'): - # validate setting non default agent_type - expected = 'alt agent type' - cfg.CONF.set_override('agent_type', - expected, - group='AGENT') - ext_manager = mock.Mock() - self.agent = self.mod_agent.OVSNeutronAgent(self._bridge_classes(), - ext_manager, cfg.CONF) - self.assertEqual(expected, - self.agent.agent_state['agent_type']) - def _test_restore_local_vlan_maps(self, tag, segmentation_id='1'): port = mock.Mock() port.port_name = 'fake_port' diff --git a/releasenotes/notes/remove-agent_type-config-option-31eea687b4ec2e3a.yaml b/releasenotes/notes/remove-agent_type-config-option-31eea687b4ec2e3a.yaml new file mode 100644 index 00000000000..ed44648f395 --- /dev/null +++ b/releasenotes/notes/remove-agent_type-config-option-31eea687b4ec2e3a.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Config option ``agent_type``, which has been deprecated since Mitaka, is now + removed. Agents should now use hardcoded values for agent type.