Merge "Add service-list show id column"

This commit is contained in:
Jenkins 2014-04-01 17:49:54 +00:00 committed by Gerrit Code Review
commit b5f800fd54
2 changed files with 12 additions and 0 deletions
novaclient

@ -2846,6 +2846,12 @@ def do_service_list(cs, args):
# so as not to add the column when the extended ext is not enabled.
if result and hasattr(result[0], 'disabled_reason'):
columns.append("Disabled Reason")
# NOTE(gtt): After https://review.openstack.org/#/c/39998/ nova will
# show id in response.
if result and hasattr(result[0], 'id'):
columns.insert(0, "Id")
utils.print_list(result, columns)

@ -2357,6 +2357,12 @@ def do_service_list(cs, args):
# so as not to add the column when the extended ext is not enabled.
if hasattr(result[0], 'disabled_reason'):
columns.append("Disabled Reason")
# NOTE(gtt): After https://review.openstack.org/#/c/39998/ nova will
# show id in response.
if result and hasattr(result[0], 'id'):
columns.insert(0, "Id")
utils.print_list(result, columns)