]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephadm/smb: convert config object to use a dataclass 60549/head
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 29 Oct 2024 20:19:13 +0000 (16:19 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 29 Oct 2024 21:37:16 +0000 (17:37 -0400)
commit2b30c8e8958577bb756aefd10bae411138f0ccd5
tree3d915bca1abd8f75c93500131c18c1277e3e90a6
parent13f42666942db66b8916aa2b7304e0fe54b6663c
cephadm/smb: convert config object to use a dataclass

While working on the smb.py file I began to be annoyed at the Config
class and the need to repeat myself. Now that cephadm is not expected to
run on python versions older than 3.7 I think it's safe to convert
Config to use a dataclass.

While making the change to a dataclass I also chose to make it a frozen
dataclass to help eliminate any future bugs wrt mutating the config object.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadmlib/daemons/smb.py