summaryrefslogtreecommitdiff
path: root/keystone_manage
diff options
context:
space:
mode:
Diffstat (limited to 'keystone_manage')
-rw-r--r--keystone_manage18
1 files changed, 15 insertions, 3 deletions
diff --git a/keystone_manage b/keystone_manage
index 37161a0..780f7c9 100644
--- a/keystone_manage
+++ b/keystone_manage
@@ -36,13 +36,19 @@ except AttributeError:
pass
try:
- from keystone.common.sql import migration
+ from keystone.common import sql
from migrate.versioning import api as versioning_api
except ImportError:
keystone_found = False
else:
keystone_found = True
+try:
+ # for icehouse
+ from keystone.common.sql import migration_helpers as migration
+except ImportError:
+ pass
+
def will_db_change(conf):
""" Check if the database version will change after the sync.
@@ -51,8 +57,14 @@ def will_db_change(conf):
"""
# Load the config file options
- migration.CONF(project='keystone', default_config_files=[conf])
- current_version = migration.db_version()
+ try:
+ # before icehouse
+ sql.migration.CONF(project='keystone', default_config_files=[conf])
+ current_version = sql.migration.db_version()
+ except AttributeError:
+ # starting with icehouse
+ sql.core.CONF(project='keystone', default_config_files=[conf])
+ current_version = migration.get_db_version()
# in havana the method _find_migrate_repo has been renamed to find_migrate_repo
try: