From 65e2bbc31a7e4ea5d8f9456c2ea5b54715305d11 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Sun, 3 Oct 2010 12:41:07 +0100 Subject: Bug #654023: nova-manage vpn commands broken, resulting in erroneous "Wrong number of arguments supplied" message Add a context of None to the call to db.instance_get_all. This is deprecated, but it's what all the other calls in this file do, and it's better than exploding, so it will do for now. --- bin/nova-manage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/nova-manage b/bin/nova-manage index bf3c67612..0b5869dfd 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -114,7 +114,7 @@ class VpnCommands(object): def _vpn_for(self, project_id): """Get the VPN instance for a project ID.""" - for instance in db.instance_get_all(): + for instance in db.instance_get_all(None): if (instance['image_id'] == FLAGS.vpn_image_id and not instance['state_description'] in ['shutting_down', 'shutdown'] -- cgit From a0498717e470eb6fd52a4f26101c3513d90a3974 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Sun, 3 Oct 2010 13:17:20 +0100 Subject: Bug #654034: nova-manage doesn't honour --verbose flag Honour the --verbose flag by setting the logging level to DEBUG. --- bin/nova-manage | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bin') diff --git a/bin/nova-manage b/bin/nova-manage index bf3c67612..ce87b9437 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -52,6 +52,7 @@ CLI interface for nova management. """ +import logging import os import sys import time @@ -417,6 +418,10 @@ def main(): """Parse options and call the appropriate class/method.""" utils.default_flagfile('/etc/nova/nova-manage.conf') argv = FLAGS(sys.argv) + + if FLAGS.verbose: + logging.getLogger().setLevel(logging.DEBUG) + script_name = argv.pop(0) if len(argv) < 1: print script_name + " category action []" -- cgit