diff options
author | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2014-10-05 10:48:27 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2014-10-05 10:48:27 +0200 |
commit | 0352d8196b074ad0e53cf4cee323d32a6b96b1d0 (patch) | |
tree | 6028964391794cfe256e0d4223dac268f0e08244 | |
parent | c8dd864988012fd2fb527ba352ecb61011293a91 (diff) | |
download | openstack-ansible-modules-0352d8196b074ad0e53cf4cee323d32a6b96b1d0.tar.gz |
Add support for icehouse in cinder_manage
-rw-r--r-- | cinder_manage | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cinder_manage b/cinder_manage index 17c42b5..75a0b45 100644 --- a/cinder_manage +++ b/cinder_manage @@ -26,19 +26,22 @@ cinder_manage: action=dbsync import subprocess +cinder_found = True try: from cinder.db.sqlalchemy import migration - from cinder import flags + try: + from cinder import flags + FLAGS = flags.FLAGS + except ImportError: + # Starting with icehouse + import cinder.common.config + FLAGS = cinder.common.config.CONF except ImportError: cinder_found = False -else: - cinder_found = True def load_config_file(conf): - flags.FLAGS(args=[], project='cinder', - default_config_files=[conf]) - + FLAGS(args=[], project='cinder', default_config_files=[conf]) def will_db_change(): """ Check if the database version will change after the sync. |