Join on explcit relationship paths
The join() in get_router_for_floatingip() is joining from entity to entity without an explicit ON clause which creates an ambiguous situation. SQLAlchemy 1.3 guards against this now, so use the real relationship-bound path so that the ORM does not need to guess. This mock replicates the original query without the "gw_port.device_owner == DEVICE_OWNER_ROUTER_GW" filter. Error [1] found in [2]. Based on [3]. [1] http://paste.openstack.org/show/748825 [2] https://review.openstack.org/#/c/649508 [3] https://review.openstack.org/#/c/642117 Change-Id: I7e12e2a2b6f9e8eb2233819f41d1065c95f0d552 Closes-Bug: #1823059
This commit is contained in:
parent
29ad31be10
commit
a39bc9758c
@ -3144,7 +3144,7 @@ class L3NatTestCaseBase(L3NatTestCaseMixin):
|
|||||||
l3_models.RouterPort.router_id,
|
l3_models.RouterPort.router_id,
|
||||||
models_v2.IPAllocation.ip_address
|
models_v2.IPAllocation.ip_address
|
||||||
).join(
|
).join(
|
||||||
models_v2.Port, models_v2.IPAllocation
|
l3_models.RouterPort.port, models_v2.Port.fixed_ips
|
||||||
).filter(
|
).filter(
|
||||||
models_v2.Port.network_id == internal_port['network_id'],
|
models_v2.Port.network_id == internal_port['network_id'],
|
||||||
l3_models.RouterPort.port_type.in_(
|
l3_models.RouterPort.port_type.in_(
|
||||||
|
Loading…
Reference in New Issue
Block a user