@utils.arg('--host', metavar='<hostname>', default=None, help=_('Name of host.'))
@utils.arg('--binary', metavar='<binary>', default=None, help=_('Service binary.'))
def do_service_list(cs, args):
 result = cs.services.list(host=args.host, binary=args.binary)
 columns = ['Binary', 'Host', 'Zone', 'Status', 'State', 'Updated_at']
 if (result and hasattr(result[0], 'disabled_reason')):
  columns.append('Disabled Reason')
 if (result and hasattr(result[0], 'id')):
  columns.insert(0, 'Id')
 utils.print_list(result, columns)

@ utils . arg ( '--host' , metavar = '<hostname>' , default = None , help = _ ( 'Name of host.' ) ) @ utils . arg ( '--binary' , metavar = '<binary>' , default = None , help = _ ( 'Service binary.' ) ) def do_service_list ( cs , args ) : result = cs . services . list ( host = args . host , binary = args . binary ) columns = [ 'Binary' , 'Host' , 'Zone' , 'Status' , 'State' , 'Updated_at' ] if ( result and hasattr ( result [ 0 ] , 'disabled_reason' ) ) : columns . append ( 'Disabled Reason' ) if ( result and hasattr ( result [ 0 ] , 'id' ) ) : columns . insert ( 0 , 'Id' ) utils . print_list ( result , columns )
show a list of all running services .