'swift-ring-builder <builder_file> set_overload <overload>[%]
Changes the overload factor to the given <overload>.
A rebalance is needed to make the change take effect.'

@staticmethod
def set_overload():

    if (len(argv) < 4):
        print(Commands.set_overload.__doc__.strip())
        exit(EXIT_ERROR)
    new_overload = argv[3]
    if new_overload.endswith('%'):
        percent = True
        new_overload = new_overload.rstrip('%')
    else:
        percent = False
    try:
        new_overload = float(new_overload)
    except ValueError:
        print(Commands.set_overload.__doc__.strip())
        print(('%r    is    not    a    valid    number.' % new_overload))
        exit(EXIT_ERROR)
    if percent:
        new_overload *= 0.01
    if (new_overload < 0):
        print('Overload    must    be    non-negative.')
        exit(EXIT_ERROR)
    if ((new_overload > 1) and (not percent)):
        print('!?!    Warning    overload    is    greater    than    100%    !?!')
        status = EXIT_WARNING
    else:
        status = EXIT_SUCCESS
    builder.set_overload(new_overload)
    print(('The    overload    factor    is    now    %0.2f%%    (%.6f)' % ((builder.overload * 100), builder.overload)))
    print('The    change    will    take    effect    after    the    next    rebalance.')
    builder.save(builder_file)
    exit(status)
