summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorThierry Carrez <thierry@openstack.org>2011-06-29 17:21:32 +0000
committerTarmac <>2011-06-29 17:21:32 +0000
commitfd7bd882049cc971300d22b2c7ad6d97db2e4cc0 (patch)
tree1f6efd11663e63051d99d738ae4bdf872ee783fc /bin
parent5caef3c92798436230e80fa5796efc7f2f00d168 (diff)
parent698bb2e090988723e58f67b92bb38a9f7f2e49e1 (diff)
downloadnova-fd7bd882049cc971300d22b2c7ad6d97db2e4cc0.tar.gz
nova-fd7bd882049cc971300d22b2c7ad6d97db2e4cc0.tar.xz
nova-fd7bd882049cc971300d22b2c7ad6d97db2e4cc0.zip
"nova-manage vm list" was still referencing the old "image_id" column, which was renamed to "image_ref" at revision 1144.
Additionally, the command was printing out an raw object reference instead of an instance type name, and columns were misaligned. While I was at it, I also fixed a pylint-reported potential "undefined name" error due to use of an uninitialized "e" in an exception block.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nova-manage10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/nova-manage b/bin/nova-manage
index 02f20347d..51e0c32c9 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -617,7 +617,7 @@ class VmCommands(object):
:param host: show all instance on specified host.
:param instance: show specificed instance.
"""
- print "%-10s %-15s %-10s %-10s %-19s %-12s %-12s %-12s" \
+ print "%-10s %-15s %-10s %-10s %-26s %-9s %-9s %-9s" \
" %-10s %-10s %-10s %-5s" % (
_('instance'),
_('node'),
@@ -639,14 +639,14 @@ class VmCommands(object):
context.get_admin_context(), host)
for instance in instances:
- print "%-10s %-15s %-10s %-10s %-19s %-12s %-12s %-12s" \
+ print "%-10s %-15s %-10s %-10s %-26s %-9s %-9s %-9s" \
" %-10s %-10s %-10s %-5d" % (
instance['hostname'],
instance['host'],
- instance['instance_type'],
+ instance['instance_type'].name,
instance['state_description'],
instance['launched_at'],
- instance['image_id'],
+ instance['image_ref'],
instance['kernel_id'],
instance['ramdisk_id'],
instance['project_id'],
@@ -878,7 +878,7 @@ class InstanceTypeCommands(object):
try:
instance_types.create(name, memory, vcpus, local_gb,
flavorid, swap, rxtx_quota, rxtx_cap)
- except exception.InvalidInput:
+ except exception.InvalidInput, e:
print "Must supply valid parameters to create instance_type"
print e
sys.exit(1)