Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2093,7 +2093,8 @@ def set_gateway_mtu(self, context, prov_net, txn=None):
for port in ports:
lrp_name = utils.ovn_lrouter_port_name(port['id'])
options = self._gen_router_port_options(port, prov_net)
commands.append(self._nb_idl.lrp_set_options(lrp_name, **options))
commands.append(self._nb_idl.update_lrouter_port(
lrp_name, if_exists=True, **options))
self._transaction(commands, txn=txn)

def update_network(self, context, network, original_network=None):
Expand Down
1 change: 0 additions & 1 deletion neutron/tests/unit/fake_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def __init__(self, **kwargs):
self.get_acls_for_lswitches = mock.Mock()
self.create_lrouter = mock.Mock()
self.lrp_del = mock.Mock()
self.lrp_set_options = mock.Mock()
self.update_lrouter = mock.Mock()
self.delete_lrouter = mock.Mock()
self.add_lrouter_port = mock.Mock()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2446,8 +2446,8 @@ def _test_update_network_fragmentation(self, new_mtu, expected_opts, grps):
self.mech_driver.update_network_postcommit(fake_ctx)

lrp_name = ovn_utils.ovn_lrouter_port_name(port['port']['id'])
self.nb_ovn.lrp_set_options.assert_called_once_with(
lrp_name, **expected_opts)
self.nb_ovn.update_lrouter_port.assert_called_once_with(
lrp_name, if_exists=True, **expected_opts)

def test_update_network_need_to_frag_enabled(self):
ovn_conf.cfg.CONF.set_override('ovn_emit_need_to_frag', True,
Expand Down
2 changes: 1 addition & 1 deletion neutron/tests/unit/services/ovn_l3/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,7 @@ def test_add_router_interface_need_to_frag_enabled_then_remove(
self.l3_inst._nb_ovn.add_lrouter_port.assert_called_once_with(
**fake_router_port_assert)
# Since if_exists = True it will safely return
self.l3_inst._nb_ovn.lrp_set_options(
self.l3_inst._nb_ovn.update_lrouter_port(
name='lrp-router-port-id', if_exists=True,
options=fake_router_port_assert)
# If no if_exists is provided, it is defaulted to true, so this
Expand Down