ML2: database needs to be initalized after drivers loaded

Previously, if you started neutron-server with an empty database some
of the tables that drivers use are not automatically created. That said,
one should probably run neutron-db-manage manually to create the tables
and not rely on neutron to do this. This regression was cause in 326b85.

Change-Id: I2c578733de0213945b31fba86a3b0ea45c02295a
Closes-bug: #1285993
Co-Authored-By: Itsuro Oda <oda@valinux.co.jp>
This commit is contained in:
Aaron Rosen 2014-02-27 22:26:30 -08:00
parent fc9f170877
commit 71deb11f6f
1 changed files with 1 additions and 1 deletions

View File

@ -99,10 +99,10 @@ class Ml2Plugin(db_base_plugin_v2.NeutronDbPluginV2,
return self._aliases
def __init__(self):
super(Ml2Plugin, self).__init__()
# First load drivers, then initialize DB, then initialize drivers
self.type_manager = managers.TypeManager()
self.mechanism_manager = managers.MechanismManager()
super(Ml2Plugin, self).__init__()
self.type_manager.initialize()
self.mechanism_manager.initialize()
# bulk support depends on the underlying drivers