Implements database upgrade as storage engine independent

Currently, calling ceilometer-dbsync will be default raises an error since
it tries to upgrade a SQL database, even if mongo (the default) is used.
This patch fixes that by adding an upgrade capability to the storage engine
connection base class, and implementing it only in SQL.

Change-Id: I9a0da235ef3a93aaefd1b122d59f244ea293e9fe
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou
2012-12-10 14:07:53 +01:00
parent ad5ff3e4e5
commit c6a093511c
8 changed files with 23 additions and 39 deletions

View File

@@ -204,6 +204,9 @@ class Connection(base.Connection):
], name='meter_idx')
return
def upgrade(self, version=None):
pass
def _get_connection(self, opts):
"""Return a connection to the database.