'swift-ring-builder <builder_file>
Shows information about the ring and the devices within. Output
includes a table that describes the report parameters (id, region,
port, flags, etc).
flags: possible values are \'DEL\' and \'\'
DEL - indicates that the device is marked for removal from
ring and will be removed in next rebalance.'

@staticmethod
def default():

    try:
        builder_id = builder.id
    except AttributeError:
        builder_id = '(not    assigned)'
    print(('%s,    build    version    %d,    id    %s' % (builder_file, builder.version, builder_id)))
    regions = 0
    zones = 0
    balance = 0
    dev_count = 0
    if builder.devs:
        regions = len(set((d['region'] for d in builder.devs if (d is not None))))
        zones = len(set(((d['region'], d['zone']) for d in builder.devs if (d is not None))))
        dev_count = len([dev for dev in builder.devs if (dev is not None)])
        balance = builder.get_balance()
    dispersion_trailer = ('' if (builder.dispersion is None) else (',    %.02f    dispersion' % builder.dispersion))
    print(('%d    partitions,    %.6f    replicas,    %d    regions,    %d    zones,    %d    devices,    %.02f    balance%s' % (builder.parts, builder.replicas, regions, zones, dev_count, balance, dispersion_trailer)))
    print(('The    minimum    number    of    hours    before    a    partition    can    be    reassigned    is    %s    (%s    remaining)' % (builder.min_part_hours, timedelta(seconds=builder.min_part_seconds_left))))
    print(('The    overload    factor    is    %0.2f%%    (%.6f)' % ((builder.overload * 100), builder.overload)))
    ring_dict = None
    builder_dict = builder.get_ring().to_dict()
    if (not exists(ring_file)):
        print(("Ring    file    %s    not    found,    probably    it    hasn't    been    written    yet" % ring_file))
    else:
        try:
            ring_dict = RingData.load(ring_file).to_dict()
        except Exception as exc:
            print(('Ring    file    %s    is    invalid:    %r' % (ring_file, exc)))
        else:
            if (builder_dict == ring_dict):
                print(('Ring    file    %s    is    up-to-date' % ring_file))
            else:
                print(('Ring    file    %s    is    obsolete' % ring_file))
    if builder.devs:
        balance_per_dev = builder._build_balance_per_dev()
        (header_line, print_dev_f) = _make_display_device_table(builder)
        print(header_line)
        for dev in sorted(builder._iter_devs(), key=(lambda x: (x['region'], x['zone'], x['ip'], x['device']))):
            flags = ('DEL' if (dev in builder._remove_devs) else '')
            print_dev_f(dev, balance_per_dev[dev['id']], flags)
    if (builder.next_part_power and (builder.next_part_power == (builder.part_power + 1))):
        print(('\nPreparing    increase    of    partition    power    (%d    ->    %d)' % (builder.part_power, builder.next_part_power)))
        print('Run    "swift-object-relinker    relink"    on    all    nodes    before    moving    on    to    increase_partition_power.')
    if (builder.next_part_power and (builder.part_power == builder.next_part_power)):
        print(('\nIncreased    partition    power    (%d    ->    %d)' % (builder.part_power, builder.next_part_power)))
        if (builder_dict != ring_dict):
            print('First    run    "swift-ring-builder    <builderfile>    write_ring"    now    and    copy    the    updated    .ring.gz    file    to    all    nodes.')
        print('Run    "swift-object-relinker    cleanup"    on    all    nodes    before    moving    on    to    finish_increase_partition_power.')
    exit(EXIT_SUCCESS)
