[stable only] Fix KeyError in set_gateway_mtu

Got missed in initial fixes[1], this patch fixes
it.

[1] https://review.opendev.org/q/I447990509cdea9830228d3bc92a97062cc57a472
Closes-Bug: #2065701
Related-Bug: #2060163

Change-Id: Icdab45ab0873c003977e3f02277d267116002973
(cherry picked from commit 0d8cc09c4a)
This commit is contained in:
yatinkarel 2024-06-06 16:17:07 +05:30
parent 72b64013e2
commit 4c56dfded1
2 changed files with 2 additions and 2 deletions

View File

@ -1982,7 +1982,7 @@ class OVNClient(object):
lrp_name = utils.ovn_lrouter_port_name(port['id'])
options = self._gen_router_port_options(port, prov_net)
commands.append(self._nb_idl.update_lrouter_port(
lrp_name, if_exists=True, **options))
lrp_name, if_exists=True, options=options))
self._transaction(commands, txn=txn)
def _check_network_changes_in_ha_chassis_groups(self,

View File

@ -2566,7 +2566,7 @@ class TestOVNMechanismDriver(TestOVNMechanismDriverBase):
lrp_name = ovn_utils.ovn_lrouter_port_name(port['port']['id'])
self.nb_ovn.update_lrouter_port.assert_called_once_with(
lrp_name, if_exists=True, **expected_opts)
lrp_name, if_exists=True, options=expected_opts)
def test_update_network_need_to_frag_enabled(self):
ovn_conf.cfg.CONF.set_override('ovn_emit_need_to_frag', True,