From 737dcf2ef643c99cde3307d83db2372cf213bb5a Mon Sep 17 00:00:00 2001 From: amcrn Date: Mon, 28 Oct 2013 11:24:13 -0700 Subject: [PATCH] IP Address Showing as JSON in Show Command changes the 'ip' value returned in trove-show from a json array to a string of comma separated values before: +----------+--------------------------------------+ | Property | Value | +----------+--------------------------------------+ | created | 2013-10-23T06:49:55 | | flavor | 9 | | id | 95f6bc02-0d84-46e1-83e6-db7f3f064677 | | ip | [u'10.0.0.2'] | | name | TestTest | | status | ACTIVE | | updated | 2013-10-23T06:49:58 | | volume | 5 | +----------+--------------------------------------+ after: +----------+--------------------------------------+ | Property | Value | +----------+--------------------------------------+ | created | 2013-10-23T06:49:55 | | flavor | 9 | | id | 95f6bc02-0d84-46e1-83e6-db7f3f064677 | | ip | 10.0.0.2 | | name | TestTest | | status | ACTIVE | | updated | 2013-10-23T06:49:58 | | volume | 5 | +----------+--------------------------------------+ Change-Id: I56f2a6dea90dcfa790abb8592f565372ad616a1b Closes-Bug: 1245608 --- troveclient/v1/shell.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/troveclient/v1/shell.py b/troveclient/v1/shell.py index 48569343..c41609f5 100644 --- a/troveclient/v1/shell.py +++ b/troveclient/v1/shell.py @@ -117,7 +117,8 @@ def do_show(cs, args): instance._info['flavor'] = instance.flavor['id'] if hasattr(instance, 'volume'): instance._info['volume'] = instance.volume['size'] - + if hasattr(instance, 'ip'): + instance._info['ip'] = ', '.join(instance.ip) _print_instance(instance)