]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
orch: refactor boolean handling in drive group spec 59752/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Thu, 12 Sep 2024 06:09:21 +0000 (06:09 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Fri, 13 Sep 2024 12:40:20 +0000 (14:40 +0200)
commite3d8a37ef6e31eaf69671cec6ee5b1ed11ca267d
tree7ced3838649d2ceb6f76f5bf9eeffa4e8831ebcb
parenta2782315255a3e7d5f6cdc9eb35785187ff6ddf8
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>
src/pybind/mgr/orchestrator/module.py