Remove deprecated agent_type option

This config option was added by [1] and deprecated to
be removed in Mitaka cycle. As we are now in Ussuri, it's
time to finally get rid of it.

[1] https://review.opendev.org/#/c/197210/

Change-Id: Ibd16a0587c88e2dbee1b7938e52140f68821eec6
This commit is contained in:
Slawek Kaplonski 2019-09-03 17:39:37 +02:00 committed by Brian Haley
parent b7fbb74b46
commit 02be7c13b3
5 changed files with 6 additions and 33 deletions

View File

@ -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.")),
]

View File

@ -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

View File

@ -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)

View File

@ -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'

View File

@ -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.