Merge "nb: fix route.output_port name"

This commit is contained in:
Zuul 2021-10-11 19:20:16 +00:00 committed by Gerrit Code Review
commit 47a01029f5
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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