]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/mgr_module: cast string to enum when collecting kwargs
authorKefu Chai <kchai@redhat.com>
Sun, 27 Dec 2020 14:42:33 +0000 (22:42 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 15 Jan 2021 01:50:53 +0000 (09:50 +0800)
commit4902d7c5452181c96b1f3382235416181d80757a
treea50be18fdcb97b8173d8bb9efcd300a1863ac57f
parentb4c3801e9d6d4a97a85637a0b18fd782ae0ba9ed
pybind/mgr/mgr_module: cast string to enum when collecting kwargs

as the parameters of handlers are properly typed, they are expecting
enum parameter, let's cast string parameter to enum if the callee claims
that it wants an enum.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/ceph_argparse.py
src/pybind/mgr/mgr_module.py