From e8589b2d3079068f1d1473580fe0d196bf20ea3e Mon Sep 17 00:00:00 2001 From: Matthew Oliver Date: Mon, 30 Jan 2017 11:02:00 +1100 Subject: [PATCH] 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 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 --- swift/cli/ringbuilder.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/swift/cli/ringbuilder.py b/swift/cli/ringbuilder.py index 5e812b9a39..aab22accea 100644 --- a/swift/cli/ringbuilder.py +++ b/swift/cli/ringbuilder.py @@ -672,8 +672,8 @@ swift-ring-builder add @staticmethod def set_weight(): """ -swift-ring-builder set_weight - [ set_weight + [ ] ... [--yes] or @@ -681,11 +681,12 @@ or swift-ring-builder set_weight --region --zone --ip --port --replication-ip --replication-port - --device --meta --weight + --device --meta --weight [--yes] Where , and are replication ip, hostname - and port. + and port. and 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