From 617d75bada2a15af16dd9afe6e50d5eede722227 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Tue, 19 Feb 2019 18:30:52 +0800 Subject: [PATCH] mgr/balancer: add min/max fields for begin[end]_weekday Signed-off-by: xie xingguo --- src/pybind/mgr/balancer/module.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/balancer/module.py b/src/pybind/mgr/balancer/module.py index 97294f09ead10..638a4337f522f 100644 --- a/src/pybind/mgr/balancer/module.py +++ b/src/pybind/mgr/balancer/module.py @@ -225,6 +225,8 @@ class Module(MgrModule): 'name': 'begin_weekday', 'type': 'uint', 'default': 0, + 'min': 0, + 'max': 7, 'desc': 'Restrict automatic balancing to this day of the week or later', 'long_desc': '0 or 7 = Sunday, 1 = Monday, etc.', 'runtime': True, @@ -233,6 +235,8 @@ class Module(MgrModule): 'name': 'end_weekday', 'type': 'uint', 'default': 7, + 'min': 0, + 'max': 7, 'desc': 'Restrict automatic balancing to days of the week earlier than this', 'long_desc': '0 or 7 = Sunday, 1 = Monday, etc.', 'runtime': True, @@ -241,8 +245,8 @@ class Module(MgrModule): 'name': 'crush_compat_max_iterations', 'type': 'uint', 'default': 25, - 'min': '1', - 'max': '250', + 'min': 1, + 'max': 250, 'desc': 'maximum number of iterations to attempt optimization', 'runtime': True, }, @@ -258,8 +262,8 @@ class Module(MgrModule): 'name': 'crush_compat_step', 'type': 'float', 'default': .5, - 'min': '.001', - 'max': '.999', + 'min': .001, + 'max': .999, 'desc': 'aggressiveness of optimization', 'long_desc': '.99 is very aggressive, .01 is less aggressive', 'runtime': True, -- 2.39.5