]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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)
committerSebastian Wagner <sewagner@redhat.com>
Tue, 11 Jan 2022 12:23:03 +0000 (13:23 +0100)
commit8b4681e2d1300047d65470f5e314b6e041419b57
tree39e939ca9c4022abdd2f20c46446bcfb70f80a54
parentcf160fbc18e0d729f62ba41a58c0b34b912ece02
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>
(cherry picked from commit 6169eb7f8e2462eb58338d6fc312b1347858b47f)
src/pybind/mgr/cephadm/tests/test_scheduling.py
src/python-common/ceph/deployment/service_spec.py