summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keystone/cli.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/keystone/cli.py b/keystone/cli.py
index 82ecc18a..ee304210 100644
--- a/keystone/cli.py
+++ b/keystone/cli.py
@@ -23,6 +23,7 @@ from oslo.config import cfg
import pbr.version
from keystone.common import openssl
+from keystone.common.sql import migration
from keystone import config
from keystone.openstack.common import importutils
from keystone.openstack.common import jsonutils
@@ -65,6 +66,16 @@ class DbSync(BaseApp):
driver.db_sync(CONF.command.version)
+class DbVersion(BaseApp):
+ """Print the current migration version of the database."""
+
+ name = 'db_version'
+
+ @staticmethod
+ def main():
+ print migration.db_version()
+
+
class BaseCertificateSetup(BaseApp):
"""Common user/group setup for PKI and SSL generation."""
@@ -190,6 +201,7 @@ class ImportNovaAuth(BaseApp):
CMDS = [
DbSync,
+ DbVersion,
ExportLegacyCatalog,
ImportLegacy,
ImportNovaAuth,