summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/smb/enums.py
blob: 6e19c882dad469d59577b9403b3eceba899bf8ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
"""Assorted enum values used throughout the smb mgr module."""

import sys

if sys.version_info >= (3, 11):  # pragma: no cover
    from enum import StrEnum as _StrEnum
else:  # pragma: no cover
    import enum

    # work like StrEnum for older python versions for our purposes
    class _StrEnum(str, enum.Enum):
        def __str__(self) -> str:
            return self.value


class CephFSStorageProvider(_StrEnum):
    KERNEL_MOUNT = 'kcephfs'
    SAMBA_VFS = 'samba-vfs'


class SubSystem(_StrEnum):
    CEPHFS = 'cephfs'


class Intent(_StrEnum):
    PRESENT = 'present'
    REMOVED = 'removed'


class State(_StrEnum):
    CREATED = 'created'
    NOT_PRESENT = 'not present'
    PRESENT = 'present'
    REMOVED = 'removed'
    UPDATED = 'updated'


class AuthMode(_StrEnum):
    USER = 'user'
    ACTIVE_DIRECTORY = 'active-directory'


class JoinSourceType(_StrEnum):
    PASSWORD = 'password'
    HTTP_URI = 'http_uri'
    RESOURCE = 'resource'


class UserGroupSourceType(_StrEnum):
    INLINE = 'inline'
    HTTP_URI = 'http_uri'
    RESOURCE = 'resource'


class ConfigNS(_StrEnum):
    CLUSTERS = 'clusters'
    SHARES = 'shares'
    USERS_AND_GROUPS = 'users_and_groups'
    JOIN_AUTHS = 'join_auths'