]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Re-use context session in ML2 DB get_port_binding_host
authorDane LeBlanc <leblancd@cisco.com>
Sat, 4 Apr 2015 22:50:36 +0000 (18:50 -0400)
committerDane LeBlanc <leblancd@cisco.com>
Wed, 8 Apr 2015 15:09:56 +0000 (11:09 -0400)
commitaeb5efe3fbeae82a2d65f6bb68710d14156c58bf
tree585fdac0d17c8f030d775654d8216d3c97575af7
parent21bef562c23d96fe41daeedeb43c0bb2d1c53ed0
Re-use context session in ML2 DB get_port_binding_host

This patch modifies ML2 DB get_port_binding_host method so that it
reuses the existing context session to do the database query
rather than creating a new database session.

Note that there are other methods in ML2 DB that do not re-use
the caller's session (get_port_from_device_mac() and
get_sg_ids_grouped_by_port()). These will be modified using
a separate bug (https://bugs.launchpad.net/neutron/+bug/1441205).
Change-Id: I8aafb0a70f40f9306ccc366e5db6860c92c48cce
Closes-Bug: #1440183
neutron/db/l3_dvrscheduler_db.py
neutron/plugins/ml2/db.py
neutron/plugins/ml2/plugin.py
neutron/tests/unit/plugins/ml2/test_db.py