]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
orch: refactor boolean handling in drive group spec 61914/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Thu, 12 Sep 2024 06:09:21 +0000 (06:09 +0000)
committerAdam King <adking@redhat.com>
Wed, 19 Feb 2025 20:31:44 +0000 (15:31 -0500)
commit073343bc0f0ec7203a78751da11a492560612fe9
treef54ae4e7f263c7bbea43f6f80cdba452bc69fffa
parenta33d4403d61d1920174396cfeed5d4a47b73657c
orch: refactor boolean handling in drive group spec

The intent of 42721c03ee6f was to address an issue where boolean
parameters weren't handled correctly.

I noticed that a parameter (`tpm2`) was missed, which made me realize
that maintaining a list of these boolean parameters is necessary.

To simplify things, we should only accept `"true"` or `"false"` (in any case),
allowing us to avoid the need to maintain a list of boolean parameters.

This change introduces a `list_drive_group_spec_bool_arg` to store boolean
arguments related to drive group specifications, simplifying the validation
process for boolean values by directly checking if the values are 'true' or 'false'.

Fixes: https://tracker.ceph.com/issues/68045
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit e3d8a37ef6e31eaf69671cec6ee5b1ed11ca267d)
src/pybind/mgr/orchestrator/module.py