Merge "Add more details to service-list command"

This commit is contained in:
Jenkins 2016-11-02 05:44:39 +00:00 committed by Gerrit Code Review
commit ddfa347b98

View File

@ -20,6 +20,7 @@ from zunclient.common import utils as zun_utils
def do_service_list(cs, args):
"""Print a list of zun services."""
services = cs.services.list()
columns = ('id', 'host', 'binary', 'state')
columns = ('Id', 'Host', 'Binary', 'State', 'Disabled',
'Disabled Reason', 'Created At', 'Updated At')
utils.print_list(services, columns,
{'versions': zun_utils.print_list_field('versions')})