'swift-ring-builder <builder_file> set_weight <search-value> <new_weight>
[<search-value> <new_weight>] ...
[--yes]
or
swift-ring-builder <builder_file> set_weight
--region <region> --zone <zone> --ip <ip or hostname> --port <port>
--replication-ip <r_ip or r_hostname> --replication-port <r_port>
--device <device_name> --meta <meta> --weight <weight> <new_weight>
[--yes]
Where <r_ip>, <r_hostname> and <r_port> are replication ip, hostname
and port. <weight> and <new_weight> are the search weight and new
weight values respectively.
Any of the options are optional in both cases.
Resets the devices\' weights. No partitions will be reassigned to or from
the device until after running \'rebalance\'. This is so you can make
multiple device changes and rebalance them all just once.
Option --yes assume a yes response to all questions.'

@staticmethod
def set_weight():

    if (len(argv) < 5):
        print(Commands.set_weight.__doc__.strip())
        print()
        print(parse_search_value.__doc__.strip())
        exit(EXIT_ERROR)
    _parse_set_weight_values(argv[3:])
    builder.save(builder_file)
    exit(EXIT_SUCCESS)
