diff --git a/ovsdbapp/schema/ovn_northbound/commands.py b/ovsdbapp/schema/ovn_northbound/commands.py index 6ad9b27d..9f247207 100644 --- a/ovsdbapp/schema/ovn_northbound/commands.py +++ b/ovsdbapp/schema/ovn_northbound/commands.py @@ -869,7 +869,7 @@ class LrRouteAddCommand(cmd.BaseCommand): route.nexthop = self.nexthop route.policy = self.policy if self.port: - route.port = self.port + route.output_port = self.port self.result = rowview.RowView(route) return route = txn.insert(self.api.tables['Logical_Router_Static_Route']) @@ -877,7 +877,7 @@ class LrRouteAddCommand(cmd.BaseCommand): route.nexthop = self.nexthop route.policy = self.policy if self.port: - route.port = self.port + route.output_port = self.port lr.addvalue('static_routes', route) self.result = route.uuid diff --git a/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py b/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py index 16cd3d33..aacbfea8 100644 --- a/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py +++ b/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py @@ -739,11 +739,13 @@ class TestLogicalRouterOps(OvnNorthboundTest): may_exist=True) prefix = prefix or '192.0.2.0/25' nexthop = nexthop or '192.0.2.254' + port = port or "port_name" sr = self.api.lr_route_add(lr.uuid, prefix, nexthop, port, **kwargs).execute(check_error=True) self.assertIn(sr, lr.static_routes) self.assertEqual(prefix, sr.ip_prefix) self.assertEqual(nexthop, sr.nexthop) + self.assertIn(port, sr.output_port) sr.router = lr return sr