The Big Switch ML2 driver re-uses large parts of
code from the Big Switch plugin. However, the plugin
uses the old portbindings_db in its port tracking
code. This db is not created/used by ML2, so it does
not exist when the Big Switch ML2 driver is being used.
This caused a problem when the portbindings_db module
would be imported even though it wasn't being used
since the SQLAlchemy models would create the
relationships during the import.
This patch moves the portbindings_db import down to
the methods that leverage it so it won't be imported
during use by the ML2 driver.
This is a temporary solution which can be back-ported
if disabling auto schema generation is back-ported
to icehouse. An appropriate fix will require some
refactoring to avoid the port tracking code from
being imported for ML2.
Reviewed: https:/ /review. openstack. org/84983 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=1997cc97f14 b95251ad5688201 60405e34a39801
Committed: https:/
Submitter: Jenkins
Branch: master
commit 1997cc97f14b952 51ad56882016040 5e34a39801
Author: Kevin Benton <email address hidden>
Date: Thu Apr 3 10:00:37 2014 +0000
BigSwitch: Don't import portbindings_db until use
The Big Switch ML2 driver re-uses large parts of
code from the Big Switch plugin. However, the plugin
uses the old portbindings_db in its port tracking
code. This db is not created/used by ML2, so it does
not exist when the Big Switch ML2 driver is being used.
This caused a problem when the portbindings_db module
would be imported even though it wasn't being used
since the SQLAlchemy models would create the
relationships during the import.
This patch moves the portbindings_db import down to
the methods that leverage it so it won't be imported
during use by the ML2 driver.
This is a temporary solution which can be back-ported
if disabling auto schema generation is back-ported
to icehouse. An appropriate fix will require some
refactoring to avoid the port tracking code from
being imported for ML2.
Closes-Bug: #1300628 c423cba0d50bb27 715b43c0b1c
Change-Id: I551abf9d6ec832