mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
788 B
32 lines
788 B
from django.db import models
|
|
|
|
from common.db.models import ChoicesMixin
|
|
|
|
|
|
from .category import ConstrainMixin
|
|
|
|
|
|
class CloudTypes(ConstrainMixin, ChoicesMixin, models.TextChoices):
|
|
K8S = 'k8s', 'Kubernetes'
|
|
|
|
def category_constrains(self):
|
|
return {
|
|
'domain_enabled': False,
|
|
'su_enabled': False,
|
|
'ping_enabled': False,
|
|
'gather_facts_enabled': False,
|
|
'verify_account_enabled': False,
|
|
'change_password_enabled': False,
|
|
'create_account_enabled': False,
|
|
'gather_accounts_enabled': False,
|
|
'_protocols': []
|
|
}
|
|
|
|
@classmethod
|
|
def platform_constraints(cls):
|
|
return {
|
|
cls.K8S: {
|
|
'_protocols': ['k8s']
|
|
}
|
|
}
|