From d140ff2811819d647b11f6cd376610b4f9f69e8c Mon Sep 17 00:00:00 2001 From: Michael Yu Date: Tue, 18 Feb 2014 12:22:30 -0800 Subject: [PATCH] Adding datastore_version column to instances list table Change-Id: Ieef6b41d97c71ffd4099c199c1221f23628012db Closes-Bug: #1279952 --- troveclient/v1/shell.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/troveclient/v1/shell.py b/troveclient/v1/shell.py index 6e39edc0..7d877acf 100644 --- a/troveclient/v1/shell.py +++ b/troveclient/v1/shell.py @@ -106,8 +106,12 @@ def do_list(cs, args): if hasattr(instance, 'volume'): setattr(instance, 'size', instance.volume['size']) if hasattr(instance, 'datastore'): + if instance.datastore.get('version'): + setattr(instance, 'datastore_version', + instance.datastore['version']) setattr(instance, 'datastore', instance.datastore['type']) - utils.print_list(instances, ['id', 'name', 'datastore', 'status', + utils.print_list(instances, ['id', 'name', 'datastore', + 'datastore_version', 'status', 'flavor_id', 'size'])