2022-09-19 12:11:55 +00:00
|
|
|
from .base import BaseType
|
2022-09-18 16:07:59 +00:00
|
|
|
|
|
|
|
|
2022-09-19 12:11:55 +00:00
|
|
|
class CloudTypes(BaseType):
|
|
|
|
PUBLIC = 'public', 'Public cloud'
|
|
|
|
PRIVATE = 'private', 'Private cloud'
|
2022-09-18 16:07:59 +00:00
|
|
|
K8S = 'k8s', 'Kubernetes'
|
|
|
|
|
2022-09-19 12:11:55 +00:00
|
|
|
@classmethod
|
|
|
|
def _get_base_constrains(cls) -> dict:
|
2022-09-18 16:07:59 +00:00
|
|
|
return {
|
2022-09-19 12:11:55 +00:00
|
|
|
'*': {
|
2022-09-21 11:03:06 +00:00
|
|
|
'charset_enabled': False,
|
2022-09-19 12:11:55 +00:00
|
|
|
'domain_enabled': False,
|
|
|
|
'su_enabled': False,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def _get_automation_constrains(cls) -> dict:
|
|
|
|
constrains = {
|
|
|
|
'*': {
|
2022-09-26 10:03:48 +00:00
|
|
|
'ansible_enabled': False,
|
|
|
|
'ansible_config': {},
|
2022-09-19 12:11:55 +00:00
|
|
|
'gather_facts_enabled': False,
|
|
|
|
'verify_account_enabled': False,
|
2022-10-13 09:47:29 +00:00
|
|
|
'change_secret_enabled': False,
|
2023-01-16 11:02:09 +00:00
|
|
|
'push_account_enabled': False,
|
2022-09-19 12:11:55 +00:00
|
|
|
'gather_accounts_enabled': False,
|
|
|
|
}
|
2022-09-18 16:07:59 +00:00
|
|
|
}
|
2022-09-19 12:11:55 +00:00
|
|
|
return constrains
|
2022-09-18 16:07:59 +00:00
|
|
|
|
|
|
|
@classmethod
|
2022-09-19 12:11:55 +00:00
|
|
|
def _get_protocol_constrains(cls) -> dict:
|
2022-09-18 16:07:59 +00:00
|
|
|
return {
|
2022-09-19 12:11:55 +00:00
|
|
|
'*': {
|
2022-09-21 11:03:06 +00:00
|
|
|
'choices': ['http'],
|
2022-09-19 12:11:55 +00:00
|
|
|
},
|
2022-09-18 16:07:59 +00:00
|
|
|
cls.K8S: {
|
2022-09-19 12:11:55 +00:00
|
|
|
'choices': ['k8s']
|
2022-09-18 16:07:59 +00:00
|
|
|
}
|
|
|
|
}
|
2022-09-22 07:24:32 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def internal_platforms(cls):
|
|
|
|
return {
|
|
|
|
cls.PUBLIC: [],
|
|
|
|
cls.PRIVATE: [{'name': 'Vmware-vSphere'}],
|
|
|
|
cls.K8S: [{'name': 'Kubernetes'}],
|
|
|
|
}
|
2022-12-19 03:35:50 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def get_community_types(cls):
|
2022-12-22 05:50:22 +00:00
|
|
|
return [
|
|
|
|
cls.K8S, cls.PUBLIC, cls.PRIVATE
|
|
|
|
]
|