]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Update default base database to be V2
authorGary Kotton <gkotton@redhat.com>
Fri, 19 Oct 2012 04:16:23 +0000 (04:16 +0000)
committerGary Kotton <gkotton@redhat.com>
Fri, 19 Oct 2012 04:45:32 +0000 (04:45 +0000)
Fixes bug 1070353

Change-Id: Ie9271dd1ef2597ba74a0fea51ecf151ae2e8f7dd

quantum/db/api.py
quantum/db/model_base.py
quantum/tests/unit/test_db_plugin.py

index e10c7d4b4a274c70d50ca8d53853f665595fb45f..d2bc0bd2173545176791a5d1ca0d3f5b036fd1a0 100644 (file)
@@ -32,7 +32,7 @@ LOG = logging.getLogger(__name__)
 
 _ENGINE = None
 _MAKER = None
-BASE = model_base.BASE
+BASE = model_base.BASEV2
 
 
 class MySQLPingListener(object):
index a04863a362f06fc9009bdd5480a55b6ed3e96b1c..e3ffa682c7f42b1d14096c1961bdf2fd85a8d16f 100644 (file)
@@ -60,5 +60,4 @@ class QuantumBaseV2(QuantumBase):
         return cls.__name__.lower() + 's'
 
 
-BASE = declarative.declarative_base(cls=QuantumBase)
 BASEV2 = declarative.declarative_base(cls=QuantumBaseV2)
index 8c9377387eb3252788c7c9f8216fd81c0600887d..f63c4a90112d23a384f47aa88fbd5b03d3e86198 100644 (file)
@@ -114,6 +114,7 @@ class QuantumDbPluginV2TestCase(unittest2.TestCase):
         super(QuantumDbPluginV2TestCase, self).tearDown()
         # NOTE(jkoelker) for a 'pluggable' framework, Quantum sure
         #                doesn't like when the plugin changes ;)
+        db.clear_db()
         db._ENGINE = None
         db._MAKER = None
         cfg.CONF.reset()