From 467e5364941a69a1e95789a9b883440cb35f5198 Mon Sep 17 00:00:00 2001 From: Anton Vazhnetsov Date: Tue, 7 Sep 2021 18:05:16 +0300 Subject: [PATCH] nb: fix route.output_port name Row in 'Logical_Router_Static_Route' does not have 'port' field, this field is called 'output_port'. Change-Id: I89320073b2da43e3489e145b49aa2f0f0c1e4b77 --- ovsdbapp/schema/ovn_northbound/commands.py | 4 ++-- .../tests/functional/schema/ovn_northbound/test_impl_idl.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) 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