Browse Source

Fix outerjoin to comply with SQLAlchemy 1.3 strictness

The outerjoin in neutron_dynamic_routing/db/bgp_db.py does not meet
with the stricter new standards in SQLAlchemy 1.3, so this finds a
more compliant form.

[1] https://docs.sqlalchemy.org/en/13/changelog/migration_13.html#query-join-handles-ambiguity-in-deciding-the-left-side-more-explicitly

Change-Id: I603a2febb1755b6db17e6ac9cb22015a1f3336d4
Closes-Bug: #1898634
changes/13/756613/2
Nate Johnston 10 months ago
committed by Jens Harbott (frickler)
parent
commit
4212b70538
  1. 2
      neutron_dynamic_routing/db/bgp_db.py

2
neutron_dynamic_routing/db/bgp_db.py

@ -670,7 +670,7 @@ class BgpDbMixin(object):
next_hop_alias.subnet_id == models_v2.Subnet.id,
models_v2.Subnet.ip_version == 4)
query = query.outerjoin(router_attrs,
l3_db.Router.id == router_attrs.router_id)
router_attrs.router_id == l3_db.Router.id)
query = query.filter(router_attrs.distributed != sa.sql.true())
return self._host_route_list_from_tuples(query.all())

Loading…
Cancel
Save