The _get_sync_routers method was calling get_routers and
then getting the gateway ports from the db in a separate
get_ports call. This extra call is unnecessary since is
already an SQL relationship directly between the router
and it's gw_port.
This patch eliminates all of the additional gw_port retrieval
logic by replacing the get_routers call with a _get_collection
call to make use of the gw_port object already present on
each router object.
Reviewed: https:/ /review. openstack. org/174845 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=682c0fdcc2f aad07e82968a7a7 739f2dedd7173f
Committed: https:/
Submitter: Jenkins
Branch: master
commit 682c0fdcc2faad0 7e82968a7a7739f 2dedd7173f
Author: Kevin Benton <email address hidden>
Date: Fri Apr 17 04:54:41 2015 -0700
Eliminate extra queries used to retrieve gw_ports
The _get_sync_routers method was calling get_routers and
then getting the gateway ports from the db in a separate
get_ports call. This extra call is unnecessary since is
already an SQL relationship directly between the router
and it's gw_port.
This patch eliminates all of the additional gw_port retrieval
logic by replacing the get_routers call with a _get_collection
call to make use of the gw_port object already present on
each router object.
Change-Id: I478bfef8b0273b 343aa72bcd6787a 486eba4f006
Partial-Bug: #1445412