From: John Mulligan Date: Wed, 2 Jul 2025 22:06:30 +0000 (-0400) Subject: mgr/smb: add a new generalized enum for source references X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e5ac89972834a7770c6f3d105736a4b60bd2b472;p=ceph.git mgr/smb: add a new generalized enum for source references The join auth and users and groups sources typically specify a source as a reference to a (local) resource. Right now this is really the only supported value. Since they're all basically the same add a new generic SourceReferenceType enum for future source resource components. Note that python doesn't allow subclassing enums that have values assigned. This is the reason for the copy paste here. Signed-off-by: John Mulligan --- diff --git a/src/pybind/mgr/smb/enums.py b/src/pybind/mgr/smb/enums.py index 2e57dac9a26..8921686942b 100644 --- a/src/pybind/mgr/smb/enums.py +++ b/src/pybind/mgr/smb/enums.py @@ -59,10 +59,16 @@ class AuthMode(_StrEnum): ACTIVE_DIRECTORY = 'active-directory' +class SourceReferenceType(_StrEnum): + RESOURCE = 'resource' + + +# NOTE: Use SourceReferenceType for new source objects class JoinSourceType(_StrEnum): RESOURCE = 'resource' +# NOTE: Use SourceReferenceType for new source objects class UserGroupSourceType(_StrEnum): RESOURCE = 'resource' EMPTY = 'empty'