]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Refactor BigSwitch error handling to use db rollbacks
authorKevin Benton <kevin.benton@bigswitch.com>
Fri, 23 Aug 2013 03:17:00 +0000 (20:17 -0700)
committerKevin Benton <kevin.benton@bigswitch.com>
Tue, 27 Aug 2013 12:39:10 +0000 (05:39 -0700)
commit9928edb42da42af3463d4a989a0797be46198908
tree8840741c41e509ec9995f0fa1627071e89398eb3
parent289695acf2d6edb5ce80105533c71e27d604f20d
Refactor BigSwitch error handling to use db rollbacks

This patch adjusts most of the logic handling the
calls to the controller in the BigSwitch/floodlight
plugin to make use of the db rollbacks from
sqlalchemy for free on exceptions. This eliminates
several complex try-except blocks and makes
maintaining db<->controller consistency easier.

Fixes: bug #1215823
Change-Id: Ia636c40e744b3b1c543e891791bf492df4f675d2
neutron/plugins/bigswitch/plugin.py
neutron/tests/unit/bigswitch/fake_server.py [new file with mode: 0644]
neutron/tests/unit/bigswitch/test_restproxy_plugin.py
neutron/tests/unit/bigswitch/test_router_db.py