From c01e7822f9de3b17b8cca8d0b10cbf03e6890f8f Mon Sep 17 00:00:00 2001 From: Mike Perez <thingee@gmail.com> Date: Sun, 18 Nov 2012 19:55:49 -0800 Subject: [PATCH] Adding bootable column to volume list view displays whether a volume is bootable based on cinder's api response for /volumes Change-Id: I8f6cc6e02be8226914f65717dcb2e0367553e51f --- cinderclient/v1/shell.py | 2 +- tests/v1/fakes.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cinderclient/v1/shell.py b/cinderclient/v1/shell.py index 4ee3ca42d..3b85c409a 100644 --- a/cinderclient/v1/shell.py +++ b/cinderclient/v1/shell.py @@ -148,7 +148,7 @@ def do_list(cs, args): servers = [s.get('server_id') for s in vol.attachments] setattr(vol, 'attached_to', ','.join(map(str, servers))) utils.print_list(volumes, ['ID', 'Status', 'Display Name', - 'Size', 'Volume Type', 'Attached to']) + 'Size', 'Volume Type', 'Bootable', 'Attached to']) @utils.arg('volume', metavar='<volume>', help='ID of the volume.') diff --git a/tests/v1/fakes.py b/tests/v1/fakes.py index 6dd2bec9f..ba192600d 100644 --- a/tests/v1/fakes.py +++ b/tests/v1/fakes.py @@ -27,6 +27,7 @@ def _stub_volume(**kwargs): 'display_name': None, 'display_description': None, "attachments": [], + "bootable": "false", "availability_zone": "cinder", "created_at": "2012-08-27T00:00:00.000000", "display_description": None,