summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorEd Leafe <ed@leafe.com>2011-01-19 10:41:30 -0500
committerEd Leafe <ed@leafe.com>2011-01-19 10:41:30 -0500
commitea812e66a4d2d84af8c63281c35c4109be1f67db (patch)
tree6e34fd2cead93cd689c3d60f615a3aba30d46704 /bin
parentc4ecab260bed2118b119c7e415c2682e689fca3b (diff)
parent7d7fbf5dfd8a8e10f584df5d27d3479c4b2b4d3a (diff)
merged trunk changes
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nova-manage19
1 files changed, 18 insertions, 1 deletions
diff --git a/bin/nova-manage b/bin/nova-manage
index b5842b595..d0901ddfc 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -82,6 +82,7 @@ from nova import quota
from nova import utils
from nova.auth import manager
from nova.cloudpipe import pipelib
+from nova.db import migration
logging.basicConfig()
@@ -519,6 +520,21 @@ class LogCommands(object):
print re.sub('#012', "\n", "\n".join(lines))
+class DbCommands(object):
+ """Class for managing the database."""
+
+ def __init__(self):
+ pass
+
+ def sync(self, version=None):
+ """Sync the database up to the most recent version."""
+ return migration.db_sync(version)
+
+ def version(self):
+ """Print the current database version."""
+ print migration.db_version()
+
+
CATEGORIES = [
('user', UserCommands),
('project', ProjectCommands),
@@ -528,7 +544,8 @@ CATEGORIES = [
('floating', FloatingIpCommands),
('network', NetworkCommands),
('service', ServiceCommands),
- ('log', LogCommands)]
+ ('log', LogCommands),
+ ('db', DbCommands)]
def lazy_match(name, key_value_tuples):