summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2014-10-05 10:48:27 +0200
committerGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2014-10-05 10:48:27 +0200
commit0352d8196b074ad0e53cf4cee323d32a6b96b1d0 (patch)
tree6028964391794cfe256e0d4223dac268f0e08244
parentc8dd864988012fd2fb527ba352ecb61011293a91 (diff)
downloadopenstack-ansible-modules-0352d8196b074ad0e53cf4cee323d32a6b96b1d0.tar.gz
Add support for icehouse in cinder_manage
-rw-r--r--cinder_manage15
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.