]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/cephadm: rework how _process_ls_output builds a DaemonDescription
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 29 May 2023 20:52:31 +0000 (16:52 -0400)
committerAdam King <adking@redhat.com>
Thu, 31 Aug 2023 17:35:15 +0000 (13:35 -0400)
commita7b67aacb92202134f1ad40f817d0364bfad26bc
tree2e5ed87607d4a3beee781e5448f2439bdfb5203d
parentbd5925a9b47c780a4672e6abe5341e415b1c70d5
mgr/cephadm: rework how _process_ls_output builds a DaemonDescription

Previously, the _process_ls_output function would create an
DaemonDescription and then assign values to attributes one-by-one.  This
prevents the class from doing any data type/value conversions unless we
resort to more complex approaches like descriptors or `__setattr__` for
example. Update the _process_ls_output function to build a
DaemonDescription using keyword args so that we have the opportunity
later to convert data passed to it in `__init__`.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit 1fd4132c7c03602719f29230732b12c8afa04779)
src/pybind/mgr/cephadm/module.py