diff --git a/novaclient/v1_1/shell.py b/novaclient/v1_1/shell.py index a2a50bbab..1b618094d 100644 --- a/novaclient/v1_1/shell.py +++ b/novaclient/v1_1/shell.py @@ -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) diff --git a/novaclient/v3/shell.py b/novaclient/v3/shell.py index cbf25051a..b1044cbf8 100644 --- a/novaclient/v3/shell.py +++ b/novaclient/v3/shell.py @@ -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)