]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
orch: refactor boolean handling in drive group spec
authorGuillaume Abrioux <gabrioux@ibm.com>
Thu, 12 Sep 2024 06:09:21 +0000 (06:09 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Wed, 18 Sep 2024 16:59:16 +0000 (16:59 +0000)
commitbf2ada4f2bb7776b961e522026e52dd363e467b0
treea0bfeb0fba3373c35b30eb3bb3a2f4f78f54f408
parent2f599a46ad10e37c929e5c43da2f6907ddcd1961
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