Aaron Rosen 6c510bce81 Change lazy='dynamic' to 'joined' in models_v2
Previously several models were defined with lazy='dynamic'. This would
then cause Ports.fixed_ips (or w/e was specified as dynamic) to be defined
as a AppenderQuery object and when accessed would query for the result.
Therefore in get_ports() for example, when fixed_ips was accessed
in _make_port_dict() we would be issuing an addition query to the database
to lookup the fixed_ips information.

This patch changes update_port/subnet() so that it keeps track of what
changed so it does not have to query the db for values it should already
know about.

This patch also adds a unit test for update_subnet() adding host routes
where there was missing code coverage.

Implements blueprint improve-db-performance

Change-Id: I0b2214604042a1fd362cbbf3fd70e31adf0ce279
2013-06-08 18:59:35 -07:00
..
2011-11-28 10:33:52 -08:00
2013-05-16 19:28:13 +09:00