2017-12-12 04:19:45 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
|
|
|
|
2021-01-12 10:06:42 +00:00
|
|
|
from django.db.models import TextChoices
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
2019-12-05 07:09:25 +00:00
|
|
|
|
|
|
|
|
2022-11-04 03:40:16 +00:00
|
|
|
class ReplayStorageType(TextChoices):
|
2021-01-12 10:06:42 +00:00
|
|
|
null = 'null', 'Null',
|
|
|
|
server = 'server', 'Server'
|
|
|
|
s3 = 's3', 'S3'
|
|
|
|
ceph = 'ceph', 'Ceph'
|
|
|
|
swift = 'swift', 'Swift'
|
|
|
|
oss = 'oss', 'OSS'
|
|
|
|
azure = 'azure', 'Azure'
|
2021-04-12 11:37:04 +00:00
|
|
|
obs = 'obs', 'OBS'
|
2022-02-28 11:28:58 +00:00
|
|
|
cos = 'cos', 'COS'
|
2019-12-05 07:09:25 +00:00
|
|
|
|
|
|
|
|
2022-11-04 03:40:16 +00:00
|
|
|
class CommandStorageType(TextChoices):
|
2021-01-12 10:06:42 +00:00
|
|
|
null = 'null', 'Null',
|
|
|
|
server = 'server', 'Server'
|
|
|
|
es = 'es', 'Elasticsearch'
|
2020-12-10 12:50:22 +00:00
|
|
|
|
|
|
|
|
2021-01-12 10:06:42 +00:00
|
|
|
# Component Status Choices
|
|
|
|
# ------------------------
|
2020-12-10 12:50:22 +00:00
|
|
|
|
2022-11-04 03:40:16 +00:00
|
|
|
class ComponentLoad(TextChoices):
|
2020-12-10 12:50:22 +00:00
|
|
|
critical = 'critical', _('Critical')
|
|
|
|
high = 'high', _('High')
|
|
|
|
normal = 'normal', _('Normal')
|
2021-03-26 11:09:34 +00:00
|
|
|
offline = 'offline', _('Offline')
|
2020-12-10 12:50:22 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def status(cls):
|
|
|
|
return set(dict(cls.choices).keys())
|
|
|
|
|
|
|
|
|
2022-11-17 12:48:50 +00:00
|
|
|
class TerminalType(TextChoices):
|
|
|
|
koko = 'koko', 'KoKo'
|
|
|
|
guacamole = 'guacamole', 'Guacamole'
|
|
|
|
omnidb = 'omnidb', 'OmniDB'
|
|
|
|
xrdp = 'xrdp', 'Xrdp'
|
|
|
|
lion = 'lion', 'Lion'
|
|
|
|
core = 'core', 'Core'
|
|
|
|
celery = 'celery', 'Celery'
|
|
|
|
magnus = 'magnus', 'Magnus'
|
|
|
|
razor = 'razor', 'Razor'
|
|
|
|
tinker = 'tinker', 'Tinker'
|
2022-11-16 13:05:15 +00:00
|
|
|
|
|
|
|
@classmethod
|
2022-11-17 12:48:50 +00:00
|
|
|
def types(cls):
|
|
|
|
return set(dict(cls.choices).keys())
|