2022-10-19 09:05:21 +00:00
|
|
|
from django.db.models import TextChoices
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
|
|
|
|
|
|
|
class SecretType(TextChoices):
|
2022-11-08 09:54:51 +00:00
|
|
|
PASSWORD = 'password', _('Password')
|
|
|
|
SSH_KEY = 'ssh_key', _('SSH key')
|
|
|
|
ACCESS_KEY = 'access_key', _('Access key')
|
|
|
|
TOKEN = 'token', _('Token')
|
2022-12-27 09:45:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
class AliasAccount(TextChoices):
|
|
|
|
ALL = '@ALL', _('All')
|
|
|
|
INPUT = '@INPUT', _('Manual input')
|
|
|
|
USER = '@USER', _('Dynamic user')
|
|
|
|
|
|
|
|
|
|
|
|
class Source(TextChoices):
|
|
|
|
LOCAL = 'local', _('Local')
|
|
|
|
COLLECTED = 'collected', _('Collected')
|
2023-04-12 09:59:13 +00:00
|
|
|
TEMPLATE = 'template', _('Template')
|
2023-03-22 03:09:48 +00:00
|
|
|
|
|
|
|
|
2023-04-03 10:18:31 +00:00
|
|
|
class AccountInvalidPolicy(TextChoices):
|
2023-03-22 03:09:48 +00:00
|
|
|
SKIP = 'skip', _('Skip')
|
|
|
|
UPDATE = 'update', _('Update')
|
|
|
|
ERROR = 'error', _('Failed')
|