Exemplo n.º 1
0
def display_stacks(result):
    data, header = table_data(result, Stack)
    header = [''] + list(header)
    data = [[i] + list(row) for i, row in enumerate(data, start=1)]

    print_table(data, header, title='Stacks')
    display_stack_services(result)
Exemplo n.º 2
0
def display_stacks(result):
    data, header = table_data(result, Stack)
    header = [''] + list(header)
    data = [[i] + list(row) for i, row in enumerate(data, start=1)]

    print_table(data, header, title='Stacks')
    display_stack_services(result)
Exemplo n.º 3
0
def print_unformatted_table(args, result):
    result_list = [result] if isinstance(result, figgis.Config) else result
    response_class = result_list[0].__class__

    data, long_header = table_data(result_list, response_class)
    header = [item.replace(" ", "_").lower() for item in long_header]

    delim = six.text_type(args.delimiter)

    six.print_(delim.join(header), file=sys.stdout if args.show_header else sys.stderr)

    for row in data:
        six.print_(delim.join(six.text_type(item).replace(",", " ") for item in row))
Exemplo n.º 4
0
def print_unformatted_table(args, result):
    result_list = [result] if isinstance(result, figgis.Config) else result
    response_class = result_list[0].__class__

    data, long_header = table_data(result_list, response_class)
    header = [item.replace(' ', '_').lower() for item in long_header]

    delim = six.text_type(args.delimiter)

    six.print_(delim.join(header),
               file=sys.stdout if args.show_header else sys.stderr)

    for row in data:
        six.print_(
            delim.join(six.text_type(item).replace(',', ' ') for item in row))