'swift-ring-builder <builder_file> set_replicas <replicas>
Changes the replica count to the given <replicas>. <replicas> may
be a floating-point value, in which case some partitions will have
floor(<replicas>) replicas and some will have ceiling(<replicas>)
in the correct proportions.
A rebalance is needed to make the change take effect.'

@staticmethod
def set_replicas():

    if (len(argv) < 4):
        print(Commands.set_replicas.__doc__.strip())
        exit(EXIT_ERROR)
    new_replicas = argv[3]
    try:
        new_replicas = float(new_replicas)
    except ValueError:
        print(Commands.set_replicas.__doc__.strip())
        print(('"%s"    is    not    a    valid    number.' % new_replicas))
        exit(EXIT_ERROR)
    if (new_replicas < 1):
        print('Replica    count    must    be    at    least    1.')
        exit(EXIT_ERROR)
    builder.set_replicas(new_replicas)
    print(('The    replica    count    is    now    %.6f.' % builder.replicas))
    print('The    change    will    take    effect    after    the    next    rebalance.')
    builder.save(builder_file)
    exit(EXIT_SUCCESS)
