]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
python-common: make count & count-per-host >= 1 checks consistent
authorJohn Mulligan <jmulligan@redhat.com>
Fri, 10 Dec 2021 13:16:19 +0000 (08:16 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Fri, 10 Dec 2021 17:18:49 +0000 (12:18 -0500)
commit6169eb7f8e2462eb58338d6fc312b1347858b47f
tree6447ff5c516a3757e950ee5d35c22ffba6c28dd7
parent068d37d95762bce4d11668a838c6e85f6098723a
python-common: make count & count-per-host >= 1 checks consistent

The previous version of the validate function had a incorrect error
statement that suggested the count must be >1  when it should have
been >=1. This confusion was possibly due to using "n < 1" on
one line and "n <= 0" on another line. Since both values are supposed
to be integers this change corrects the error message and makes
the comparisons on the lines both use "n < 1" (since I find it easier
to see that the check "n < 1" is the inverse of the error text
asserting "n >= 1").

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/cephadm/tests/test_scheduling.py
src/python-common/ceph/deployment/service_spec.py