]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Remove double queries in l3 DB get methods
authorKevin Benton <blak111@gmail.com>
Fri, 17 Apr 2015 11:28:58 +0000 (04:28 -0700)
committerKevin Benton <blak111@gmail.com>
Fri, 17 Apr 2015 12:13:52 +0000 (05:13 -0700)
commit3310c3c3d4c05c0d13f32f08f978ba4813e2a39a
tree4c95298df18bf87d54339369e162facb06986589
parenta38b5df5cd3c47672705aad4c30e789ae11ec958
Remove double queries in l3 DB get methods

Two frequently called functions were querying the routerport table
and the corresponding ports just to get the port ID. Then they were
calling get_ports again with those port IDs, resulting in two queries
to the port table when there should have only been one.

This eliminates the second call to get_ports since all of the necessary
data hase been retrieved from the port table.

Change-Id: I806e9c380b7de048fe084b2baf4b6f92ab0edf6b
Partial-Bug: #1445412
neutron/db/l3_db.py
neutron/db/l3_dvr_db.py