]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/smb: reorganize internal.py to use fewer if-isinstance blocks
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 1 Jul 2025 15:28:02 +0000 (11:28 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 2 Jul 2025 17:00:16 +0000 (13:00 -0400)
commitc81a666fe071afb1ea8cc6adba20d09eb38cc9d6
tree222d020b0213da850968d3b0705593618ffa6f2f
parentd5fb7f8c2ba84ac9ecfc38365027f2c3a6531130
mgr/smb: reorganize internal.py to use fewer if-isinstance blocks

While working on adding a new top-level resource type I realized that
this code can be a bit error prone and un-DRY. Use a single method for
mapping between resource classes and resource entry classes and refactor
the rest of the module around that idea.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/smb/internal.py