Merge "[OVN]Ensure gateway port is running after gateway chassis changed"

This commit is contained in:
Zuul 2022-03-08 11:21:16 +00:00 committed by Gerrit Code Review
commit 75c60e277e
2 changed files with 5 additions and 1 deletions

View File

@ -345,7 +345,7 @@ class OVNL3RouterPlugin(service_base.ServicePluginBase,
# device owner is router_gateway. We need to look into it and
# fix the problem in Neutron before updating it here.
if host:
self._plugin.update_port(
port = self._plugin.update_port(
context, port['id'],
{'port': {portbindings.HOST_ID: host}})

View File

@ -1454,6 +1454,10 @@ class TestOVNL3RouterPlugin(test_mech_driver.Ml2PluginV2TestCase):
mock_get_port.return_value = [{
'id': fake_port_id,
'status': constants.PORT_STATUS_DOWN}]
mock_updt_port.return_value = {
'id': fake_port_id,
'status': constants.PORT_STATUS_DOWN
}
self.l3_inst.update_router_gateway_port_bindings(
fake_router, fake_host)