Correct ringbuilder's set_weight usage string

The large version of the set_weight usage is missing the
new weight value. This has lead to confusion on the mailing
list.

This patch adds a <new_weight> option to not only add the
missing argument but also to make the command more clear
by differentiate between the search weight (--weight) and
how to set the new.

Change-Id: I7a4c5a6a4438f647fa33d65e22d1863c27d345be
Closes-Bug: #1660214
This commit is contained in:
Matthew Oliver 2017-01-30 11:02:00 +11:00
parent b5530f4620
commit e8589b2d30

View File

@ -672,8 +672,8 @@ swift-ring-builder <builder_file> add
@staticmethod
def set_weight():
"""
swift-ring-builder <builder_file> set_weight <search-value> <weight>
[<search-value> <weight] ...
swift-ring-builder <builder_file> set_weight <search-value> <new_weight>
[<search-value> <new_weight>] ...
[--yes]
or
@ -681,11 +681,12 @@ 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>
--device <device_name> --meta <meta> --weight <weight> <new_weight>
[--yes]
Where <r_ip>, <r_hostname> and <r_port> are replication ip, hostname
and port.
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