1.0.0
This commit is contained in:
354
README.md
Normal file
354
README.md
Normal file
@@ -0,0 +1,354 @@
|
|||||||
|
# Digital Energy Python SDK
|
||||||
|
|
||||||
|
- [Описание](#описание)
|
||||||
|
- [Системные требования](#системные-требования)
|
||||||
|
- [Установка](#установка)
|
||||||
|
- [Использование](#использование)
|
||||||
|
- [Конфигурация](#конфигурация)
|
||||||
|
- [Функциональный интерфейс](#функциональный-интерфейс)
|
||||||
|
- [Вызов функции](#вызов-функции)
|
||||||
|
- [Результат выполнения функции](#результат-выполнения-функции)
|
||||||
|
- [Соответствие названий](#соответствие-названий)
|
||||||
|
- [Типы данных SDK](#типы-данных-sdk)
|
||||||
|
- [Ошибки и исключения (exceptions)](#ошибки-и-исключения-exceptions)
|
||||||
|
- [Ошибки валидации данных](#ошибки-валидации-данных)
|
||||||
|
- [Ошибки HTTP](#ошибки-http)
|
||||||
|
- [Доступная функциональность](#доступная-функциональность)
|
||||||
|
|
||||||
|
## Описание
|
||||||
|
|
||||||
|
**Digital Energy Python SDK** предоставляет удобный интерфейс для интеграции взаимодействия с API **Digital Energy** в программный код на языке Python.
|
||||||
|
|
||||||
|
## Системные требования
|
||||||
|
|
||||||
|
### Совместимость версий **Digital Energy** и версий SDK
|
||||||
|
|
||||||
|
| Digital Energy | SDK |
|
||||||
|
| --- | --- |
|
||||||
|
| 1.8.0 | 1.0.x |
|
||||||
|
|
||||||
|
### Зависимости
|
||||||
|
|
||||||
|
Зависимости указаны в конфигурационном файле проекта [pyproject.toml](/pyproject.toml):
|
||||||
|
- версия Python: раздел `[project]`, ключ `requires-python`
|
||||||
|
- библиотеки: раздел `[project]`, ключ `dependencies`
|
||||||
|
|
||||||
|
## Установка
|
||||||
|
|
||||||
|
Установка с помощью системы управления пакетами Python (pip), `version` - тег или ветка:
|
||||||
|
```sh
|
||||||
|
pip install git+https://repository.basistech.ru/BASIS/de-py-sdk@version
|
||||||
|
```
|
||||||
|
|
||||||
|
Посмотреть версию установленного пакета:
|
||||||
|
```sh
|
||||||
|
pip show digital_energy_sdk
|
||||||
|
```
|
||||||
|
|
||||||
|
## Использование
|
||||||
|
|
||||||
|
### Конфигурация
|
||||||
|
|
||||||
|
Для работы с SDK необходимо создать экземпляр класса `DigitalEnergy`, конструктор которого принимает на вход параметры конфигурации SDK.
|
||||||
|
|
||||||
|
<details><summary>Авторизация</summary>
|
||||||
|
|
||||||
|
```python
|
||||||
|
from digital_energy_sdk import DigitalEnergy
|
||||||
|
|
||||||
|
|
||||||
|
DE_URL = '...'
|
||||||
|
USERNAME = '...'
|
||||||
|
PASSWORD = '...'
|
||||||
|
|
||||||
|
token = DigitalEnergy(
|
||||||
|
url=DE_URL,
|
||||||
|
auth='',
|
||||||
|
).api.session.create(
|
||||||
|
username=USERNAME,
|
||||||
|
password=PASSWORD,
|
||||||
|
).result.token
|
||||||
|
|
||||||
|
de = DigitalEnergy(url=DE_URL, auth=token)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary>Задание декораторов для всех вызываемых функций</summary>
|
||||||
|
|
||||||
|
```python
|
||||||
|
from digital_energy_sdk import DigitalEnergy
|
||||||
|
|
||||||
|
|
||||||
|
DigitalEnergy(
|
||||||
|
...,
|
||||||
|
f_decorators=[decorator_1, decorator_2],
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Декораторы будут применяться к вызываемым функциям SDK в обратном порядке, то есть сначала будет применяться декоратор <code>decorator_2</code>, а потом <code>decorator_1</code>.
|
||||||
|
|
||||||
|
**Важно:** декораторы должны соответствовать аннотации параметра, то есть оставлять без изменений параметры и тип возвращаемого значения функции, иначе применение декораторов приведёт к некорректной работе SDK.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary>Настройка повторных попыток при 503</summary>
|
||||||
|
|
||||||
|
По умолчанию SDK при получении кода ответа 503 производит 10 повторных попыток с интервалом 5 секунд. Данное поведение можно скорректировать:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from digital_energy_sdk import DigitalEnergy
|
||||||
|
|
||||||
|
|
||||||
|
DigitalEnergy(
|
||||||
|
...,
|
||||||
|
http503_attempts = 10, # количество повторных попыток при 503
|
||||||
|
http503_attempts_interval = 5, # интервал в секундах между повторными попытками
|
||||||
|
)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary>Отключение проверки сертификата SSL</summary>
|
||||||
|
|
||||||
|
**Важно:** отключение проверки сертификата SSL даёт возможность произвести атаку типа MitM, поэтому пользоваться данной возможостью допустимо только в защищённой среде.
|
||||||
|
|
||||||
|
```python
|
||||||
|
import urllib3
|
||||||
|
|
||||||
|
from digital_energy_sdk import DigitalEnergy
|
||||||
|
|
||||||
|
urllib3.disable_warnings() # отключение вывода предупреждений безопасности SSL
|
||||||
|
|
||||||
|
DigitalEnergy(
|
||||||
|
...,
|
||||||
|
verify_ssl=False, # отключение проверки сертификата SSL
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### Функциональный интерфейс
|
||||||
|
|
||||||
|
Функциональный интерфейс предоставляет функциональные объекты, каждый из которых является реализацией соответствующей функции API. Для упрощения изложения в данном руководстве вместо термина **функциональный объект** будет использоваться термин **функция**, если это позволяет контекст.
|
||||||
|
|
||||||
|
#### Вызов функции
|
||||||
|
|
||||||
|
<details><summary>Выбор функции, передача параметров и сохранение результата</summary>
|
||||||
|
|
||||||
|
```python
|
||||||
|
from digital_energy_sdk import DigitalEnergy
|
||||||
|
|
||||||
|
|
||||||
|
de = DigitalEnergy(...)
|
||||||
|
|
||||||
|
# /digitalenergy/cluster/get
|
||||||
|
result = de.api.digitalenergy.cluster.get(id=1)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary>Передача параметров перечисляемого типа (enum) </summary>
|
||||||
|
|
||||||
|
```python
|
||||||
|
from digital_energy_sdk import DigitalEnergy
|
||||||
|
from digital_energy_sdk.api.digitalenergy.cluster.list import Type
|
||||||
|
|
||||||
|
|
||||||
|
de = DigitalEnergy(...)
|
||||||
|
|
||||||
|
# /digitalenergy/cluster/list
|
||||||
|
list_result = de.api.digitalenergy.cluster.list(type=Type.DENERGY)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary>Передача файловых параметров </summary>
|
||||||
|
|
||||||
|
```python
|
||||||
|
from digital_energy_sdk import DigitalEnergy
|
||||||
|
from digital_energy_sdk.types.params import ParamFile
|
||||||
|
|
||||||
|
|
||||||
|
de = DigitalEnergy(...)
|
||||||
|
|
||||||
|
file_name = ...
|
||||||
|
|
||||||
|
with open(file_name, 'rb') as f:
|
||||||
|
# /digitalenergy/files/fileUpload
|
||||||
|
de.api.digitalenergy.files.file_upload(
|
||||||
|
file=ParamFile(
|
||||||
|
file_name=file_name,
|
||||||
|
content=f,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
#### Результат выполнения функции
|
||||||
|
|
||||||
|
Тип данных, возвращаемый функцией SDK зависит от типа данных, возвращаемого соответствующей функцией API.
|
||||||
|
|
||||||
|
Если в результате функции API присутствует структура данных в виде набора пар ключ/значение с заранее известными ключами, то в результате функции SDK эта структура будет представлена в виде модели Pydantic. Остальные типы данных будут представлены соответствующими встроенными типами данных Python.
|
||||||
|
|
||||||
|
<details><summary>Модель</summary>
|
||||||
|
|
||||||
|
```python
|
||||||
|
import pydantic
|
||||||
|
from digital_energy_sdk import DigitalEnergy
|
||||||
|
|
||||||
|
|
||||||
|
de = DigitalEnergy(...)
|
||||||
|
|
||||||
|
# /digitalenergy/cluster/list
|
||||||
|
list_result = de.api.digitalenergy.cluster.list()
|
||||||
|
|
||||||
|
print(type(list_result)) # <class '....DigitalenergyClusterListResult'>
|
||||||
|
|
||||||
|
print(isinstance(list_result, pydantic.BaseModel)) # True
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary>Обращение к полю модели</summary>
|
||||||
|
|
||||||
|
```python
|
||||||
|
from digital_energy_sdk import DigitalEnergy
|
||||||
|
|
||||||
|
|
||||||
|
de = DigitalEnergy(...)
|
||||||
|
|
||||||
|
# /digitalenergy/cluster/list
|
||||||
|
clusters = de.api.digitalenergy.cluster.list().result.clusters
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary>Вложенная модель</summary>
|
||||||
|
|
||||||
|
```python
|
||||||
|
import pydantic
|
||||||
|
from digital_energy_sdk import DigitalEnergy
|
||||||
|
|
||||||
|
|
||||||
|
de = DigitalEnergy(...)
|
||||||
|
|
||||||
|
# /digitalenergy/cluster/list
|
||||||
|
cluster1 = de.api.digitalenergy.cluster.list().result.clusters[0]
|
||||||
|
|
||||||
|
print(type(cluster1)) # <class '....ClustersItem'>
|
||||||
|
|
||||||
|
print(isinstance(cluster1, pydantic.BaseModel)) # True
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<br>Все функциональные объекты, реализующие функции API, обладают следующими атрибутами:
|
||||||
|
|
||||||
|
| Атрибут | Описание |
|
||||||
|
| --- | --- |
|
||||||
|
| `api_path` | API URL path. |
|
||||||
|
| `config` | Экземпляр конфигурации SDK. |
|
||||||
|
| `func_name` | Название функции SDK в формате <code>digitalenergy.cluster.list</code> |
|
||||||
|
| `http_method` | HTTP-метод. |
|
||||||
|
| `last_http_resp` | Экзепляр класса <code>requests.Response</code>, полученный при последнем вызове ФО. |
|
||||||
|
| `last_params_model` | Модель Pydantic, содержащая параметры, переданные в последний вызов ФО. |
|
||||||
|
| `params_model_type` | Класс модели Pydantic для параметров вызова ФО. |
|
||||||
|
| `post_json` | Отправляются ли данные в формате JSON в POST-запросах. |
|
||||||
|
| `result_type` | Аннотация типа результата вызова ФО. |
|
||||||
|
| `signature` | Сигнатура вызова ФО. |
|
||||||
|
|
||||||
|
#### Соответствие названий
|
||||||
|
|
||||||
|
В SDK названия из API приведены к стилю, принятому в Python:
|
||||||
|
- PascalCase для названия классов
|
||||||
|
- snake_case для названия атрибутов классов (кроме классов перечисляемых типов)
|
||||||
|
- SCREAMING_CASE для названия атрибутов классов перечисляемых типов
|
||||||
|
|
||||||
|
### Типы данных SDK
|
||||||
|
|
||||||
|
Общие типы доступны через пакет `digital_energy_sdk.types`.
|
||||||
|
|
||||||
|
Частные типы доступны через модуль функции. Например, частные типы функции `digitalenergy.cluster.list` расположены в модуле `digital_energy_sdk.api.digitalenergy.cluster.list`.
|
||||||
|
|
||||||
|
### Ошибки и исключения (exceptions)
|
||||||
|
|
||||||
|
SDK может вызывать исключения, которые должны быть обработаны в соответствии с требованиями к разрабатываемому вами ПО.
|
||||||
|
|
||||||
|
#### Ошибки валидации данных
|
||||||
|
|
||||||
|
SDK производит валидацию параметров функций API с помощью библиотеки **Pydantic**.<br>
|
||||||
|
Поэтому, при ошибке валидации, будет вызвано исключение `pydantic.ValidationError`.
|
||||||
|
|
||||||
|
Таким же образом валидируются данные HTTP-ответов API. Причиной ошибки валидации данных HTTP-ответа API может быть:
|
||||||
|
1. Несоответствие версии SDK и версии **Digital Energy**.
|
||||||
|
1. Программная ошибка, допущенная при разработке SDK или **Digital Energy**. Получить подтверждение наличия такой ошибки, а также ускорить её устранение, можно сообщив нам о ней.
|
||||||
|
|
||||||
|
Получить подробную информацию об исключении `pydantic.ValidationError` можно [в соответствующем разделе официальной документации Pydantic](https://docs.pydantic.dev/latest/errors/errors/) (ссылка ведёт на документацию для последней версии, поэтому важно выбрать версию, соответствующую используемой в SDK).
|
||||||
|
|
||||||
|
#### Ошибки HTTP
|
||||||
|
|
||||||
|
SDK для выполнения HTTP-запросов использует библиотеку **Requests**.<br>
|
||||||
|
Поэтому, при ошибке HTTP-подключения, будет вызвано соответствующее исключение библиотеки **Requests**.
|
||||||
|
|
||||||
|
Для проверки соответствует ли код ответа успешному выполнению запроса, SDK вызывает метод `requests.Response.raise_for_status()`, поэтому при неуспешном HTTP-запросе также будет вызвано исключение библиотеки **Requests**.
|
||||||
|
|
||||||
|
**Примечание:** если код ответа 503, то SDK предпримет несколько повторных попыток. Подробнее в разделе [Конфигурация](#конфигурация).
|
||||||
|
|
||||||
|
<details><summary>Обработка ошибок HTTP</summary>
|
||||||
|
|
||||||
|
```python
|
||||||
|
from requests.exceptions import RequestException, HTTPError
|
||||||
|
from digital_energy_sdk import DigitalEnergy
|
||||||
|
|
||||||
|
cluster_id = 1
|
||||||
|
|
||||||
|
try:
|
||||||
|
get_result = de.api.digitalenergy.cluster.get(id=cluster_id)
|
||||||
|
except HTTPError as e:
|
||||||
|
resp = e.response
|
||||||
|
if resp.status_code == 404:
|
||||||
|
print(f'The cluster with ID={cluster_id} not found.')
|
||||||
|
else:
|
||||||
|
print(f'{e}: {resp.text}')
|
||||||
|
except RequestException as e:
|
||||||
|
print(e)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
Подробную информацию об исключениях библиотеки **Requests** можно получить в [соответствующем разделе официальной документации Requests](https://requests.readthedocs.io/en/latest/user/quickstart/#errors-and-exceptions).
|
||||||
|
|
||||||
|
<details><summary>Использование исключения SDK</summary>
|
||||||
|
|
||||||
|
Для возможности получать дополнительную информацию о функциях SDK при ошибках HTTP-запросов, в SDK есть возможность оборачивать все исключения <code>requests.exceptions.RequestException</code> в исключение <code>digital_energy_sdk.exceptions.RequestException</code>:
|
||||||
|
|
||||||
|
```python
|
||||||
|
class RequestException(Exception):
|
||||||
|
orig_exception: requests.exceptions.RequestException
|
||||||
|
func_name: str
|
||||||
|
func_kwargs: None | dict = None
|
||||||
|
status_code: None | int = None
|
||||||
|
```
|
||||||
|
|
||||||
|
Чтобы включить использование исключения <code>digital_energy_sdk.exceptions.RequestException</code>, необходимо передать в конструктор класса <code>DigitalEnergy</code> параметр <code>wrap_request_exceptions=True</code>
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Доступная функциональность
|
||||||
|
|
||||||
|
На данный момент в SDK доступна реализация всех функций API, за исключением:
|
||||||
|
- `/openid/{providername}/authenticate`
|
||||||
|
- `/digitalenergy/istore/charts/download`
|
||||||
|
- `/digitalenergy/istore/icon/download`
|
||||||
|
- `/digitalenergy/istore/image/download`
|
||||||
|
- `/digitalenergy/lrecords/download`
|
||||||
22
pyproject.toml
Normal file
22
pyproject.toml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
[project]
|
||||||
|
name = "digital-energy-sdk"
|
||||||
|
version = "1.0.0"
|
||||||
|
|
||||||
|
readme = "README.md"
|
||||||
|
|
||||||
|
requires-python = ">=3.12, <=3.14"
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
"requests>=2.34.2",
|
||||||
|
"pydantic==2.13.5",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Repository = "https://repository.basistech.ru/BASIS/de-py-sdk"
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = [
|
||||||
|
"setuptools",
|
||||||
|
"setuptools-scm",
|
||||||
|
]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
1
src/digital_energy_sdk/__init__.py
Normal file
1
src/digital_energy_sdk/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from digital_energy_sdk.digital_energy import DigitalEnergy
|
||||||
4
src/digital_energy_sdk/api/__init__.py
Normal file
4
src/digital_energy_sdk/api/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
from ._group import APIImpl
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['APIImpl']
|
||||||
30
src/digital_energy_sdk/api/_group.py
Normal file
30
src/digital_energy_sdk/api/_group.py
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
from functools import cached_property
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationGroupImpl
|
||||||
|
from .digitalenergy import DigitalenergyImpl
|
||||||
|
from .dynamix import DynamixImpl
|
||||||
|
from .openid import OpenidImpl
|
||||||
|
from .prod import ProdImpl
|
||||||
|
from .session import SessionImpl
|
||||||
|
|
||||||
|
|
||||||
|
class APIImpl(APIOperationGroupImpl):
|
||||||
|
@cached_property
|
||||||
|
def digitalenergy(self) -> DigitalenergyImpl:
|
||||||
|
return DigitalenergyImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def dynamix(self) -> DynamixImpl:
|
||||||
|
return DynamixImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def openid(self) -> OpenidImpl:
|
||||||
|
return OpenidImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def prod(self) -> ProdImpl:
|
||||||
|
return ProdImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def session(self) -> SessionImpl:
|
||||||
|
return SessionImpl(config=self._config)
|
||||||
4
src/digital_energy_sdk/api/digitalenergy/__init__.py
Normal file
4
src/digital_energy_sdk/api/digitalenergy/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
from ._group import DigitalenergyImpl
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['DigitalenergyImpl']
|
||||||
335
src/digital_energy_sdk/api/digitalenergy/_group.py
Normal file
335
src/digital_energy_sdk/api/digitalenergy/_group.py
Normal file
@@ -0,0 +1,335 @@
|
|||||||
|
from functools import cached_property
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationGroupImpl
|
||||||
|
from .apisix import DigitalenergyApisixImpl
|
||||||
|
from .audit import DigitalenergyAuditImpl
|
||||||
|
from .autoscaler import DigitalenergyAutoscalerImpl
|
||||||
|
from .certificates import DigitalenergyCertificatesImpl
|
||||||
|
from .certmanager import DigitalenergyCertmanagerImpl
|
||||||
|
from .cluster import DigitalenergyClusterImpl
|
||||||
|
from .cluster_template import DigitalenergyClusterTemplateImpl
|
||||||
|
from .codescoring import DigitalenergyCodescoringImpl
|
||||||
|
from .computes import DigitalenergyComputesImpl
|
||||||
|
from .criobox import DigitalenergyCrioboxImpl
|
||||||
|
from .csidynamix import DigitalenergyCsidynamixImpl
|
||||||
|
from .customapp import DigitalenergyCustomappImpl
|
||||||
|
from .database import DigitalenergyDatabaseImpl
|
||||||
|
from .dependency_track import DigitalenergyDependencyTrackImpl
|
||||||
|
from .deployment import DigitalenergyDeploymentImpl
|
||||||
|
from .disks import DigitalenergyDisksImpl
|
||||||
|
from .ess import DigitalenergyEssImpl
|
||||||
|
from .falco import DigitalenergyFalcoImpl
|
||||||
|
from .files import DigitalenergyFilesImpl
|
||||||
|
from .gitlab import DigitalenergyGitlabImpl
|
||||||
|
from .grafana import DigitalenergyGrafanaImpl
|
||||||
|
from .group import DigitalenergyGroupImpl
|
||||||
|
from .harbor import DigitalenergyHarborImpl
|
||||||
|
from .ingress_nginx import DigitalenergyIngressNginxImpl
|
||||||
|
from .integagent import DigitalenergyIntegagentImpl
|
||||||
|
from .istio import DigitalenergyIstioImpl
|
||||||
|
from .istore import DigitalenergyIstoreImpl
|
||||||
|
from .jenkins import DigitalenergyJenkinsImpl
|
||||||
|
from .kubernetes_user import DigitalenergyKubernetesUserImpl
|
||||||
|
from .kyverno import DigitalenergyKyvernoImpl
|
||||||
|
from .longhorn import DigitalenergyLonghornImpl
|
||||||
|
from .lrecords import DigitalenergyLrecordsImpl
|
||||||
|
from .metrics import DigitalenergyMetricsImpl
|
||||||
|
from .minio import DigitalenergyMinioImpl
|
||||||
|
from .nexus import DigitalenergyNexusImpl
|
||||||
|
from .notification import DigitalenergyNotificationImpl
|
||||||
|
from .openelb import DigitalenergyOpenelbImpl
|
||||||
|
from .operation import DigitalenergyOperationImpl
|
||||||
|
from .packages import DigitalenergyPackagesImpl
|
||||||
|
from .podlogger import DigitalenergyPodloggerImpl
|
||||||
|
from .policy_report import DigitalenergyPolicyReportImpl
|
||||||
|
from .postgresql_ha import DigitalenergyPostgresqlHaImpl
|
||||||
|
from .products import DigitalenergyProductsImpl
|
||||||
|
from .prometheus import DigitalenergyPrometheusImpl
|
||||||
|
from .property import DigitalenergyPropertyImpl
|
||||||
|
from .rbacmanager import DigitalenergyRbacmanagerImpl
|
||||||
|
from .redis_cluster import DigitalenergyRedisClusterImpl
|
||||||
|
from .redmine import DigitalenergyRedmineImpl
|
||||||
|
from .repository_apps import DigitalenergyRepositoryAppsImpl
|
||||||
|
from .repository_charts import DigitalenergyRepositoryChartsImpl
|
||||||
|
from .repository_files import DigitalenergyRepositoryFilesImpl
|
||||||
|
from .repository_kube import DigitalenergyRepositoryKubeImpl
|
||||||
|
from .role import DigitalenergyRoleImpl
|
||||||
|
from .seaweedfs_operator import DigitalenergySeaweedfsOperatorImpl
|
||||||
|
from .seaweedfs import DigitalenergySeaweedfsImpl
|
||||||
|
from .servchecker import DigitalenergyServcheckerImpl
|
||||||
|
from .sonarqube import DigitalenergySonarqubeImpl
|
||||||
|
from .svacer import DigitalenergySvacerImpl
|
||||||
|
from .task import DigitalenergyTaskImpl
|
||||||
|
from .trivy import DigitalenergyTrivyImpl
|
||||||
|
from .user import DigitalenergyUserImpl
|
||||||
|
from .valkey import DigitalenergyValkeyImpl
|
||||||
|
from .vault import DigitalenergyVaultImpl
|
||||||
|
from .verification_report import DigitalenergyVerificationReportImpl
|
||||||
|
from .vulnerability_report import DigitalenergyVulnerabilityReportImpl
|
||||||
|
from .x509 import DigitalenergyX509Impl
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyImpl(APIOperationGroupImpl):
|
||||||
|
@cached_property
|
||||||
|
def apisix(self) -> DigitalenergyApisixImpl:
|
||||||
|
return DigitalenergyApisixImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def audit(self) -> DigitalenergyAuditImpl:
|
||||||
|
return DigitalenergyAuditImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def autoscaler(self) -> DigitalenergyAutoscalerImpl:
|
||||||
|
return DigitalenergyAutoscalerImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def certificates(self) -> DigitalenergyCertificatesImpl:
|
||||||
|
return DigitalenergyCertificatesImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def certmanager(self) -> DigitalenergyCertmanagerImpl:
|
||||||
|
return DigitalenergyCertmanagerImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def cluster(self) -> DigitalenergyClusterImpl:
|
||||||
|
return DigitalenergyClusterImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def cluster_template(self) -> DigitalenergyClusterTemplateImpl:
|
||||||
|
return DigitalenergyClusterTemplateImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def codescoring(self) -> DigitalenergyCodescoringImpl:
|
||||||
|
return DigitalenergyCodescoringImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def computes(self) -> DigitalenergyComputesImpl:
|
||||||
|
return DigitalenergyComputesImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def criobox(self) -> DigitalenergyCrioboxImpl:
|
||||||
|
return DigitalenergyCrioboxImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def csidynamix(self) -> DigitalenergyCsidynamixImpl:
|
||||||
|
return DigitalenergyCsidynamixImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def customapp(self) -> DigitalenergyCustomappImpl:
|
||||||
|
return DigitalenergyCustomappImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def database(self) -> DigitalenergyDatabaseImpl:
|
||||||
|
return DigitalenergyDatabaseImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def dependency_track(self) -> DigitalenergyDependencyTrackImpl:
|
||||||
|
return DigitalenergyDependencyTrackImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def deployment(self) -> DigitalenergyDeploymentImpl:
|
||||||
|
return DigitalenergyDeploymentImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def disks(self) -> DigitalenergyDisksImpl:
|
||||||
|
return DigitalenergyDisksImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def ess(self) -> DigitalenergyEssImpl:
|
||||||
|
return DigitalenergyEssImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def falco(self) -> DigitalenergyFalcoImpl:
|
||||||
|
return DigitalenergyFalcoImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def files(self) -> DigitalenergyFilesImpl:
|
||||||
|
return DigitalenergyFilesImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def gitlab(self) -> DigitalenergyGitlabImpl:
|
||||||
|
return DigitalenergyGitlabImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def grafana(self) -> DigitalenergyGrafanaImpl:
|
||||||
|
return DigitalenergyGrafanaImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def group(self) -> DigitalenergyGroupImpl:
|
||||||
|
return DigitalenergyGroupImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def harbor(self) -> DigitalenergyHarborImpl:
|
||||||
|
return DigitalenergyHarborImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def ingress_nginx(self) -> DigitalenergyIngressNginxImpl:
|
||||||
|
return DigitalenergyIngressNginxImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def integagent(self) -> DigitalenergyIntegagentImpl:
|
||||||
|
return DigitalenergyIntegagentImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def istio(self) -> DigitalenergyIstioImpl:
|
||||||
|
return DigitalenergyIstioImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def istore(self) -> DigitalenergyIstoreImpl:
|
||||||
|
return DigitalenergyIstoreImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def jenkins(self) -> DigitalenergyJenkinsImpl:
|
||||||
|
return DigitalenergyJenkinsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def kubernetes_user(self) -> DigitalenergyKubernetesUserImpl:
|
||||||
|
return DigitalenergyKubernetesUserImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def kyverno(self) -> DigitalenergyKyvernoImpl:
|
||||||
|
return DigitalenergyKyvernoImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def longhorn(self) -> DigitalenergyLonghornImpl:
|
||||||
|
return DigitalenergyLonghornImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def lrecords(self) -> DigitalenergyLrecordsImpl:
|
||||||
|
return DigitalenergyLrecordsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def metrics(self) -> DigitalenergyMetricsImpl:
|
||||||
|
return DigitalenergyMetricsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def minio(self) -> DigitalenergyMinioImpl:
|
||||||
|
return DigitalenergyMinioImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def nexus(self) -> DigitalenergyNexusImpl:
|
||||||
|
return DigitalenergyNexusImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def notification(self) -> DigitalenergyNotificationImpl:
|
||||||
|
return DigitalenergyNotificationImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def openelb(self) -> DigitalenergyOpenelbImpl:
|
||||||
|
return DigitalenergyOpenelbImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def operation(self) -> DigitalenergyOperationImpl:
|
||||||
|
return DigitalenergyOperationImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def packages(self) -> DigitalenergyPackagesImpl:
|
||||||
|
return DigitalenergyPackagesImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def podlogger(self) -> DigitalenergyPodloggerImpl:
|
||||||
|
return DigitalenergyPodloggerImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def policy_report(self) -> DigitalenergyPolicyReportImpl:
|
||||||
|
return DigitalenergyPolicyReportImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def postgresql_ha(self) -> DigitalenergyPostgresqlHaImpl:
|
||||||
|
return DigitalenergyPostgresqlHaImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def products(self) -> DigitalenergyProductsImpl:
|
||||||
|
return DigitalenergyProductsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def prometheus(self) -> DigitalenergyPrometheusImpl:
|
||||||
|
return DigitalenergyPrometheusImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def property(self) -> DigitalenergyPropertyImpl:
|
||||||
|
return DigitalenergyPropertyImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def rbacmanager(self) -> DigitalenergyRbacmanagerImpl:
|
||||||
|
return DigitalenergyRbacmanagerImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def redis_cluster(self) -> DigitalenergyRedisClusterImpl:
|
||||||
|
return DigitalenergyRedisClusterImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def redmine(self) -> DigitalenergyRedmineImpl:
|
||||||
|
return DigitalenergyRedmineImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def repository_apps(self) -> DigitalenergyRepositoryAppsImpl:
|
||||||
|
return DigitalenergyRepositoryAppsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def repository_charts(self) -> DigitalenergyRepositoryChartsImpl:
|
||||||
|
return DigitalenergyRepositoryChartsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def repository_files(self) -> DigitalenergyRepositoryFilesImpl:
|
||||||
|
return DigitalenergyRepositoryFilesImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def repository_kube(self) -> DigitalenergyRepositoryKubeImpl:
|
||||||
|
return DigitalenergyRepositoryKubeImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def role(self) -> DigitalenergyRoleImpl:
|
||||||
|
return DigitalenergyRoleImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def seaweedfs_operator(self) -> DigitalenergySeaweedfsOperatorImpl:
|
||||||
|
return DigitalenergySeaweedfsOperatorImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def seaweedfs(self) -> DigitalenergySeaweedfsImpl:
|
||||||
|
return DigitalenergySeaweedfsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def servchecker(self) -> DigitalenergyServcheckerImpl:
|
||||||
|
return DigitalenergyServcheckerImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def sonarqube(self) -> DigitalenergySonarqubeImpl:
|
||||||
|
return DigitalenergySonarqubeImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def svacer(self) -> DigitalenergySvacerImpl:
|
||||||
|
return DigitalenergySvacerImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def task(self) -> DigitalenergyTaskImpl:
|
||||||
|
return DigitalenergyTaskImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def trivy(self) -> DigitalenergyTrivyImpl:
|
||||||
|
return DigitalenergyTrivyImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def user(self) -> DigitalenergyUserImpl:
|
||||||
|
return DigitalenergyUserImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def valkey(self) -> DigitalenergyValkeyImpl:
|
||||||
|
return DigitalenergyValkeyImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def vault(self) -> DigitalenergyVaultImpl:
|
||||||
|
return DigitalenergyVaultImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def verification_report(self) -> DigitalenergyVerificationReportImpl:
|
||||||
|
return DigitalenergyVerificationReportImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def vulnerability_report(self) -> DigitalenergyVulnerabilityReportImpl:
|
||||||
|
return DigitalenergyVulnerabilityReportImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def x509(self) -> DigitalenergyX509Impl:
|
||||||
|
return DigitalenergyX509Impl(config=self._config)
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from ._group import DigitalenergyApisixImpl
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['DigitalenergyApisixImpl']
|
||||||
20
src/digital_energy_sdk/api/digitalenergy/apisix/_group.py
Normal file
20
src/digital_energy_sdk/api/digitalenergy/apisix/_group.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
from functools import cached_property
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationGroupImpl
|
||||||
|
from .describe import DigitalenergyApisixDescribeImpl
|
||||||
|
from .install import DigitalenergyApisixInstallImpl
|
||||||
|
from .uninstall import DigitalenergyApisixUninstallImpl
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyApisixImpl(APIOperationGroupImpl):
|
||||||
|
@cached_property
|
||||||
|
def describe(self) -> DigitalenergyApisixDescribeImpl:
|
||||||
|
return DigitalenergyApisixDescribeImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def install(self) -> DigitalenergyApisixInstallImpl:
|
||||||
|
return DigitalenergyApisixInstallImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def uninstall(self) -> DigitalenergyApisixUninstallImpl:
|
||||||
|
return DigitalenergyApisixUninstallImpl(config=self._config)
|
||||||
60
src/digital_energy_sdk/api/digitalenergy/apisix/describe.py
Normal file
60
src/digital_energy_sdk/api/digitalenergy/apisix/describe.py
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Registry(_ResultModel):
|
||||||
|
addresses: dict[Any, Any] | None = Field(validation_alias='addresses', default=None)
|
||||||
|
cluster_id: int | None = Field(validation_alias='clusterId', default=None)
|
||||||
|
hostnames: dict[Any, Any] | None = Field(validation_alias='hostnames', default=None)
|
||||||
|
http_port: int | None = Field(validation_alias='httpPort', default=None)
|
||||||
|
https_port: int | None = Field(validation_alias='httpsPort', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
name: str | None = Field(validation_alias='name', default=None)
|
||||||
|
owner_id: int | None = Field(validation_alias='ownerId', default=None)
|
||||||
|
product_name: str | None = Field(validation_alias='productName', default=None)
|
||||||
|
product_version: str | None = Field(validation_alias='productVersion', default=None)
|
||||||
|
task_ids: list[int] | None = Field(validation_alias='taskIds', default=None)
|
||||||
|
worker_group_name: str | None = Field(validation_alias='workerGroupName', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
check_list_ok: bool | None = Field(validation_alias='checkListOk', default=None)
|
||||||
|
description: _results.ComtypeAudescrProductDescr | None = Field(validation_alias='description', default=None)
|
||||||
|
installed: bool | None = Field(validation_alias='installed', default=None)
|
||||||
|
registered: bool | None = Field(validation_alias='registered', default=None)
|
||||||
|
registry: Registry | None = Field(validation_alias='registry', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyApisixDescribeResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyApisixDescribeImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/apisix/describe'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'check_installation': 'checkInstallation',
|
||||||
|
'check_liveness': 'checkLiveness',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
check_installation: bool | None = None,
|
||||||
|
check_liveness: bool | None = None,
|
||||||
|
) -> DigitalenergyApisixDescribeResult:
|
||||||
|
raise NotImplementedError
|
||||||
41
src/digital_energy_sdk/api/digitalenergy/apisix/install.py
Normal file
41
src/digital_energy_sdk/api/digitalenergy/apisix/install.py
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyApisixInstallImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/apisix/install'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'integagent_hostname': 'integagentHostname',
|
||||||
|
'http_port': 'httpPort',
|
||||||
|
'https_port': 'httpsPort',
|
||||||
|
'apps_repository_id': 'appsRepositoryId',
|
||||||
|
'charts_repository_id': 'chartsRepositoryId',
|
||||||
|
'worker_group_name': 'workerGroupName',
|
||||||
|
'download_chart_anyway': 'downloadChartAnyway',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
hostname: str,
|
||||||
|
integagent_hostname: str | None = None,
|
||||||
|
http_port: int,
|
||||||
|
https_port: int | None = None,
|
||||||
|
apps_repository_id: int | None = None,
|
||||||
|
charts_repository_id: int | None = None,
|
||||||
|
worker_group_name: str | None = None,
|
||||||
|
download_chart_anyway: bool | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
30
src/digital_energy_sdk/api/digitalenergy/apisix/uninstall.py
Normal file
30
src/digital_energy_sdk/api/digitalenergy/apisix/uninstall.py
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyApisixUninstallImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/apisix/uninstall'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'clean_always': 'cleanAlways',
|
||||||
|
'ignore_dns_error': 'ignoreDnsError',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
clean_always: bool = False,
|
||||||
|
ignore_dns_error: bool = False,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from ._group import DigitalenergyAuditImpl
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['DigitalenergyAuditImpl']
|
||||||
15
src/digital_energy_sdk/api/digitalenergy/audit/_group.py
Normal file
15
src/digital_energy_sdk/api/digitalenergy/audit/_group.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
from functools import cached_property
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationGroupImpl
|
||||||
|
from .link import DigitalenergyAuditLinkImpl
|
||||||
|
from .list import DigitalenergyAuditListImpl
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyAuditImpl(APIOperationGroupImpl):
|
||||||
|
@cached_property
|
||||||
|
def link(self) -> DigitalenergyAuditLinkImpl:
|
||||||
|
return DigitalenergyAuditLinkImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def list(self) -> DigitalenergyAuditListImpl:
|
||||||
|
return DigitalenergyAuditListImpl(config=self._config)
|
||||||
56
src/digital_energy_sdk/api/digitalenergy/audit/link.py
Normal file
56
src/digital_energy_sdk/api/digitalenergy/audit/link.py
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Verb(Enum):
|
||||||
|
GET = 'get'
|
||||||
|
LIST = 'list'
|
||||||
|
CREATE = 'create'
|
||||||
|
UPDATE = 'update'
|
||||||
|
PATCH = 'patch'
|
||||||
|
DELETE = 'delete'
|
||||||
|
WATCH = 'watch'
|
||||||
|
DELETECOLLECTION = 'deletecollection'
|
||||||
|
EMPTY_STR = ''
|
||||||
|
|
||||||
|
|
||||||
|
class Decision(Enum):
|
||||||
|
FORBID = 'forbid'
|
||||||
|
ALLOW = 'allow'
|
||||||
|
EMPTY_STR = ''
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyAuditLinkImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/audit/link'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'node_id': 'nodeId',
|
||||||
|
'time_after': 'timeAfter',
|
||||||
|
'time_before': 'timeBefore',
|
||||||
|
'request_uri': 'requestUri',
|
||||||
|
'source_ip': 'sourceIp',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
node_id: int,
|
||||||
|
time_after: int | None = None,
|
||||||
|
time_before: int | None = None,
|
||||||
|
request_uri: str | None = None,
|
||||||
|
verb: Verb | None = None,
|
||||||
|
decision: Decision | None = None,
|
||||||
|
source_ip: str | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
73
src/digital_energy_sdk/api/digitalenergy/audit/list.py
Normal file
73
src/digital_energy_sdk/api/digitalenergy/audit/list.py
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DownloadsItem(_ResultModel):
|
||||||
|
download_date: str | None = Field(validation_alias='downloadDate', default=None)
|
||||||
|
successfull: bool | None = Field(validation_alias='successfull', default=None)
|
||||||
|
user_id: int | None = Field(validation_alias='userId', default=None)
|
||||||
|
user_name: str | None = Field(validation_alias='userName', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class AuditItem(_ResultModel):
|
||||||
|
request_uri_filter: str | None = Field(validation_alias='RequestUriFilter', default=None)
|
||||||
|
audits_count: int | None = Field(validation_alias='auditsCount', default=None)
|
||||||
|
cluster_id: int | None = Field(validation_alias='clusterId', default=None)
|
||||||
|
creation_date: str | None = Field(validation_alias='creationDate', default=None)
|
||||||
|
decision_filter: str | None = Field(validation_alias='decisionFilter', default=None)
|
||||||
|
downloads: list[DownloadsItem] | None = Field(validation_alias='downloads', default=None)
|
||||||
|
error: str | None = Field(validation_alias='error', default=None)
|
||||||
|
file_name: str | None = Field(validation_alias='fileName', default=None)
|
||||||
|
file_path: str | None = Field(validation_alias='filePath', default=None)
|
||||||
|
file_size: int | None = Field(validation_alias='fileSize', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
is_active: bool | None = Field(validation_alias='isActive', default=None)
|
||||||
|
node_id: int | None = Field(validation_alias='nodeId', default=None)
|
||||||
|
owner_id: int | None = Field(validation_alias='ownerId', default=None)
|
||||||
|
source_ip_filter: str | None = Field(validation_alias='sourceIpFilter', default=None)
|
||||||
|
status: str | None = Field(validation_alias='status', default=None)
|
||||||
|
time_after_filter: int | None = Field(validation_alias='timeAfterFilter', default=None)
|
||||||
|
time_before_filter: int | None = Field(validation_alias='timeBeforeFilter', default=None)
|
||||||
|
url: str | None = Field(validation_alias='url', default=None)
|
||||||
|
verb_filter: str | None = Field(validation_alias='verbFilter', default=None)
|
||||||
|
zip_size: int | None = Field(validation_alias='zipSize', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
audit: list[AuditItem] | None = Field(validation_alias='audit', default=None)
|
||||||
|
total: int | None = Field(validation_alias='total', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyAuditListResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyAuditListImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/audit/list'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'show_active': 'showActive',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
show_active: bool | None = None,
|
||||||
|
limit: int | None = None,
|
||||||
|
page: int | None = None,
|
||||||
|
) -> DigitalenergyAuditListResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from ._group import DigitalenergyAutoscalerImpl
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['DigitalenergyAutoscalerImpl']
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
from functools import cached_property
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationGroupImpl
|
||||||
|
from .list_autoscaler_deployments import DigitalenergyAutoscalerListAutoscalerDeploymentsImpl
|
||||||
|
from .turn_off_autoscaler_deployment import DigitalenergyAutoscalerTurnOffAutoscalerDeploymentImpl
|
||||||
|
from .turn_on_autoscaler_deployment import DigitalenergyAutoscalerTurnOnAutoscalerDeploymentImpl
|
||||||
|
from .update_autoscaler_deployment import DigitalenergyAutoscalerUpdateAutoscalerDeploymentImpl
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyAutoscalerImpl(APIOperationGroupImpl):
|
||||||
|
@cached_property
|
||||||
|
def list_autoscaler_deployments(self) -> DigitalenergyAutoscalerListAutoscalerDeploymentsImpl:
|
||||||
|
return DigitalenergyAutoscalerListAutoscalerDeploymentsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def turn_off_autoscaler_deployment(self) -> DigitalenergyAutoscalerTurnOffAutoscalerDeploymentImpl:
|
||||||
|
return DigitalenergyAutoscalerTurnOffAutoscalerDeploymentImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def turn_on_autoscaler_deployment(self) -> DigitalenergyAutoscalerTurnOnAutoscalerDeploymentImpl:
|
||||||
|
return DigitalenergyAutoscalerTurnOnAutoscalerDeploymentImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def update_autoscaler_deployment(self) -> DigitalenergyAutoscalerUpdateAutoscalerDeploymentImpl:
|
||||||
|
return DigitalenergyAutoscalerUpdateAutoscalerDeploymentImpl(config=self._config)
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class ManagedFieldsItem(_ResultModel):
|
||||||
|
api_version: str | None = Field(validation_alias='apiVersion', default=None)
|
||||||
|
fields_type: str | None = Field(validation_alias='fieldsType', default=None)
|
||||||
|
manager: str | None = Field(validation_alias='manager', default=None)
|
||||||
|
operation: str | None = Field(validation_alias='operation', default=None)
|
||||||
|
subresource: str | None = Field(validation_alias='subresource', default=None)
|
||||||
|
time: str | None = Field(validation_alias='time', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class ScaleTargetRef(_ResultModel):
|
||||||
|
api_version: str | None = Field(validation_alias='apiVersion', default=None)
|
||||||
|
kind: str | None = Field(validation_alias='kind', default=None)
|
||||||
|
name: str | None = Field(validation_alias='name', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class ItemsItemMetadata(_ResultModel):
|
||||||
|
annotations: dict[Any, Any] | None = Field(validation_alias='annotations', default=None)
|
||||||
|
creation_timestamp: str | None = Field(validation_alias='creationTimestamp', default=None)
|
||||||
|
managed_fields: list[ManagedFieldsItem] | None = Field(validation_alias='managedFields', default=None)
|
||||||
|
name: str | None = Field(validation_alias='name', default=None)
|
||||||
|
namespace: str | None = Field(validation_alias='namespace', default=None)
|
||||||
|
resource_version: str | None = Field(validation_alias='resourceVersion', default=None)
|
||||||
|
uid: str | None = Field(validation_alias='uid', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Spec(_ResultModel):
|
||||||
|
max_replicas: int | None = Field(validation_alias='maxReplicas', default=None)
|
||||||
|
min_replicas: int | None = Field(validation_alias='minReplicas', default=None)
|
||||||
|
scale_target_ref: ScaleTargetRef | None = Field(validation_alias='scaleTargetRef', default=None)
|
||||||
|
target_cpu_utilization_percentage: int | None = Field(validation_alias='targetCPUUtilizationPercentage', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Status(_ResultModel):
|
||||||
|
current_replicas: int | None = Field(validation_alias='currentReplicas', default=None)
|
||||||
|
desired_replicas: int | None = Field(validation_alias='desiredReplicas', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class ItemsItem(_ResultModel):
|
||||||
|
metadata: ItemsItemMetadata | None = Field(validation_alias='metadata', default=None)
|
||||||
|
spec: Spec | None = Field(validation_alias='spec', default=None)
|
||||||
|
status: Status | None = Field(validation_alias='status', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class ResultMetadata(_ResultModel):
|
||||||
|
resource_version: str | None = Field(validation_alias='resourceVersion', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
items: list[ItemsItem] | None = Field(validation_alias='items', default=None)
|
||||||
|
metadata: ResultMetadata | None = Field(validation_alias='metadata', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyAutoscalerListAutoscalerDeploymentsResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyAutoscalerListAutoscalerDeploymentsImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/autoscaler/listAutoscalerDeployments'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
namespace: str,
|
||||||
|
) -> DigitalenergyAutoscalerListAutoscalerDeploymentsResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyAutoscalerTurnOffAutoscalerDeploymentResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: dict[Any, Any] | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyAutoscalerTurnOffAutoscalerDeploymentImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/autoscaler/turnOffAutoscalerDeployment'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'name_deployment': 'nameDeployment',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
name_deployment: str,
|
||||||
|
namespace: str,
|
||||||
|
) -> DigitalenergyAutoscalerTurnOffAutoscalerDeploymentResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyAutoscalerTurnOnAutoscalerDeploymentResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: dict[Any, Any] | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyAutoscalerTurnOnAutoscalerDeploymentImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/autoscaler/turnOnAutoscalerDeployment'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'name_deployment': 'nameDeployment',
|
||||||
|
'min_pods': 'minPods',
|
||||||
|
'max_pods': 'maxPods',
|
||||||
|
'cpu_percent': 'cpuPercent',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
name_deployment: str,
|
||||||
|
namespace: str,
|
||||||
|
min_pods: int,
|
||||||
|
max_pods: int,
|
||||||
|
cpu_percent: int,
|
||||||
|
) -> DigitalenergyAutoscalerTurnOnAutoscalerDeploymentResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyAutoscalerUpdateAutoscalerDeploymentResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: dict[Any, Any] | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyAutoscalerUpdateAutoscalerDeploymentImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/autoscaler/updateAutoscalerDeployment'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'name_deployment': 'nameDeployment',
|
||||||
|
'min_pods': 'minPods',
|
||||||
|
'max_pods': 'maxPods',
|
||||||
|
'cpu_percent': 'cpuPercent',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
name_deployment: str,
|
||||||
|
namespace: str,
|
||||||
|
min_pods: int | None = None,
|
||||||
|
max_pods: int | None = None,
|
||||||
|
cpu_percent: int | None = None,
|
||||||
|
) -> DigitalenergyAutoscalerUpdateAutoscalerDeploymentResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from ._group import DigitalenergyCertificatesImpl
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['DigitalenergyCertificatesImpl']
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
from functools import cached_property
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationGroupImpl
|
||||||
|
from .kubeadm import DigitalenergyCertificatesKubeadmImpl
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyCertificatesImpl(APIOperationGroupImpl):
|
||||||
|
@cached_property
|
||||||
|
def kubeadm(self) -> DigitalenergyCertificatesKubeadmImpl:
|
||||||
|
return DigitalenergyCertificatesKubeadmImpl(config=self._config)
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from ._group import DigitalenergyCertificatesKubeadmImpl
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['DigitalenergyCertificatesKubeadmImpl']
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
from functools import cached_property
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationGroupImpl
|
||||||
|
from .check_expiration import DigitalenergyCertificatesKubeadmCheckExpirationImpl
|
||||||
|
from .renew import DigitalenergyCertificatesKubeadmRenewImpl
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyCertificatesKubeadmImpl(APIOperationGroupImpl):
|
||||||
|
@cached_property
|
||||||
|
def check_expiration(self) -> DigitalenergyCertificatesKubeadmCheckExpirationImpl:
|
||||||
|
return DigitalenergyCertificatesKubeadmCheckExpirationImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def renew(self) -> DigitalenergyCertificatesKubeadmRenewImpl:
|
||||||
|
return DigitalenergyCertificatesKubeadmRenewImpl(config=self._config)
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
task_id: int | None = Field(validation_alias='taskID', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyCertificatesKubeadmCheckExpirationResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyCertificatesKubeadmCheckExpirationImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/certificates/kubeadm/checkExpiration'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
) -> DigitalenergyCertificatesKubeadmCheckExpirationResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
task_id: int | None = Field(validation_alias='taskID', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyCertificatesKubeadmRenewResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyCertificatesKubeadmRenewImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/certificates/kubeadm/renew'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
) -> DigitalenergyCertificatesKubeadmRenewResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from ._group import DigitalenergyCertmanagerImpl
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['DigitalenergyCertmanagerImpl']
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
from functools import cached_property
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationGroupImpl
|
||||||
|
from .describe import DigitalenergyCertmanagerDescribeImpl
|
||||||
|
from .install import DigitalenergyCertmanagerInstallImpl
|
||||||
|
from .uninstall import DigitalenergyCertmanagerUninstallImpl
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyCertmanagerImpl(APIOperationGroupImpl):
|
||||||
|
@cached_property
|
||||||
|
def describe(self) -> DigitalenergyCertmanagerDescribeImpl:
|
||||||
|
return DigitalenergyCertmanagerDescribeImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def install(self) -> DigitalenergyCertmanagerInstallImpl:
|
||||||
|
return DigitalenergyCertmanagerInstallImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def uninstall(self) -> DigitalenergyCertmanagerUninstallImpl:
|
||||||
|
return DigitalenergyCertmanagerUninstallImpl(config=self._config)
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Registry(_ResultModel):
|
||||||
|
addresses: dict[Any, Any] | None = Field(validation_alias='addresses', default=None)
|
||||||
|
ca_cert: str | None = Field(validation_alias='caCert', default=None)
|
||||||
|
ca_key: str | None = Field(validation_alias='caKey', default=None)
|
||||||
|
cluster_id: int | None = Field(validation_alias='clusterId', default=None)
|
||||||
|
hostnames: dict[Any, Any] | None = Field(validation_alias='hostnames', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
name: str | None = Field(validation_alias='name', default=None)
|
||||||
|
owner_id: int | None = Field(validation_alias='ownerId', default=None)
|
||||||
|
product_name: str | None = Field(validation_alias='productName', default=None)
|
||||||
|
product_version: str | None = Field(validation_alias='productVersion', default=None)
|
||||||
|
task_ids: list[int] | None = Field(validation_alias='taskIds', default=None)
|
||||||
|
worker_group_name: str | None = Field(validation_alias='workerGroupName', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
check_list_ok: bool | None = Field(validation_alias='checkListOk', default=None)
|
||||||
|
description: _results.ComtypeAudescrProductDescr | None = Field(validation_alias='description', default=None)
|
||||||
|
installed: bool | None = Field(validation_alias='installed', default=None)
|
||||||
|
registered: bool | None = Field(validation_alias='registered', default=None)
|
||||||
|
registry: Registry | None = Field(validation_alias='registry', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyCertmanagerDescribeResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyCertmanagerDescribeImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/certmanager/describe'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'check_installation': 'checkInstallation',
|
||||||
|
'check_liveness': 'CheckLiveness',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
check_installation: bool | None = None,
|
||||||
|
check_liveness: bool | None = None,
|
||||||
|
) -> DigitalenergyCertmanagerDescribeResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyCertmanagerInstallImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/certmanager/install'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'integagent_hostname': 'integagentHostname',
|
||||||
|
'apps_repository_id': 'appsRepositoryId',
|
||||||
|
'charts_repository_id': 'chartsRepositoryId',
|
||||||
|
'worker_group_name': 'workerGroupName',
|
||||||
|
'download_chart_anyway': 'downloadChartAnyway',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
hostname: str,
|
||||||
|
integagent_hostname: str | None = None,
|
||||||
|
apps_repository_id: int | None = None,
|
||||||
|
charts_repository_id: int | None = None,
|
||||||
|
worker_group_name: str | None = None,
|
||||||
|
download_chart_anyway: bool | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyCertmanagerUninstallImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/certmanager/uninstall'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'clean_always': 'cleanAlways',
|
||||||
|
'ignore_dns_error': 'ignoreDnsError',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
clean_always: bool = False,
|
||||||
|
ignore_dns_error: bool = False,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from ._group import DigitalenergyClusterImpl
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['DigitalenergyClusterImpl']
|
||||||
250
src/digital_energy_sdk/api/digitalenergy/cluster/_group.py
Normal file
250
src/digital_energy_sdk/api/digitalenergy/cluster/_group.py
Normal file
@@ -0,0 +1,250 @@
|
|||||||
|
from functools import cached_property
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationGroupImpl
|
||||||
|
from .add_load_balancers import DigitalenergyClusterAddLoadBalancersImpl
|
||||||
|
from .add_masters import DigitalenergyClusterAddMastersImpl
|
||||||
|
from .add_pool_vms import DigitalenergyClusterAddPoolVMsImpl
|
||||||
|
from .add_workers import DigitalenergyClusterAddWorkersImpl
|
||||||
|
from .create import DigitalenergyClusterCreateImpl
|
||||||
|
from .create_from_template import DigitalenergyClusterCreateFromTemplateImpl
|
||||||
|
from .create_worker_group import DigitalenergyClusterCreateWorkerGroupImpl
|
||||||
|
from .delete import DigitalenergyClusterDeleteImpl
|
||||||
|
from .delete_load_balancers import DigitalenergyClusterDeleteLoadBalancersImpl
|
||||||
|
from .delete_masters import DigitalenergyClusterDeleteMastersImpl
|
||||||
|
from .delete_pool_vms import DigitalenergyClusterDeletePoolVMsImpl
|
||||||
|
from .delete_worker_group import DigitalenergyClusterDeleteWorkerGroupImpl
|
||||||
|
from .delete_workers import DigitalenergyClusterDeleteWorkersImpl
|
||||||
|
from .describe import DigitalenergyClusterDescribeImpl
|
||||||
|
from .get import DigitalenergyClusterGetImpl
|
||||||
|
from .get_config import DigitalenergyClusterGetConfigImpl
|
||||||
|
from .get_kubectl_resources import DigitalenergyClusterGetKubectlResourcesImpl
|
||||||
|
from .get_load_balancer import DigitalenergyClusterGetLoadBalancerImpl
|
||||||
|
from .get_master import DigitalenergyClusterGetMasterImpl
|
||||||
|
from .get_worker import DigitalenergyClusterGetWorkerImpl
|
||||||
|
from .get_worker_group import DigitalenergyClusterGetWorkerGroupImpl
|
||||||
|
from .get_worker_group_annotations import DigitalenergyClusterGetWorkerGroupAnnotationsImpl
|
||||||
|
from .get_worker_group_labels import DigitalenergyClusterGetWorkerGroupLabelsImpl
|
||||||
|
from .get_worker_group_taints import DigitalenergyClusterGetWorkerGroupTaintsImpl
|
||||||
|
from .join_pool_vms import DigitalenergyClusterJoinPoolVMsImpl
|
||||||
|
from .list import DigitalenergyClusterListImpl
|
||||||
|
from .list_kubectl_resources import DigitalenergyClusterListKubectlResourcesImpl
|
||||||
|
from .list_load_balancers import DigitalenergyClusterListLoadBalancersImpl
|
||||||
|
from .list_masters import DigitalenergyClusterListMastersImpl
|
||||||
|
from .list_worker_groups import DigitalenergyClusterListWorkerGroupsImpl
|
||||||
|
from .list_workers import DigitalenergyClusterListWorkersImpl
|
||||||
|
from .load_balancers import DigitalenergyClusterLoadBalancersImpl
|
||||||
|
from .network_describe import DigitalenergyClusterNetworkDescribeImpl
|
||||||
|
from .resize_worker_group import DigitalenergyClusterResizeWorkerGroupImpl
|
||||||
|
from .set_kube_version import DigitalenergyClusterSetKubeVersionImpl
|
||||||
|
from .set_load_balancer_status import DigitalenergyClusterSetLoadBalancerStatusImpl
|
||||||
|
from .set_master_status import DigitalenergyClusterSetMasterStatusImpl
|
||||||
|
from .set_pool_vm_status import DigitalenergyClusterSetPoolVMStatusImpl
|
||||||
|
from .set_status import DigitalenergyClusterSetStatusImpl
|
||||||
|
from .set_worker_status import DigitalenergyClusterSetWorkerStatusImpl
|
||||||
|
from .update_cni_config import DigitalenergyClusterUpdateCNIConfigImpl
|
||||||
|
from .update_config import DigitalenergyClusterUpdateConfigImpl
|
||||||
|
from .update_info import DigitalenergyClusterUpdateInfoImpl
|
||||||
|
from .update_owner_id import DigitalenergyClusterUpdateOwnerIdImpl
|
||||||
|
from .update_worker_group import DigitalenergyClusterUpdateWorkerGroupImpl
|
||||||
|
from .update_worker_group_annotations import DigitalenergyClusterUpdateWorkerGroupAnnotationsImpl
|
||||||
|
from .update_worker_group_labels import DigitalenergyClusterUpdateWorkerGroupLabelsImpl
|
||||||
|
from .update_worker_group_taints import DigitalenergyClusterUpdateWorkerGroupTaintsImpl
|
||||||
|
from .verify import DigitalenergyClusterVerifyImpl
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterImpl(APIOperationGroupImpl):
|
||||||
|
@cached_property
|
||||||
|
def add_load_balancers(self) -> DigitalenergyClusterAddLoadBalancersImpl:
|
||||||
|
return DigitalenergyClusterAddLoadBalancersImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def add_masters(self) -> DigitalenergyClusterAddMastersImpl:
|
||||||
|
return DigitalenergyClusterAddMastersImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def add_pool_vms(self) -> DigitalenergyClusterAddPoolVMsImpl:
|
||||||
|
return DigitalenergyClusterAddPoolVMsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def add_workers(self) -> DigitalenergyClusterAddWorkersImpl:
|
||||||
|
return DigitalenergyClusterAddWorkersImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def create(self) -> DigitalenergyClusterCreateImpl:
|
||||||
|
return DigitalenergyClusterCreateImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def create_from_template(self) -> DigitalenergyClusterCreateFromTemplateImpl:
|
||||||
|
return DigitalenergyClusterCreateFromTemplateImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def create_worker_group(self) -> DigitalenergyClusterCreateWorkerGroupImpl:
|
||||||
|
return DigitalenergyClusterCreateWorkerGroupImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def delete(self) -> DigitalenergyClusterDeleteImpl:
|
||||||
|
return DigitalenergyClusterDeleteImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def delete_load_balancers(self) -> DigitalenergyClusterDeleteLoadBalancersImpl:
|
||||||
|
return DigitalenergyClusterDeleteLoadBalancersImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def delete_masters(self) -> DigitalenergyClusterDeleteMastersImpl:
|
||||||
|
return DigitalenergyClusterDeleteMastersImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def delete_pool_vms(self) -> DigitalenergyClusterDeletePoolVMsImpl:
|
||||||
|
return DigitalenergyClusterDeletePoolVMsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def delete_worker_group(self) -> DigitalenergyClusterDeleteWorkerGroupImpl:
|
||||||
|
return DigitalenergyClusterDeleteWorkerGroupImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def delete_workers(self) -> DigitalenergyClusterDeleteWorkersImpl:
|
||||||
|
return DigitalenergyClusterDeleteWorkersImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def describe(self) -> DigitalenergyClusterDescribeImpl:
|
||||||
|
return DigitalenergyClusterDescribeImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def get(self) -> DigitalenergyClusterGetImpl:
|
||||||
|
return DigitalenergyClusterGetImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def get_config(self) -> DigitalenergyClusterGetConfigImpl:
|
||||||
|
return DigitalenergyClusterGetConfigImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def get_kubectl_resources(self) -> DigitalenergyClusterGetKubectlResourcesImpl:
|
||||||
|
return DigitalenergyClusterGetKubectlResourcesImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def get_load_balancer(self) -> DigitalenergyClusterGetLoadBalancerImpl:
|
||||||
|
return DigitalenergyClusterGetLoadBalancerImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def get_master(self) -> DigitalenergyClusterGetMasterImpl:
|
||||||
|
return DigitalenergyClusterGetMasterImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def get_worker(self) -> DigitalenergyClusterGetWorkerImpl:
|
||||||
|
return DigitalenergyClusterGetWorkerImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def get_worker_group(self) -> DigitalenergyClusterGetWorkerGroupImpl:
|
||||||
|
return DigitalenergyClusterGetWorkerGroupImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def get_worker_group_annotations(self) -> DigitalenergyClusterGetWorkerGroupAnnotationsImpl:
|
||||||
|
return DigitalenergyClusterGetWorkerGroupAnnotationsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def get_worker_group_labels(self) -> DigitalenergyClusterGetWorkerGroupLabelsImpl:
|
||||||
|
return DigitalenergyClusterGetWorkerGroupLabelsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def get_worker_group_taints(self) -> DigitalenergyClusterGetWorkerGroupTaintsImpl:
|
||||||
|
return DigitalenergyClusterGetWorkerGroupTaintsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def join_pool_vms(self) -> DigitalenergyClusterJoinPoolVMsImpl:
|
||||||
|
return DigitalenergyClusterJoinPoolVMsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def list(self) -> DigitalenergyClusterListImpl:
|
||||||
|
return DigitalenergyClusterListImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def list_kubectl_resources(self) -> DigitalenergyClusterListKubectlResourcesImpl:
|
||||||
|
return DigitalenergyClusterListKubectlResourcesImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def list_load_balancers(self) -> DigitalenergyClusterListLoadBalancersImpl:
|
||||||
|
return DigitalenergyClusterListLoadBalancersImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def list_masters(self) -> DigitalenergyClusterListMastersImpl:
|
||||||
|
return DigitalenergyClusterListMastersImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def list_worker_groups(self) -> DigitalenergyClusterListWorkerGroupsImpl:
|
||||||
|
return DigitalenergyClusterListWorkerGroupsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def list_workers(self) -> DigitalenergyClusterListWorkersImpl:
|
||||||
|
return DigitalenergyClusterListWorkersImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def load_balancers(self) -> DigitalenergyClusterLoadBalancersImpl:
|
||||||
|
return DigitalenergyClusterLoadBalancersImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def network_describe(self) -> DigitalenergyClusterNetworkDescribeImpl:
|
||||||
|
return DigitalenergyClusterNetworkDescribeImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def resize_worker_group(self) -> DigitalenergyClusterResizeWorkerGroupImpl:
|
||||||
|
return DigitalenergyClusterResizeWorkerGroupImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def set_kube_version(self) -> DigitalenergyClusterSetKubeVersionImpl:
|
||||||
|
return DigitalenergyClusterSetKubeVersionImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def set_load_balancer_status(self) -> DigitalenergyClusterSetLoadBalancerStatusImpl:
|
||||||
|
return DigitalenergyClusterSetLoadBalancerStatusImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def set_master_status(self) -> DigitalenergyClusterSetMasterStatusImpl:
|
||||||
|
return DigitalenergyClusterSetMasterStatusImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def set_pool_vm_status(self) -> DigitalenergyClusterSetPoolVMStatusImpl:
|
||||||
|
return DigitalenergyClusterSetPoolVMStatusImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def set_status(self) -> DigitalenergyClusterSetStatusImpl:
|
||||||
|
return DigitalenergyClusterSetStatusImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def set_worker_status(self) -> DigitalenergyClusterSetWorkerStatusImpl:
|
||||||
|
return DigitalenergyClusterSetWorkerStatusImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def update_cni_config(self) -> DigitalenergyClusterUpdateCNIConfigImpl:
|
||||||
|
return DigitalenergyClusterUpdateCNIConfigImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def update_config(self) -> DigitalenergyClusterUpdateConfigImpl:
|
||||||
|
return DigitalenergyClusterUpdateConfigImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def update_info(self) -> DigitalenergyClusterUpdateInfoImpl:
|
||||||
|
return DigitalenergyClusterUpdateInfoImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def update_owner_id(self) -> DigitalenergyClusterUpdateOwnerIdImpl:
|
||||||
|
return DigitalenergyClusterUpdateOwnerIdImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def update_worker_group(self) -> DigitalenergyClusterUpdateWorkerGroupImpl:
|
||||||
|
return DigitalenergyClusterUpdateWorkerGroupImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def update_worker_group_annotations(self) -> DigitalenergyClusterUpdateWorkerGroupAnnotationsImpl:
|
||||||
|
return DigitalenergyClusterUpdateWorkerGroupAnnotationsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def update_worker_group_labels(self) -> DigitalenergyClusterUpdateWorkerGroupLabelsImpl:
|
||||||
|
return DigitalenergyClusterUpdateWorkerGroupLabelsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def update_worker_group_taints(self) -> DigitalenergyClusterUpdateWorkerGroupTaintsImpl:
|
||||||
|
return DigitalenergyClusterUpdateWorkerGroupTaintsImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def verify(self) -> DigitalenergyClusterVerifyImpl:
|
||||||
|
return DigitalenergyClusterVerifyImpl(config=self._config)
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DenergyRuntimeType(Enum):
|
||||||
|
CRIO = 'crio'
|
||||||
|
CONTAINERD = 'containerd'
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterAddLoadBalancersImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/addLoadBalancers'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'dynamix_rg_id': 'dynamixRGId',
|
||||||
|
'load_balancer_sep_id': 'loadBalancerSEPId',
|
||||||
|
'load_balancer_sep_pool': 'loadBalancerSEPPool',
|
||||||
|
'load_balancer_count': 'loadBalancerCount',
|
||||||
|
'load_balancer_cpu_count': 'loadBalancerCPUCount',
|
||||||
|
'load_balancer_memory_size': 'loadBalancerMemorySize',
|
||||||
|
'load_balancer_disk_size': 'loadBalancerDiskSize',
|
||||||
|
'load_balancer_gpu_ids': 'loadBalancerGpuIds',
|
||||||
|
'load_balancer_cloud_init': 'loadBalancerCloudInit',
|
||||||
|
'use_custom_external_lb_addresses': 'useCustomExternalLBAddresses',
|
||||||
|
'use_custom_internal_lb_addresses': 'useCustomInternalLBAddresses',
|
||||||
|
'external_lb_addresses': 'externalLBAddresses',
|
||||||
|
'internal_lb_addresses': 'internalLBAddresses',
|
||||||
|
'enable_custom_hostnames': 'enableCustomHostnames',
|
||||||
|
'load_balancer_hostnames': 'loadBalancerHostnames',
|
||||||
|
'dynamix_app_id': 'dynamixAppId',
|
||||||
|
'dynamix_app_secret': 'dynamixAppSecret',
|
||||||
|
'dynamix_url': 'dynamixURL',
|
||||||
|
'dynamix_ssourl': 'dynamixSSOURL',
|
||||||
|
'denergy_runtime_type': 'denergyRuntimeType',
|
||||||
|
'domain_resolvers': 'domainResolvers',
|
||||||
|
'package_repository': 'packageRepository',
|
||||||
|
'load_balancer_user_usernames': 'loadBalancerUserUsernames',
|
||||||
|
'load_balancer_user_passwords': 'loadBalancerUserPasswords',
|
||||||
|
'load_balancer_root_usernames': 'loadBalancerRootUsernames',
|
||||||
|
'load_balancer_root_passwords': 'loadBalancerRootPasswords',
|
||||||
|
'load_balancer_external_ip_addresses': 'loadBalancerExternalIPAddresses',
|
||||||
|
'load_balancer_internal_ip_addresses': 'loadBalancerInternalIPAddresses',
|
||||||
|
'load_balancer_secure_shell_ports': 'loadBalancerSecureShellPorts',
|
||||||
|
'load_balancer_machine_os_types': 'loadBalancerMachineOSTypes',
|
||||||
|
'load_balancer_machine_os_builds': 'loadBalancerMachineOSBuilds',
|
||||||
|
'machine_os_type': 'machineOSType',
|
||||||
|
'machine_os_image_id': 'machineOSImageId',
|
||||||
|
'machine_os_build': 'machineOSBuild',
|
||||||
|
'storage_policy_id': 'storagePolicyId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
dynamix_rg_id: int | None = None,
|
||||||
|
load_balancer_sep_id: int | None = None,
|
||||||
|
load_balancer_sep_pool: str | None = None,
|
||||||
|
load_balancer_count: int,
|
||||||
|
load_balancer_cpu_count: int | None = None,
|
||||||
|
load_balancer_memory_size: int | None = None,
|
||||||
|
load_balancer_disk_size: int | None = None,
|
||||||
|
load_balancer_gpu_ids: list[int] | None = None,
|
||||||
|
load_balancer_cloud_init: str | None = None,
|
||||||
|
use_custom_external_lb_addresses: bool | None = None,
|
||||||
|
use_custom_internal_lb_addresses: bool | None = None,
|
||||||
|
external_lb_addresses: list[str] | None = None,
|
||||||
|
internal_lb_addresses: list[str] | None = None,
|
||||||
|
enable_custom_hostnames: bool | None = None,
|
||||||
|
load_balancer_hostnames: list[str] | None = None,
|
||||||
|
dynamix_app_id: str | None = None,
|
||||||
|
dynamix_app_secret: str | None = None,
|
||||||
|
dynamix_url: str | None = None,
|
||||||
|
dynamix_ssourl: str | None = None,
|
||||||
|
denergy_runtime_type: DenergyRuntimeType | None = None,
|
||||||
|
domain_resolvers: list[str] | None = None,
|
||||||
|
package_repository: int | None = None,
|
||||||
|
load_balancer_user_usernames: list[str] | None = None,
|
||||||
|
load_balancer_user_passwords: list[str] | None = None,
|
||||||
|
load_balancer_root_usernames: list[str] | None = None,
|
||||||
|
load_balancer_root_passwords: list[str] | None = None,
|
||||||
|
load_balancer_external_ip_addresses: list[str] | None = None,
|
||||||
|
load_balancer_internal_ip_addresses: list[str] | None = None,
|
||||||
|
load_balancer_secure_shell_ports: list[int] | None = None,
|
||||||
|
load_balancer_machine_os_types: list[str] | None = None,
|
||||||
|
load_balancer_machine_os_builds: list[str] | None = None,
|
||||||
|
machine_os_type: str | None = None,
|
||||||
|
machine_os_image_id: int | None = None,
|
||||||
|
machine_os_build: str | None = None,
|
||||||
|
storage_policy_id: int | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DenergyRuntimeType(Enum):
|
||||||
|
CRIO = 'crio'
|
||||||
|
CONTAINERD = 'containerd'
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterAddMastersImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/addMasters'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'dynamix_rg_id': 'dynamixRGId',
|
||||||
|
'master_sep_id': 'masterSEPId',
|
||||||
|
'master_sep_pool': 'masterSEPPool',
|
||||||
|
'master_count': 'masterCount',
|
||||||
|
'master_cpu_count': 'masterCPUCount',
|
||||||
|
'master_memory_size': 'masterMemorySize',
|
||||||
|
'master_disk_size': 'masterDiskSize',
|
||||||
|
'master_gpu_ids': 'masterGpuIds',
|
||||||
|
'master_cloud_init': 'masterCloudInit',
|
||||||
|
'use_custom_master_ip_addresses': 'useCustomMasterIPAddresses',
|
||||||
|
'master_addresses': 'masterAddresses',
|
||||||
|
'enable_custom_hostnames': 'enableCustomHostnames',
|
||||||
|
'master_hostnames': 'masterHostnames',
|
||||||
|
'dynamix_app_id': 'dynamixAppId',
|
||||||
|
'dynamix_app_secret': 'dynamixAppSecret',
|
||||||
|
'dynamix_url': 'dynamixURL',
|
||||||
|
'dynamix_ssourl': 'dynamixSSOURL',
|
||||||
|
'denergy_runtime_type': 'denergyRuntimeType',
|
||||||
|
'domain_resolvers': 'domainResolvers',
|
||||||
|
'kube_container_repository': 'kubeContainerRepository',
|
||||||
|
'package_repository': 'packageRepository',
|
||||||
|
'initial_secure_shell_port': 'initialSecureShellPort',
|
||||||
|
'master_nodes_user_usernames': 'masterNodesUserUsernames',
|
||||||
|
'master_nodes_user_passwords': 'masterNodesUserPasswords',
|
||||||
|
'master_nodes_root_usernames': 'masterNodesRootUsernames',
|
||||||
|
'master_nodes_root_passwords': 'masterNodesRootPasswords',
|
||||||
|
'master_nodes_secure_shell_ports': 'masterNodesSecureShellPorts',
|
||||||
|
'master_nodes_external_ip_adresses': 'masterNodesExternalIPAdresses',
|
||||||
|
'master_nodes_machine_os_types': 'masterNodesMachineOSTypes',
|
||||||
|
'master_nodes_machine_os_builds': 'masterNodesMachineOSBuilds',
|
||||||
|
'machine_os_type': 'machineOSType',
|
||||||
|
'machine_os_image_id': 'machineOSImageId',
|
||||||
|
'machine_os_build': 'machineOSBuild',
|
||||||
|
'storage_policy_id': 'storagePolicyId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
dynamix_rg_id: int | None = None,
|
||||||
|
master_sep_id: int | None = None,
|
||||||
|
master_sep_pool: str | None = None,
|
||||||
|
master_count: int,
|
||||||
|
master_cpu_count: int | None = None,
|
||||||
|
master_memory_size: int | None = None,
|
||||||
|
master_disk_size: int | None = None,
|
||||||
|
master_gpu_ids: list[int] | None = None,
|
||||||
|
master_cloud_init: str | None = None,
|
||||||
|
use_custom_master_ip_addresses: bool | None = None,
|
||||||
|
master_addresses: list[str] | None = None,
|
||||||
|
enable_custom_hostnames: bool | None = None,
|
||||||
|
master_hostnames: list[str] | None = None,
|
||||||
|
dynamix_app_id: str | None = None,
|
||||||
|
dynamix_app_secret: str | None = None,
|
||||||
|
dynamix_url: str | None = None,
|
||||||
|
dynamix_ssourl: str | None = None,
|
||||||
|
denergy_runtime_type: DenergyRuntimeType | None = None,
|
||||||
|
domain_resolvers: list[str] | None = None,
|
||||||
|
kube_container_repository: int | None = None,
|
||||||
|
package_repository: int | None = None,
|
||||||
|
initial_secure_shell_port: int | None = None,
|
||||||
|
master_nodes_user_usernames: list[str] | None = None,
|
||||||
|
master_nodes_user_passwords: list[str] | None = None,
|
||||||
|
master_nodes_root_usernames: list[str] | None = None,
|
||||||
|
master_nodes_root_passwords: list[str] | None = None,
|
||||||
|
master_nodes_secure_shell_ports: list[int] | None = None,
|
||||||
|
master_nodes_external_ip_adresses: list[str] | None = None,
|
||||||
|
master_nodes_machine_os_types: list[str] | None = None,
|
||||||
|
master_nodes_machine_os_builds: list[str] | None = None,
|
||||||
|
machine_os_type: str | None = None,
|
||||||
|
machine_os_image_id: int | None = None,
|
||||||
|
machine_os_build: str | None = None,
|
||||||
|
storage_policy_id: int | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DenergyRuntimeType(Enum):
|
||||||
|
CRIO = 'crio'
|
||||||
|
CONTAINERD = 'containerd'
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterAddPoolVMsImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/addPoolVMs'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'dynamix_rg_id': 'dynamixRGId',
|
||||||
|
'dynamix_sep_id': 'dynamixSEPId',
|
||||||
|
'dynamix_sep_pool': 'dynamixSEPPool',
|
||||||
|
'pool_v_ms_count': 'poolVMsCount',
|
||||||
|
'pool_vmcpu_count': 'poolVMCPUCount',
|
||||||
|
'pool_vm_memory_size': 'poolVMMemorySize',
|
||||||
|
'pool_vm_disk_size': 'poolVMDiskSize',
|
||||||
|
'worker_group_name': 'workerGroupName',
|
||||||
|
'worker_group_id': 'workerGroupId',
|
||||||
|
'dynamix_app_id': 'dynamixAppId',
|
||||||
|
'dynamix_app_secret': 'dynamixAppSecret',
|
||||||
|
'dynamix_url': 'dynamixURL',
|
||||||
|
'dynamix_ssourl': 'dynamixSSOURL',
|
||||||
|
'dynamix_auth_type': 'dynamixAuthType',
|
||||||
|
'dynamix_auth_domain': 'dynamixAuthDomain',
|
||||||
|
'dynamix_username': 'dynamixUsername',
|
||||||
|
'dynamix_password': 'dynamixPassword',
|
||||||
|
'source_operator': 'sourceOperator',
|
||||||
|
'denergy_runtime_type': 'denergyRuntimeType',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
dynamix_rg_id: int,
|
||||||
|
dynamix_sep_id: int,
|
||||||
|
dynamix_sep_pool: str,
|
||||||
|
pool_v_ms_count: int,
|
||||||
|
pool_vmcpu_count: int,
|
||||||
|
pool_vm_memory_size: int,
|
||||||
|
pool_vm_disk_size: int,
|
||||||
|
worker_group_name: str,
|
||||||
|
worker_group_id: int | None = None,
|
||||||
|
dynamix_app_id: str | None = None,
|
||||||
|
dynamix_app_secret: str | None = None,
|
||||||
|
dynamix_url: str | None = None,
|
||||||
|
dynamix_ssourl: str | None = None,
|
||||||
|
dynamix_auth_type: str | None = None,
|
||||||
|
dynamix_auth_domain: str | None = None,
|
||||||
|
dynamix_username: str | None = None,
|
||||||
|
dynamix_password: str | None = None,
|
||||||
|
source_operator: str | None = None,
|
||||||
|
denergy_runtime_type: DenergyRuntimeType | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
113
src/digital_energy_sdk/api/digitalenergy/cluster/add_workers.py
Normal file
113
src/digital_energy_sdk/api/digitalenergy/cluster/add_workers.py
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DenergyRuntimeType(Enum):
|
||||||
|
CRIO = 'crio'
|
||||||
|
CONTAINERD = 'containerd'
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterAddWorkersImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/addWorkers'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'dynamix_rg_id': 'dynamixRGId',
|
||||||
|
'dynamix_sep_id': 'dynamixSEPId',
|
||||||
|
'dynamix_sep_pool': 'dynamixSEPPool',
|
||||||
|
'worker_group_name': 'workerGroupName',
|
||||||
|
'worker_group_id': 'workerGroupId',
|
||||||
|
'worker_count': 'workerCount',
|
||||||
|
'worker_gpu_ids': 'workerGpuIds',
|
||||||
|
'use_custom_worker_ip_addresses': 'useCustomWorkerIPAddresses',
|
||||||
|
'worker_addresses': 'workerAddresses',
|
||||||
|
'enable_custom_hostnames': 'enableCustomHostnames',
|
||||||
|
'worker_hostnames': 'workerHostnames',
|
||||||
|
'dynamix_auth_type': 'dynamixAuthType',
|
||||||
|
'dynamix_auth_domain': 'dynamixAuthDomain',
|
||||||
|
'dynamix_username': 'dynamixUsername',
|
||||||
|
'dynamix_password': 'dynamixPassword',
|
||||||
|
'dynamix_app_id': 'dynamixAppId',
|
||||||
|
'dynamix_app_secret': 'dynamixAppSecret',
|
||||||
|
'dynamix_url': 'dynamixURL',
|
||||||
|
'dynamix_ssourl': 'dynamixSSOURL',
|
||||||
|
'worker_labels': 'workerLabels',
|
||||||
|
'worker_annotations': 'workerAnnotations',
|
||||||
|
'worker_taints': 'workerTaints',
|
||||||
|
'worker_cloud_init': 'workerCloudInit',
|
||||||
|
'source_operator': 'sourceOperator',
|
||||||
|
'denergy_runtime_type': 'denergyRuntimeType',
|
||||||
|
'domain_resolvers': 'domainResolvers',
|
||||||
|
'kube_container_repository': 'kubeContainerRepository',
|
||||||
|
'package_repository': 'packageRepository',
|
||||||
|
'initial_secure_shell_port': 'initialSecureShellPort',
|
||||||
|
'worker_nodes_user_usernames': 'workerNodesUserUsernames',
|
||||||
|
'worker_nodes_user_passwords': 'workerNodesUserPasswords',
|
||||||
|
'worker_nodes_root_usernames': 'workerNodesRootUsernames',
|
||||||
|
'worker_nodes_root_passwords': 'workerNodesRootPasswords',
|
||||||
|
'worker_nodes_secure_shell_ports': 'workerNodesSecureShellPorts',
|
||||||
|
'worker_nodes_external_ip_adresses': 'workerNodesExternalIPAdresses',
|
||||||
|
'worker_nodes_machine_os_types': 'workerNodesMachineOSTypes',
|
||||||
|
'worker_nodes_machine_os_builds': 'workerNodesMachineOSBuilds',
|
||||||
|
'machine_os_type': 'machineOSType',
|
||||||
|
'machine_os_image_id': 'machineOSImageId',
|
||||||
|
'machine_os_build': 'machineOSBuild',
|
||||||
|
'storage_policy_id': 'storagePolicyId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
dynamix_rg_id: int | None = None,
|
||||||
|
dynamix_sep_id: int | None = None,
|
||||||
|
dynamix_sep_pool: str | None = None,
|
||||||
|
worker_group_name: str,
|
||||||
|
worker_group_id: int | None = None,
|
||||||
|
worker_count: int,
|
||||||
|
worker_gpu_ids: list[int] | None = None,
|
||||||
|
use_custom_worker_ip_addresses: bool | None = None,
|
||||||
|
worker_addresses: list[str] | None = None,
|
||||||
|
enable_custom_hostnames: bool | None = None,
|
||||||
|
worker_hostnames: list[str] | None = None,
|
||||||
|
dynamix_auth_type: str | None = None,
|
||||||
|
dynamix_auth_domain: str | None = None,
|
||||||
|
dynamix_username: str | None = None,
|
||||||
|
dynamix_password: str | None = None,
|
||||||
|
dynamix_app_id: str | None = None,
|
||||||
|
dynamix_app_secret: str | None = None,
|
||||||
|
dynamix_url: str | None = None,
|
||||||
|
dynamix_ssourl: str | None = None,
|
||||||
|
worker_labels: list[str] | None = None,
|
||||||
|
worker_annotations: list[str] | None = None,
|
||||||
|
worker_taints: list[str] | None = None,
|
||||||
|
worker_cloud_init: str | None = None,
|
||||||
|
source_operator: str | None = None,
|
||||||
|
denergy_runtime_type: DenergyRuntimeType | None = None,
|
||||||
|
domain_resolvers: list[str] | None = None,
|
||||||
|
kube_container_repository: int | None = None,
|
||||||
|
package_repository: int | None = None,
|
||||||
|
initial_secure_shell_port: int | None = None,
|
||||||
|
worker_nodes_user_usernames: list[str] | None = None,
|
||||||
|
worker_nodes_user_passwords: list[str] | None = None,
|
||||||
|
worker_nodes_root_usernames: list[str] | None = None,
|
||||||
|
worker_nodes_root_passwords: list[str] | None = None,
|
||||||
|
worker_nodes_secure_shell_ports: list[int] | None = None,
|
||||||
|
worker_nodes_external_ip_adresses: list[str] | None = None,
|
||||||
|
worker_nodes_machine_os_types: list[str] | None = None,
|
||||||
|
worker_nodes_machine_os_builds: list[str] | None = None,
|
||||||
|
machine_os_type: str | None = None,
|
||||||
|
machine_os_image_id: int | None = None,
|
||||||
|
machine_os_build: str | None = None,
|
||||||
|
storage_policy_id: int | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
296
src/digital_energy_sdk/api/digitalenergy/cluster/create.py
Normal file
296
src/digital_energy_sdk/api/digitalenergy/cluster/create.py
Normal file
@@ -0,0 +1,296 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class ClusterType(Enum):
|
||||||
|
DYNAMIX = 'dynamix'
|
||||||
|
GENERIC = 'generic'
|
||||||
|
DENERGY = 'denergy'
|
||||||
|
BAREMETAL = 'baremetal'
|
||||||
|
|
||||||
|
|
||||||
|
class DenergyRuntimeType(Enum):
|
||||||
|
CRIO = 'crio'
|
||||||
|
CONTAINERD = 'containerd'
|
||||||
|
|
||||||
|
|
||||||
|
class ContainerNetworkType(Enum):
|
||||||
|
FLANNEL = 'flannel'
|
||||||
|
CALICO = 'calico'
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterCreateImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/create'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_hostname': 'clusterHostname',
|
||||||
|
'cluster_name': 'clusterName',
|
||||||
|
'cluster_type': 'clusterType',
|
||||||
|
'denergy_runtime_type': 'denergyRuntimeType',
|
||||||
|
'dynamix_k8_ci_id': 'dynamixK8CIId',
|
||||||
|
'dynamix_rg_id': 'dynamixRGId',
|
||||||
|
'dynamix_app_id': 'dynamixAppId',
|
||||||
|
'dynamix_app_secret': 'dynamixAppSecret',
|
||||||
|
'dynamix_url': 'dynamixURL',
|
||||||
|
'dynamix_ssourl': 'dynamixSSOURL',
|
||||||
|
'use_dynamix_extnet': 'useDynamixExtnet',
|
||||||
|
'local_network_id': 'localNetworkId',
|
||||||
|
'vins_global_network_id': 'vinsGlobalNetworkId',
|
||||||
|
'global_network_id': 'globalNetworkId',
|
||||||
|
'initial_secure_shell_port': 'initialSecureShellPort',
|
||||||
|
'i_load_balancer_count': 'iLoadBalancerCount',
|
||||||
|
'i_load_balancer_cpu_count': 'iLoadBalancerCPUCount',
|
||||||
|
'i_load_balancer_memory_size': 'iLoadBalancerMemorySize',
|
||||||
|
'i_load_balancer_disk_size': 'iLoadBalancerDiskSize',
|
||||||
|
'i_load_balancer_gpu_ids': 'iLoadBalancerGpuIds',
|
||||||
|
'i_load_balancer_cloud_init': 'iLoadBalancerCloudInit',
|
||||||
|
'use_custom_external_lb_addresses': 'useCustomExternalLBAddresses',
|
||||||
|
'use_custom_internal_lb_addresses': 'useCustomInternalLBAddresses',
|
||||||
|
'external_lb_addresses': 'externalLBAddresses',
|
||||||
|
'internal_lb_addresses': 'internalLBAddresses',
|
||||||
|
'enable_custom_load_balancer_hostnames': 'enableCustomLoadBalancerHostnames',
|
||||||
|
'load_balancer_hostnames': 'loadBalancerHostnames',
|
||||||
|
'load_balancer_user_usernames': 'loadBalancerUserUsernames',
|
||||||
|
'load_balancer_user_passwords': 'loadBalancerUserPasswords',
|
||||||
|
'load_balancer_root_usernames': 'loadBalancerRootUsernames',
|
||||||
|
'load_balancer_root_passwords': 'loadBalancerRootPasswords',
|
||||||
|
'load_balancer_external_ip_addresses': 'loadBalancerExternalIPAddresses',
|
||||||
|
'load_balancer_internal_ip_addresses': 'loadBalancerInternalIPAddresses',
|
||||||
|
'load_balancer_secure_shell_ports': 'loadBalancerSecureShellPorts',
|
||||||
|
'load_balancer_machine_os_types': 'loadBalancerMachineOSTypes',
|
||||||
|
'load_balancer_machine_os_builds': 'loadBalancerMachineOSBuilds',
|
||||||
|
'kube_version': 'kubeVersion',
|
||||||
|
'kube_config': 'kubeConfig',
|
||||||
|
'machine_os_type': 'machineOSType',
|
||||||
|
'machine_os_build': 'machineOSBuild',
|
||||||
|
'machine_provider': 'machineProvider',
|
||||||
|
'machine_os_image_id': 'machineOSImageId',
|
||||||
|
'master_count': 'masterCount',
|
||||||
|
'master_cpu_count': 'masterCPUCount',
|
||||||
|
'master_disk_size': 'masterDiskSize',
|
||||||
|
'master_memory_size': 'masterMemorySize',
|
||||||
|
'master_gpu_ids': 'masterGpuIds',
|
||||||
|
'master_cloud_init': 'masterCloudInit',
|
||||||
|
'use_custom_master_ip_addresses': 'useCustomMasterIPAddresses',
|
||||||
|
'master_addresses': 'masterAddresses',
|
||||||
|
'enable_custom_master_hostnames': 'enableCustomMasterHostnames',
|
||||||
|
'master_hostnames': 'masterHostnames',
|
||||||
|
'master_nodes_user_usernames': 'masterNodesUserUsernames',
|
||||||
|
'master_nodes_user_passwords': 'masterNodesUserPasswords',
|
||||||
|
'master_nodes_root_usernames': 'masterNodesRootUsernames',
|
||||||
|
'master_nodes_root_passwords': 'masterNodesRootPasswords',
|
||||||
|
'master_nodes_secure_shell_ports': 'masterNodesSecureShellPorts',
|
||||||
|
'master_nodes_external_ip_adresses': 'masterNodesExternalIPAdresses',
|
||||||
|
'master_nodes_machine_os_types': 'masterNodesMachineOSTypes',
|
||||||
|
'master_nodes_machine_os_builds': 'masterNodesMachineOSBuilds',
|
||||||
|
'provide_dns': 'provideDNS',
|
||||||
|
'worker_count': 'workerCount',
|
||||||
|
'worker_cpu_count': 'workerCPUCount',
|
||||||
|
'worker_disk_size': 'workerDiskSize',
|
||||||
|
'worker_memory_size': 'workerMemorySize',
|
||||||
|
'worker_gpu_ids': 'workerGpuIds',
|
||||||
|
'use_custom_worker_ip_addresses': 'useCustomWorkerIPAddresses',
|
||||||
|
'worker_addresses': 'workerAddresses',
|
||||||
|
'enable_custom_worker_hostnames': 'enableCustomWorkerHostnames',
|
||||||
|
'worker_hostnames': 'workerHostnames',
|
||||||
|
'worker_nodes_user_usernames': 'workerNodesUserUsernames',
|
||||||
|
'worker_nodes_user_passwords': 'workerNodesUserPasswords',
|
||||||
|
'worker_nodes_root_usernames': 'workerNodesRootUsernames',
|
||||||
|
'worker_nodes_root_passwords': 'workerNodesRootPasswords',
|
||||||
|
'worker_nodes_secure_shell_ports': 'workerNodesSecureShellPorts',
|
||||||
|
'worker_nodes_external_ip_adresses': 'workerNodesExternalIPAdresses',
|
||||||
|
'worker_nodes_machine_os_types': 'workerNodesMachineOSTypes',
|
||||||
|
'worker_nodes_machine_os_builds': 'workerNodesMachineOSBuilds',
|
||||||
|
'worker_cloud_init': 'workerCloudInit',
|
||||||
|
'worker_group_name': 'workerGroupName',
|
||||||
|
'worker_annotations': 'workerAnnotations',
|
||||||
|
'worker_labels': 'workerLabels',
|
||||||
|
'worker_taints': 'workerTaints',
|
||||||
|
'ext_virtual_address': 'extVirtualAddress',
|
||||||
|
'int_virtual_address': 'intVirtualAddress',
|
||||||
|
'kube_container_repository': 'kubeContainerRepository',
|
||||||
|
'app_container_repository': 'appContainerRepository',
|
||||||
|
'package_repository': 'packageRepository',
|
||||||
|
'chart_repository': 'chartRepository',
|
||||||
|
'certificate_key': 'certificateKey',
|
||||||
|
'audit_enable': 'auditEnable',
|
||||||
|
'audit_log_max_backup': 'auditLogMaxBackup',
|
||||||
|
'audit_log_max_size': 'auditLogMaxSize',
|
||||||
|
'audit_log_max_age': 'auditLogMaxAge',
|
||||||
|
'audit_policy': 'auditPolicy',
|
||||||
|
'dynamix_sep_id': 'dynamixSEPId',
|
||||||
|
'dynamix_sep_pool': 'dynamixSEPPool',
|
||||||
|
'balancers_dynamix_sep_id': 'balancersDynamixSEPId',
|
||||||
|
'balancers_dynamix_sep_pool': 'balancersDynamixSEPPool',
|
||||||
|
'masters_dynamix_sep_id': 'mastersDynamixSEPId',
|
||||||
|
'masters_dynamix_sep_pool': 'mastersDynamixSEPPool',
|
||||||
|
'workers_dynamix_sep_id': 'workersDynamixSEPId',
|
||||||
|
'workers_dynamix_sep_pool': 'workersDynamixSEPPool',
|
||||||
|
'container_network_type': 'containerNetworkType',
|
||||||
|
'custom_mtu': 'customMTU',
|
||||||
|
'save_computes_on_failed_k8_s_creation': 'saveComputesOnFailedK8SCreation',
|
||||||
|
'domain_resolvers': 'domainResolvers',
|
||||||
|
'dynamix_auth_type': 'dynamixAuthType',
|
||||||
|
'dynamix_auth_domain': 'dynamixAuthDomain',
|
||||||
|
'dynamix_username': 'dynamixUsername',
|
||||||
|
'dynamix_password': 'dynamixPassword',
|
||||||
|
'install_trivy': 'installTrivy',
|
||||||
|
'install_kyverno': 'installKyverno',
|
||||||
|
'install_rbac_manager': 'installRbacManager',
|
||||||
|
'install_pod_logger': 'installPodLogger',
|
||||||
|
'install_criobox': 'installCriobox',
|
||||||
|
'install_monitoring': 'installMonitoring',
|
||||||
|
'install_csi_dynamix': 'installCsiDynamix',
|
||||||
|
'install_ess': 'installEss',
|
||||||
|
'ess_auth_token': 'essAuthToken',
|
||||||
|
'certificate_validity_before': 'certificateValidityBefore',
|
||||||
|
'storage_policy_id': 'storagePolicyId',
|
||||||
|
'certificate_issuer_id': 'certificateIssuerId',
|
||||||
|
'create_cluster_template': 'createClusterTemplate',
|
||||||
|
'cluster_template_name': 'clusterTemplateName',
|
||||||
|
'cluster_template_description': 'clusterTemplateDescription',
|
||||||
|
'shared_cluster_template': 'sharedClusterTemplate',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_hostname: str | None = None,
|
||||||
|
cluster_name: str | None = None,
|
||||||
|
description: str | None = None,
|
||||||
|
cluster_type: ClusterType,
|
||||||
|
denergy_runtime_type: DenergyRuntimeType | None = None,
|
||||||
|
dynamix_k8_ci_id: int | None = None,
|
||||||
|
dynamix_rg_id: int | None = None,
|
||||||
|
dynamix_app_id: str | None = None,
|
||||||
|
dynamix_app_secret: str | None = None,
|
||||||
|
dynamix_url: str | None = None,
|
||||||
|
dynamix_ssourl: str | None = None,
|
||||||
|
use_dynamix_extnet: bool | None = None,
|
||||||
|
local_network_id: int | None = None,
|
||||||
|
vins_global_network_id: int | None = None,
|
||||||
|
global_network_id: int | None = None,
|
||||||
|
initial_secure_shell_port: int = 22,
|
||||||
|
i_load_balancer_count: int = 1,
|
||||||
|
i_load_balancer_cpu_count: int = 4,
|
||||||
|
i_load_balancer_memory_size: int = 4096,
|
||||||
|
i_load_balancer_disk_size: int = 10,
|
||||||
|
i_load_balancer_gpu_ids: list[int] | None = None,
|
||||||
|
i_load_balancer_cloud_init: str | None = None,
|
||||||
|
use_custom_external_lb_addresses: bool | None = None,
|
||||||
|
use_custom_internal_lb_addresses: bool | None = None,
|
||||||
|
external_lb_addresses: list[str] | None = None,
|
||||||
|
internal_lb_addresses: list[str] | None = None,
|
||||||
|
enable_custom_load_balancer_hostnames: bool | None = None,
|
||||||
|
load_balancer_hostnames: list[str] | None = None,
|
||||||
|
load_balancer_user_usernames: list[str] | None = None,
|
||||||
|
load_balancer_user_passwords: list[str] | None = None,
|
||||||
|
load_balancer_root_usernames: list[str] | None = None,
|
||||||
|
load_balancer_root_passwords: list[str] | None = None,
|
||||||
|
load_balancer_external_ip_addresses: list[str] | None = None,
|
||||||
|
load_balancer_internal_ip_addresses: list[str] | None = None,
|
||||||
|
load_balancer_secure_shell_ports: list[int] | None = None,
|
||||||
|
load_balancer_machine_os_types: list[str] | None = None,
|
||||||
|
load_balancer_machine_os_builds: list[str] | None = None,
|
||||||
|
kube_version: str | None = None,
|
||||||
|
kube_config: str | None = None,
|
||||||
|
machine_os_type: str | None = None,
|
||||||
|
machine_os_build: str | None = None,
|
||||||
|
machine_provider: str | None = None,
|
||||||
|
machine_os_image_id: int | None = None,
|
||||||
|
master_count: int = 2,
|
||||||
|
master_cpu_count: int = 4,
|
||||||
|
master_disk_size: int = 8,
|
||||||
|
master_memory_size: int = 4096,
|
||||||
|
master_gpu_ids: list[int] | None = None,
|
||||||
|
master_cloud_init: str | None = None,
|
||||||
|
use_custom_master_ip_addresses: bool | None = None,
|
||||||
|
master_addresses: list[str] | None = None,
|
||||||
|
enable_custom_master_hostnames: bool | None = None,
|
||||||
|
master_hostnames: list[str] | None = None,
|
||||||
|
master_nodes_user_usernames: list[str] | None = None,
|
||||||
|
master_nodes_user_passwords: list[str] | None = None,
|
||||||
|
master_nodes_root_usernames: list[str] | None = None,
|
||||||
|
master_nodes_root_passwords: list[str] | None = None,
|
||||||
|
master_nodes_secure_shell_ports: list[int] | None = None,
|
||||||
|
master_nodes_external_ip_adresses: list[str] | None = None,
|
||||||
|
master_nodes_machine_os_types: list[str] | None = None,
|
||||||
|
master_nodes_machine_os_builds: list[str] | None = None,
|
||||||
|
provide_dns: bool | None = None,
|
||||||
|
worker_count: int = 3,
|
||||||
|
worker_cpu_count: int = 6,
|
||||||
|
worker_disk_size: int = 8,
|
||||||
|
worker_memory_size: int = 8192,
|
||||||
|
worker_gpu_ids: list[int] | None = None,
|
||||||
|
use_custom_worker_ip_addresses: bool | None = None,
|
||||||
|
worker_addresses: list[str] | None = None,
|
||||||
|
enable_custom_worker_hostnames: bool | None = None,
|
||||||
|
worker_hostnames: list[str] | None = None,
|
||||||
|
worker_nodes_user_usernames: list[str] | None = None,
|
||||||
|
worker_nodes_user_passwords: list[str] | None = None,
|
||||||
|
worker_nodes_root_usernames: list[str] | None = None,
|
||||||
|
worker_nodes_root_passwords: list[str] | None = None,
|
||||||
|
worker_nodes_secure_shell_ports: list[int] | None = None,
|
||||||
|
worker_nodes_external_ip_adresses: list[str] | None = None,
|
||||||
|
worker_nodes_machine_os_types: list[str] | None = None,
|
||||||
|
worker_nodes_machine_os_builds: list[str] | None = None,
|
||||||
|
worker_cloud_init: str | None = None,
|
||||||
|
worker_group_name: str | None = None,
|
||||||
|
worker_annotations: list[str] | None = None,
|
||||||
|
worker_labels: list[str] | None = None,
|
||||||
|
worker_taints: list[str] | None = None,
|
||||||
|
ext_virtual_address: str | None = None,
|
||||||
|
int_virtual_address: str | None = None,
|
||||||
|
kube_container_repository: int | None = None,
|
||||||
|
app_container_repository: int | None = None,
|
||||||
|
package_repository: int | None = None,
|
||||||
|
chart_repository: int | None = None,
|
||||||
|
certificate_key: str | None = None,
|
||||||
|
audit_enable: bool | None = None,
|
||||||
|
audit_log_max_backup: int | None = None,
|
||||||
|
audit_log_max_size: int | None = None,
|
||||||
|
audit_log_max_age: int | None = None,
|
||||||
|
audit_policy: str | None = None,
|
||||||
|
dynamix_sep_id: int | None = None,
|
||||||
|
dynamix_sep_pool: str | None = None,
|
||||||
|
balancers_dynamix_sep_id: int | None = None,
|
||||||
|
balancers_dynamix_sep_pool: str | None = None,
|
||||||
|
masters_dynamix_sep_id: int | None = None,
|
||||||
|
masters_dynamix_sep_pool: str | None = None,
|
||||||
|
workers_dynamix_sep_id: int | None = None,
|
||||||
|
workers_dynamix_sep_pool: str | None = None,
|
||||||
|
container_network_type: ContainerNetworkType | None = None,
|
||||||
|
custom_mtu: int | None = None,
|
||||||
|
save_computes_on_failed_k8_s_creation: bool | None = None,
|
||||||
|
domain_resolvers: list[str] | None = None,
|
||||||
|
dynamix_auth_type: str | None = None,
|
||||||
|
dynamix_auth_domain: str | None = None,
|
||||||
|
dynamix_username: str | None = None,
|
||||||
|
dynamix_password: str | None = None,
|
||||||
|
install_trivy: bool | None = None,
|
||||||
|
install_kyverno: bool | None = None,
|
||||||
|
install_rbac_manager: bool | None = None,
|
||||||
|
install_pod_logger: bool | None = None,
|
||||||
|
install_criobox: bool | None = None,
|
||||||
|
install_monitoring: bool | None = None,
|
||||||
|
install_csi_dynamix: bool | None = None,
|
||||||
|
install_ess: bool | None = None,
|
||||||
|
ess_auth_token: str | None = None,
|
||||||
|
certificate_validity_before: str | None = None,
|
||||||
|
storage_policy_id: int | None = None,
|
||||||
|
certificate_issuer_id: int | None = None,
|
||||||
|
create_cluster_template: bool | None = None,
|
||||||
|
cluster_template_name: str | None = None,
|
||||||
|
cluster_template_description: str | None = None,
|
||||||
|
shared_cluster_template: bool | None = None,
|
||||||
|
) -> _results.ClusterTaskCreationResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterCreateFromTemplateImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/createFromTemplate'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_template_id': 'clusterTemplateId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_template_id: int,
|
||||||
|
descriprion: str | None = None,
|
||||||
|
) -> _results.ClusterTaskCreationResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterCreateWorkerGroupImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/createWorkerGroup'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'worker_group_name': 'workerGroupName',
|
||||||
|
'worker_count': 'workerCount',
|
||||||
|
'worker_gpu_ids': 'workerGpuIds',
|
||||||
|
'use_custom_worker_ip_addresses': 'useCustomWorkerIPAddresses',
|
||||||
|
'worker_addresses': 'workerAddresses',
|
||||||
|
'enable_custom_hostnames': 'enableCustomHostnames',
|
||||||
|
'worker_hostnames': 'workerHostnames',
|
||||||
|
'worker_cpu_count': 'workerCPUCount',
|
||||||
|
'worker_memory_size': 'workerMemorySize',
|
||||||
|
'worker_disk_size': 'workerDiskSize',
|
||||||
|
'kube_version': 'kubeVersion',
|
||||||
|
'runtime_type': 'runtimeType',
|
||||||
|
'enable_autoscaling': 'enableAutoscaling',
|
||||||
|
'max_worker_count': 'maxWorkerCount',
|
||||||
|
'min_worker_count': 'minWorkerCount',
|
||||||
|
'pool_v_ms_count': 'poolVMsCount',
|
||||||
|
'machine_provider': 'machineProvider',
|
||||||
|
'machine_os_type': 'machineOSType',
|
||||||
|
'machine_os_image_id': 'machineOSImageId',
|
||||||
|
'dynamix_app_id': 'dynamixAppId',
|
||||||
|
'dynamix_app_secret': 'dynamixAppSecret',
|
||||||
|
'dynamix_url': 'dynamixURL',
|
||||||
|
'dynamix_ssourl': 'dynamixSSOURL',
|
||||||
|
'dynamix_auth_type': 'dynamixAuthType',
|
||||||
|
'dynamix_auth_domain': 'dynamixAuthDomain',
|
||||||
|
'dynamix_username': 'dynamixUsername',
|
||||||
|
'dynamix_password': 'dynamixPassword',
|
||||||
|
'dynamix_rg_id': 'dynamixRGId',
|
||||||
|
'dynamix_sep_id': 'dynamixSEPId',
|
||||||
|
'dynamix_sep_pool': 'dynamixSEPPool',
|
||||||
|
'worker_annotations': 'workerAnnotations',
|
||||||
|
'worker_labels': 'workerLabels',
|
||||||
|
'worker_taints': 'workerTaints',
|
||||||
|
'worker_cloud_init': 'workerCloudInit',
|
||||||
|
'domain_resolvers': 'domainResolvers',
|
||||||
|
'kube_container_repository': 'kubeContainerRepository',
|
||||||
|
'app_container_repository': 'appContainerRepository',
|
||||||
|
'package_repository': 'packageRepository',
|
||||||
|
'chart_repository': 'chartRepository',
|
||||||
|
'worker_nodes_user_usernames': 'workerNodesUserUsernames',
|
||||||
|
'worker_nodes_user_passwords': 'workerNodesUserPasswords',
|
||||||
|
'worker_nodes_root_usernames': 'workerNodesRootUsernames',
|
||||||
|
'worker_nodes_root_passwords': 'workerNodesRootPasswords',
|
||||||
|
'worker_nodes_secure_shell_ports': 'workerNodesSecureShellPorts',
|
||||||
|
'worker_nodes_external_ip_adresses': 'workerNodesExternalIPAdresses',
|
||||||
|
'worker_nodes_machine_os_types': 'workerNodesMachineOSTypes',
|
||||||
|
'worker_nodes_machine_os_builds': 'workerNodesMachineOSBuilds',
|
||||||
|
'storage_policy_id': 'storagePolicyId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
worker_group_name: str,
|
||||||
|
worker_count: int | None = None,
|
||||||
|
worker_gpu_ids: list[int] | None = None,
|
||||||
|
use_custom_worker_ip_addresses: bool | None = None,
|
||||||
|
worker_addresses: list[str] | None = None,
|
||||||
|
enable_custom_hostnames: bool | None = None,
|
||||||
|
worker_hostnames: list[str] | None = None,
|
||||||
|
worker_cpu_count: int | None = None,
|
||||||
|
worker_memory_size: int | None = None,
|
||||||
|
worker_disk_size: int | None = None,
|
||||||
|
kube_version: str | None = None,
|
||||||
|
runtime_type: str | None = None,
|
||||||
|
enable_autoscaling: bool | None = None,
|
||||||
|
max_worker_count: int | None = None,
|
||||||
|
min_worker_count: int | None = None,
|
||||||
|
pool_v_ms_count: int | None = None,
|
||||||
|
machine_provider: str | None = None,
|
||||||
|
machine_os_type: str | None = None,
|
||||||
|
machine_os_image_id: int | None = None,
|
||||||
|
dynamix_app_id: str | None = None,
|
||||||
|
dynamix_app_secret: str | None = None,
|
||||||
|
dynamix_url: str | None = None,
|
||||||
|
dynamix_ssourl: str | None = None,
|
||||||
|
dynamix_auth_type: str | None = None,
|
||||||
|
dynamix_auth_domain: str | None = None,
|
||||||
|
dynamix_username: str | None = None,
|
||||||
|
dynamix_password: str | None = None,
|
||||||
|
dynamix_rg_id: int | None = None,
|
||||||
|
dynamix_sep_id: int | None = None,
|
||||||
|
dynamix_sep_pool: str | None = None,
|
||||||
|
worker_annotations: list[str] | None = None,
|
||||||
|
worker_labels: list[str] | None = None,
|
||||||
|
worker_taints: list[str] | None = None,
|
||||||
|
worker_cloud_init: str | None = None,
|
||||||
|
domain_resolvers: list[str] | None = None,
|
||||||
|
kube_container_repository: int | None = None,
|
||||||
|
app_container_repository: int | None = None,
|
||||||
|
package_repository: int | None = None,
|
||||||
|
chart_repository: int | None = None,
|
||||||
|
worker_nodes_user_usernames: list[str] | None = None,
|
||||||
|
worker_nodes_user_passwords: list[str] | None = None,
|
||||||
|
worker_nodes_root_usernames: list[str] | None = None,
|
||||||
|
worker_nodes_root_passwords: list[str] | None = None,
|
||||||
|
worker_nodes_secure_shell_ports: list[int] | None = None,
|
||||||
|
worker_nodes_external_ip_adresses: list[str] | None = None,
|
||||||
|
worker_nodes_machine_os_types: list[str] | None = None,
|
||||||
|
worker_nodes_machine_os_builds: list[str] | None = None,
|
||||||
|
storage_policy_id: int | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
43
src/digital_energy_sdk/api/digitalenergy/cluster/delete.py
Normal file
43
src/digital_energy_sdk/api/digitalenergy/cluster/delete.py
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterDeleteImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/delete'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'delete_cluster_record': 'deleteClusterRecord',
|
||||||
|
'dynamix_app_id': 'dynamixAppId',
|
||||||
|
'dynamix_app_secret': 'dynamixAppSecret',
|
||||||
|
'dynamix_url': 'dynamixURL',
|
||||||
|
'dynamix_ssourl': 'dynamixSSOURL',
|
||||||
|
'dynamix_auth_type': 'dynamixAuthType',
|
||||||
|
'dynamix_auth_domain': 'dynamixAuthDomain',
|
||||||
|
'dynamix_username': 'dynamixUsername',
|
||||||
|
'dynamix_password': 'dynamixPassword',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
delete_cluster_record: bool | None = None,
|
||||||
|
dynamix_app_id: str | None = None,
|
||||||
|
dynamix_app_secret: str | None = None,
|
||||||
|
dynamix_url: str | None = None,
|
||||||
|
dynamix_ssourl: str | None = None,
|
||||||
|
dynamix_auth_type: str | None = None,
|
||||||
|
dynamix_auth_domain: str | None = None,
|
||||||
|
dynamix_username: str | None = None,
|
||||||
|
dynamix_password: str | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterDeleteLoadBalancersImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/deleteLoadBalancers'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'load_balancer_ids': 'loadBalancerIds',
|
||||||
|
'delete_load_balancers_record': 'deleteLoadBalancersRecord',
|
||||||
|
'dynamix_app_id': 'dynamixAppId',
|
||||||
|
'dynamix_app_secret': 'dynamixAppSecret',
|
||||||
|
'dynamix_url': 'dynamixURL',
|
||||||
|
'dynamix_ssourl': 'dynamixSSOURL',
|
||||||
|
'dynamix_auth_type': 'dynamixAuthType',
|
||||||
|
'dynamix_auth_domain': 'dynamixAuthDomain',
|
||||||
|
'dynamix_username': 'dynamixUsername',
|
||||||
|
'dynamix_password': 'dynamixPassword',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
load_balancer_ids: list[int] | None = None,
|
||||||
|
delete_load_balancers_record: bool | None = None,
|
||||||
|
dynamix_app_id: str | None = None,
|
||||||
|
dynamix_app_secret: str | None = None,
|
||||||
|
dynamix_url: str | None = None,
|
||||||
|
dynamix_ssourl: str | None = None,
|
||||||
|
dynamix_auth_type: str | None = None,
|
||||||
|
dynamix_auth_domain: str | None = None,
|
||||||
|
dynamix_username: str | None = None,
|
||||||
|
dynamix_password: str | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterDeleteMastersImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/deleteMasters'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'master_ids': 'masterIds',
|
||||||
|
'delete_masters_record': 'deleteMastersRecord',
|
||||||
|
'force_delete': 'forceDelete',
|
||||||
|
'dynamix_app_id': 'dynamixAppId',
|
||||||
|
'dynamix_app_secret': 'dynamixAppSecret',
|
||||||
|
'dynamix_url': 'dynamixURL',
|
||||||
|
'dynamix_ssourl': 'dynamixSSOURL',
|
||||||
|
'dynamix_auth_type': 'dynamixAuthType',
|
||||||
|
'dynamix_auth_domain': 'dynamixAuthDomain',
|
||||||
|
'dynamix_username': 'dynamixUsername',
|
||||||
|
'dynamix_password': 'dynamixPassword',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
master_ids: list[int] | None = None,
|
||||||
|
delete_masters_record: bool | None = None,
|
||||||
|
force_delete: bool | None = None,
|
||||||
|
dynamix_app_id: str | None = None,
|
||||||
|
dynamix_app_secret: str | None = None,
|
||||||
|
dynamix_url: str | None = None,
|
||||||
|
dynamix_ssourl: str | None = None,
|
||||||
|
dynamix_auth_type: str | None = None,
|
||||||
|
dynamix_auth_domain: str | None = None,
|
||||||
|
dynamix_username: str | None = None,
|
||||||
|
dynamix_password: str | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterDeletePoolVMsImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/deletePoolVMs'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'pool_vm_ids': 'poolVMIds',
|
||||||
|
'worker_group_name': 'workerGroupName',
|
||||||
|
'worker_group_id': 'workerGroupId',
|
||||||
|
'delete_pool_v_ms_record': 'deletePoolVMsRecord',
|
||||||
|
'dynamix_app_id': 'dynamixAppId',
|
||||||
|
'dynamix_app_secret': 'dynamixAppSecret',
|
||||||
|
'dynamix_url': 'dynamixURL',
|
||||||
|
'dynamix_ssourl': 'dynamixSSOURL',
|
||||||
|
'dynamix_auth_type': 'dynamixAuthType',
|
||||||
|
'dynamix_auth_domain': 'dynamixAuthDomain',
|
||||||
|
'dynamix_username': 'dynamixUsername',
|
||||||
|
'dynamix_password': 'dynamixPassword',
|
||||||
|
'source_operator': 'sourceOperator',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int | None = None,
|
||||||
|
pool_vm_ids: list[int] | None = None,
|
||||||
|
worker_group_name: str | None = None,
|
||||||
|
worker_group_id: int | None = None,
|
||||||
|
delete_pool_v_ms_record: bool | None = None,
|
||||||
|
dynamix_app_id: str | None = None,
|
||||||
|
dynamix_app_secret: str | None = None,
|
||||||
|
dynamix_url: str | None = None,
|
||||||
|
dynamix_ssourl: str | None = None,
|
||||||
|
dynamix_auth_type: str | None = None,
|
||||||
|
dynamix_auth_domain: str | None = None,
|
||||||
|
dynamix_username: str | None = None,
|
||||||
|
dynamix_password: str | None = None,
|
||||||
|
source_operator: str | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterDeleteWorkerGroupImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/deleteWorkerGroup'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'worker_group_name': 'workerGroupName',
|
||||||
|
'worker_group_id': 'workerGroupID',
|
||||||
|
'dynamix_auth_type': 'dynamixAuthType',
|
||||||
|
'dynamix_auth_domain': 'dynamixAuthDomain',
|
||||||
|
'dynamix_username': 'dynamixUsername',
|
||||||
|
'dynamix_password': 'dynamixPassword',
|
||||||
|
'dynamix_app_id': 'dynamixAppId',
|
||||||
|
'dynamix_app_secret': 'dynamixAppSecret',
|
||||||
|
'dynamix_url': 'dynamixURL',
|
||||||
|
'dynamix_ssourl': 'dynamixSSOURL',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int | None = None,
|
||||||
|
worker_group_name: str | None = None,
|
||||||
|
worker_group_id: int | None = None,
|
||||||
|
dynamix_auth_type: str | None = None,
|
||||||
|
dynamix_auth_domain: str | None = None,
|
||||||
|
dynamix_username: str | None = None,
|
||||||
|
dynamix_password: str | None = None,
|
||||||
|
dynamix_app_id: str | None = None,
|
||||||
|
dynamix_app_secret: str | None = None,
|
||||||
|
dynamix_url: str | None = None,
|
||||||
|
dynamix_ssourl: str | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterDeleteWorkersImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/deleteWorkers'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'worker_ids': 'workerIds',
|
||||||
|
'worker_group_name': 'workerGroupName',
|
||||||
|
'worker_group_id': 'workerGroupId',
|
||||||
|
'delete_workers_record': 'deleteWorkersRecord',
|
||||||
|
'dynamix_auth_type': 'dynamixAuthType',
|
||||||
|
'dynamix_auth_domain': 'dynamixAuthDomain',
|
||||||
|
'dynamix_username': 'dynamixUsername',
|
||||||
|
'dynamix_password': 'dynamixPassword',
|
||||||
|
'dynamix_app_id': 'dynamixAppId',
|
||||||
|
'dynamix_app_secret': 'dynamixAppSecret',
|
||||||
|
'dynamix_url': 'dynamixURL',
|
||||||
|
'dynamix_ssourl': 'dynamixSSOURL',
|
||||||
|
'source_operator': 'sourceOperator',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
worker_ids: list[int] | None = None,
|
||||||
|
worker_group_name: str | None = None,
|
||||||
|
worker_group_id: int | None = None,
|
||||||
|
delete_workers_record: bool | None = None,
|
||||||
|
dynamix_auth_type: str | None = None,
|
||||||
|
dynamix_auth_domain: str | None = None,
|
||||||
|
dynamix_username: str | None = None,
|
||||||
|
dynamix_password: str | None = None,
|
||||||
|
dynamix_app_id: str | None = None,
|
||||||
|
dynamix_app_secret: str | None = None,
|
||||||
|
dynamix_url: str | None = None,
|
||||||
|
dynamix_ssourl: str | None = None,
|
||||||
|
source_operator: str | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
64
src/digital_energy_sdk/api/digitalenergy/cluster/describe.py
Normal file
64
src/digital_energy_sdk/api/digitalenergy/cluster/describe.py
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class BriefsListItem(_ResultModel):
|
||||||
|
done: bool | None = Field(validation_alias='done', default=None)
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
node_id: int | None = Field(validation_alias='nodeId', default=None)
|
||||||
|
operation: str | None = Field(validation_alias='operation', default=None)
|
||||||
|
report_id: int | None = Field(validation_alias='reportId', default=None)
|
||||||
|
start_timestamp: str | None = Field(validation_alias='startTimestamp', default=None)
|
||||||
|
stop_timestamp: str | None = Field(validation_alias='stopTimestamp', default=None)
|
||||||
|
subject_id: int | None = Field(validation_alias='subjectId', default=None)
|
||||||
|
total_fail: int | None = Field(validation_alias='totalFail', default=None)
|
||||||
|
total_info: int | None = Field(validation_alias='totalInfo', default=None)
|
||||||
|
total_pass: int | None = Field(validation_alias='totalPass', default=None)
|
||||||
|
total_warn: int | None = Field(validation_alias='totalWarn', default=None)
|
||||||
|
verification_type: str | None = Field(validation_alias='verificationType', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class VerificationBriefsItem(_ResultModel):
|
||||||
|
briefs_list: list[BriefsListItem] | None = Field(validation_alias='briefsList', default=None)
|
||||||
|
task_brief: _results.DelogicComtypePrtypeTaskBrief | None = Field(validation_alias='taskBrief', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
incomplete_verification_task_briefs: list[_results.DelogicComtypePrtypeTaskBrief] | None = Field(validation_alias='incompleteVerificationTaskBriefs', default=None)
|
||||||
|
task_briefs: list[_results.DelogicComtypePrtypeTaskBrief] | None = Field(validation_alias='taskBriefs', default=None)
|
||||||
|
verification_briefs: list[VerificationBriefsItem] | None = Field(validation_alias='verificationBriefs', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterDescribeResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterDescribeImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/describe'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'describe_tasks': 'describeTasks',
|
||||||
|
'describe_verifications': 'describeVerifications',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
describe_tasks: bool | None = None,
|
||||||
|
describe_verifications: bool | None = None,
|
||||||
|
) -> DigitalenergyClusterDescribeResult:
|
||||||
|
raise NotImplementedError
|
||||||
204
src/digital_energy_sdk/api/digitalenergy/cluster/get.py
Normal file
204
src/digital_energy_sdk/api/digitalenergy/cluster/get.py
Normal file
@@ -0,0 +1,204 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DynamixVersion(_ResultModel):
|
||||||
|
major: int | None = Field(validation_alias='major', default=None)
|
||||||
|
minor: int | None = Field(validation_alias='minor', default=None)
|
||||||
|
patch: int | None = Field(validation_alias='patch', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Cluster(_ResultModel):
|
||||||
|
app_container_repository: str | None = Field(validation_alias='appContainerRepository', default=None)
|
||||||
|
audit_enabled: bool | None = Field(validation_alias='auditEnabled', default=None)
|
||||||
|
certificate_key: str | None = Field(validation_alias='certificateKey', default=None)
|
||||||
|
certificate_validity_before: str | None = Field(validation_alias='certificateValidityBefore', default=None)
|
||||||
|
container_network_type: str | None = Field(validation_alias='containerNetworkType', default=None)
|
||||||
|
creation_date: str | None = Field(validation_alias='creationDate', default=None)
|
||||||
|
creation_error: str | None = Field(validation_alias='creationError', default=None)
|
||||||
|
custom_mtu: int | None = Field(validation_alias='customMTU', default=None)
|
||||||
|
denergy_id: int | None = Field(validation_alias='denergyId', default=None)
|
||||||
|
denergy_name: str | None = Field(validation_alias='denergyName', default=None)
|
||||||
|
denergy_status: str | None = Field(validation_alias='denergyStatus', default=None)
|
||||||
|
description: str | None = Field(validation_alias='description', default=None)
|
||||||
|
description_status: dict[Any, Any] | None = Field(validation_alias='descriptionStatus', default=None)
|
||||||
|
destroying_date: str | None = Field(validation_alias='destroyingDate', default=None)
|
||||||
|
destroying_error: str | None = Field(validation_alias='destroyingError', default=None)
|
||||||
|
dns_domain: str | None = Field(validation_alias='dnsDomain', default=None)
|
||||||
|
domain_resolvers: list[str] | None = Field(validation_alias='domainResolvers', default=None)
|
||||||
|
dynamix_ci_id: int | None = Field(validation_alias='dynamixCIId', default=None)
|
||||||
|
dynamix_create_task_id: str | None = Field(validation_alias='dynamixCreateTaskId', default=None)
|
||||||
|
dynamix_id: int | None = Field(validation_alias='dynamixId', default=None)
|
||||||
|
dynamix_k8_ci_id: int | None = Field(validation_alias='dynamixK8CIId', default=None)
|
||||||
|
dynamix_owner_id: int | None = Field(validation_alias='dynamixOwnerId', default=None)
|
||||||
|
dynamix_rg_id: int | None = Field(validation_alias='dynamixRGId', default=None)
|
||||||
|
dynamix_sep_id: int | None = Field(validation_alias='dynamixSEPId', default=None)
|
||||||
|
dynamix_sep_pool: str | None = Field(validation_alias='dynamixSEPPool', default=None)
|
||||||
|
dynamix_status: str | None = Field(validation_alias='dynamixStatus', default=None)
|
||||||
|
dynamix_tech_status: str | None = Field(validation_alias='dynamixTechStatus', default=None)
|
||||||
|
dynamix_url: str | None = Field(validation_alias='dynamixURL', default=None)
|
||||||
|
dynamix_version: DynamixVersion | None = Field(validation_alias='dynamixVersion', default=None)
|
||||||
|
encrypted: bool | None = Field(validation_alias='encrypted', default=None)
|
||||||
|
ess_auth_token: str | None = Field(validation_alias='essAuthToken', default=None)
|
||||||
|
ext_virtual_address: str | None = Field(validation_alias='extVirtualAddress', default=None)
|
||||||
|
ext_virtual_address_id: int | None = Field(validation_alias='extVirtualAddressId', default=None)
|
||||||
|
global_network_id: int | None = Field(validation_alias='globalNetworkId', default=None)
|
||||||
|
i_load_balancer_ids: list[int] | None = Field(validation_alias='iLoadBalancerIds', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
initial_dynamix_sep_id: int | None = Field(validation_alias='initialDynamixSEPId', default=None)
|
||||||
|
initial_dynamix_sep_pool: str | None = Field(validation_alias='initialDynamixSEPPool', default=None)
|
||||||
|
initial_machine_os_build: str | None = Field(validation_alias='initialMachineOSBuild', default=None)
|
||||||
|
initial_machine_os_image_id: int | None = Field(validation_alias='initialMachineOSImageId', default=None)
|
||||||
|
initial_machine_os_type: str | None = Field(validation_alias='initialMachineOSType', default=None)
|
||||||
|
initial_machine_provider: str | None = Field(validation_alias='initialMachineProvider', default=None)
|
||||||
|
initial_runtime_type: str | None = Field(validation_alias='initialRuntimeType', default=None)
|
||||||
|
initial_secure_shell_port: int | None = Field(validation_alias='initialSecureShellPort', default=None)
|
||||||
|
installed_autoscaler: bool | None = Field(validation_alias='installedAutoscaler', default=None)
|
||||||
|
installed_criobox: bool | None = Field(validation_alias='installedCriobox', default=None)
|
||||||
|
installed_csi_dynamix: bool | None = Field(validation_alias='installedCsiDynamix', default=None)
|
||||||
|
installed_ess: bool | None = Field(validation_alias='installedEss', default=None)
|
||||||
|
installed_integagent: bool | None = Field(validation_alias='installedIntegagent', default=None)
|
||||||
|
installed_kyverno: bool | None = Field(validation_alias='installedKyverno', default=None)
|
||||||
|
installed_metric_server: bool | None = Field(validation_alias='installedMetricServer', default=None)
|
||||||
|
installed_monitoring: bool | None = Field(validation_alias='installedMonitoring', default=None)
|
||||||
|
installed_pod_logger: bool | None = Field(validation_alias='installedPodLogger', default=None)
|
||||||
|
installed_rbac_manager: bool | None = Field(validation_alias='installedRbacManager', default=None)
|
||||||
|
installed_servchecker: bool | None = Field(validation_alias='installedServchecker', default=None)
|
||||||
|
installed_trivy: bool | None = Field(validation_alias='installedTrivy', default=None)
|
||||||
|
int_virtual_address: str | None = Field(validation_alias='intVirtualAddress', default=None)
|
||||||
|
int_virtual_address_id: int | None = Field(validation_alias='intVirtualAddressId', default=None)
|
||||||
|
kube_addresses: list[str] | None = Field(validation_alias='kubeAddresses', default=None)
|
||||||
|
kube_config: str | None = Field(validation_alias='kubeConfig', default=None)
|
||||||
|
kube_container_repository: str | None = Field(validation_alias='kubeContainerRepository', default=None)
|
||||||
|
kube_hostname: str | None = Field(validation_alias='kubeHostname', default=None)
|
||||||
|
kube_version: str | None = Field(validation_alias='kubeVersion', default=None)
|
||||||
|
load_balancer_cloud_init_template: str | None = Field(validation_alias='loadBalancerCloudInitTemplate', default=None)
|
||||||
|
local_network: str | None = Field(validation_alias='localNetwork', default=None)
|
||||||
|
local_network_id: int | None = Field(validation_alias='localNetworkId', default=None)
|
||||||
|
master_cloud_init_template: str | None = Field(validation_alias='masterCloudInitTemplate', default=None)
|
||||||
|
master_ids: list[int] | None = Field(validation_alias='masterIds', default=None)
|
||||||
|
name: str | None = Field(validation_alias='name', default=None)
|
||||||
|
owner_id: int | None = Field(validation_alias='ownerId', default=None)
|
||||||
|
policy_ids: list[int] | None = Field(validation_alias='policyIds', default=None)
|
||||||
|
pool_vm_ids: list[int] | None = Field(validation_alias='poolVmIds', default=None)
|
||||||
|
provide_dns: bool | None = Field(validation_alias='provideDNS', default=None)
|
||||||
|
quorum: int | None = Field(validation_alias='quorum', default=None)
|
||||||
|
release_version: str | None = Field(validation_alias='releaseVersion', default=None)
|
||||||
|
root_ca_id: int | None = Field(validation_alias='rootCaId', default=None)
|
||||||
|
storage_policy_id: int | None = Field(validation_alias='storagePolicyId', default=None)
|
||||||
|
tech_status: str | None = Field(validation_alias='techStatus', default=None)
|
||||||
|
type: str | None = Field(validation_alias='type', default=None)
|
||||||
|
upgrade_date: str | None = Field(validation_alias='upgradeDate', default=None)
|
||||||
|
upgrade_error: str | None = Field(validation_alias='upgradeError', default=None)
|
||||||
|
use_dynamix_extnet: bool | None = Field(validation_alias='useDynamixExtnet', default=None)
|
||||||
|
user_id: int | None = Field(validation_alias='userId', default=None)
|
||||||
|
version_crypt: str | None = Field(validation_alias='versionCrypt', default=None)
|
||||||
|
vins_global_network_id: int | None = Field(validation_alias='vinsGlobalNetworkId', default=None)
|
||||||
|
worker_group_ids: list[int] | None = Field(validation_alias='workerGroupIds', default=None)
|
||||||
|
worker_ids: list[int] | None = Field(validation_alias='workerIds', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class ILoadBalancersItem(_ResultModel):
|
||||||
|
balancer_status: str | None = Field(validation_alias='balancerStatus', default=None)
|
||||||
|
cpu_count: int | None = Field(validation_alias='cpuCount', default=None)
|
||||||
|
creation_date: str | None = Field(validation_alias='creationDate', default=None)
|
||||||
|
disk_size: int | None = Field(validation_alias='diskSize', default=None)
|
||||||
|
ext_ip_address: str | None = Field(validation_alias='extIPAddress', default=None)
|
||||||
|
gpu_id: int | None = Field(validation_alias='gpuId', default=None)
|
||||||
|
gpu_name: str | None = Field(validation_alias='gpuName', default=None)
|
||||||
|
has_gpu: bool | None = Field(validation_alias='hasGPU', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
int_ip_address: str | None = Field(validation_alias='intIPAddress', default=None)
|
||||||
|
memory_size: int | None = Field(validation_alias='memorySize', default=None)
|
||||||
|
name: str | None = Field(validation_alias='name', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class MastersItem(_ResultModel):
|
||||||
|
cpu_count: int | None = Field(validation_alias='cpuCount', default=None)
|
||||||
|
creation_date: str | None = Field(validation_alias='creationDate', default=None)
|
||||||
|
disk_size: int | None = Field(validation_alias='diskSize', default=None)
|
||||||
|
ext_ip_address: str | None = Field(validation_alias='extIPAddress', default=None)
|
||||||
|
gpu_id: int | None = Field(validation_alias='gpuId', default=None)
|
||||||
|
gpu_name: str | None = Field(validation_alias='gpuName', default=None)
|
||||||
|
has_gpu: bool | None = Field(validation_alias='hasGPU', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
memory_size: int | None = Field(validation_alias='memorySize', default=None)
|
||||||
|
name: str | None = Field(validation_alias='name', default=None)
|
||||||
|
node_status: str | None = Field(validation_alias='nodeStatus', default=None)
|
||||||
|
runtime_type: str | None = Field(validation_alias='runtimeType', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class PoliciesItem(_ResultModel):
|
||||||
|
background: bool | None = Field(validation_alias='background', default=None)
|
||||||
|
category: str | None = Field(validation_alias='category', default=None)
|
||||||
|
default: bool | None = Field(validation_alias='default', default=None)
|
||||||
|
description: str | None = Field(validation_alias='description', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
name: str | None = Field(validation_alias='name', default=None)
|
||||||
|
rules: list[_results.InternalDelogicComtypePrtypeRule] | None = Field(validation_alias='rules', default=None)
|
||||||
|
severity: str | None = Field(validation_alias='severity', default=None)
|
||||||
|
validate_action: str | None = Field(validation_alias='validateAction', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class ProductsItem(_ResultModel):
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
name: str | None = Field(validation_alias='name', default=None)
|
||||||
|
product_name: str | None = Field(validation_alias='productName', default=None)
|
||||||
|
product_version: str | None = Field(validation_alias='productVersion', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class WorkersItem(_ResultModel):
|
||||||
|
cpu_count: int | None = Field(validation_alias='cpuCount', default=None)
|
||||||
|
creation_date: str | None = Field(validation_alias='creationDate', default=None)
|
||||||
|
disk_size: int | None = Field(validation_alias='diskSize', default=None)
|
||||||
|
gpu_id: int | None = Field(validation_alias='gpuId', default=None)
|
||||||
|
gpu_name: str | None = Field(validation_alias='gpuName', default=None)
|
||||||
|
has_gpu: bool | None = Field(validation_alias='hasGPU', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
memory_size: int | None = Field(validation_alias='memorySize', default=None)
|
||||||
|
name: str | None = Field(validation_alias='name', default=None)
|
||||||
|
node_status: str | None = Field(validation_alias='nodeStatus', default=None)
|
||||||
|
runtime_type: str | None = Field(validation_alias='runtimeType', default=None)
|
||||||
|
worker_group_id: int | None = Field(validation_alias='workerGroupId', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
cluster: Cluster | None = Field(validation_alias='cluster', default=None)
|
||||||
|
i_load_balancers: list[ILoadBalancersItem] | None = Field(validation_alias='iLoadBalancers', default=None)
|
||||||
|
masters: list[MastersItem] | None = Field(validation_alias='masters', default=None)
|
||||||
|
policies: list[PoliciesItem] | None = Field(validation_alias='policies', default=None)
|
||||||
|
products: list[ProductsItem] | None = Field(validation_alias='products', default=None)
|
||||||
|
quorum: int | None = Field(validation_alias='quorum', default=None)
|
||||||
|
task_briefs: list[_results.DelogicComtypePrtypeTaskBrief] | None = Field(validation_alias='taskBriefs', default=None)
|
||||||
|
username: str | None = Field(validation_alias='username', default=None)
|
||||||
|
workers: list[WorkersItem] | None = Field(validation_alias='workers', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/get'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
) -> DigitalenergyClusterGetResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
config: str | None = Field(validation_alias='config', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetConfigResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetConfigImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/getConfig'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
) -> DigitalenergyClusterGetConfigResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class TypeResource(Enum):
|
||||||
|
PODS = 'pods'
|
||||||
|
DAEMON_SETS = 'daemonSets'
|
||||||
|
CONFIG_MAPS = 'configMaps'
|
||||||
|
NAMESPACES = 'namespaces'
|
||||||
|
SECRETS = 'secrets'
|
||||||
|
DEPLOYMENTS = 'deployments'
|
||||||
|
STATEFUL_SETS = 'statefulSets'
|
||||||
|
RESOURCE_QUOTAS = 'resourceQuotas'
|
||||||
|
HORIZONTAL_POD_AUTOSCALERS = 'horizontalPodAutoscalers'
|
||||||
|
STORAGE_CLASSES = 'storageClasses'
|
||||||
|
PERSISTENT_VOLUME_CLAIMS = 'persistentVolumeClaims'
|
||||||
|
PERSISTENT_VOLUMES = 'persistentVolumes'
|
||||||
|
REPLICATION_CONTROLLERS = 'replicationControllers'
|
||||||
|
NETWORK_POLICIES = 'networkPolicies'
|
||||||
|
REPLICA_SETS = 'replicaSets'
|
||||||
|
INGRESS_CLASSES = 'ingressClasses'
|
||||||
|
INGRESSES = 'ingresses'
|
||||||
|
JOBS = 'jobs'
|
||||||
|
SERVICES = 'services'
|
||||||
|
CRON_JOBS = 'cronJobs'
|
||||||
|
EVENTS = 'events'
|
||||||
|
LIMIT_RANGES = 'limitRanges'
|
||||||
|
ENDPOINT_SLICES = 'endpointSlices'
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetKubectlResourcesResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: dict[Any, Any] | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetKubectlResourcesImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/getKubectlResources'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'resource_name': 'resourceName',
|
||||||
|
'type_resource': 'typeResource',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
resource_name: str,
|
||||||
|
namespace: str | None = None,
|
||||||
|
type_resource: TypeResource,
|
||||||
|
) -> DigitalenergyClusterGetKubectlResourcesResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
load_balancer: _results.ComtypePrtypeLoadBalancer | None = Field(validation_alias='loadBalancer', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetLoadBalancerResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetLoadBalancerImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/getLoadBalancer'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
) -> DigitalenergyClusterGetLoadBalancerResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
master: _results.DelogicComtypePrtypeMaster | None = Field(validation_alias='master', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetMasterResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetMasterImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/getMaster'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
) -> DigitalenergyClusterGetMasterResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
worker: _results.DelogicComtypePrtypeWorker | None = Field(validation_alias='worker', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetWorkerResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetWorkerImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/getWorker'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
) -> DigitalenergyClusterGetWorkerResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class WorkerGroup(_ResultModel):
|
||||||
|
app_container_repository: str | None = Field(validation_alias='appContainerRepository', default=None)
|
||||||
|
cloud_init_template: str | None = Field(validation_alias='cloudInitTemplate', default=None)
|
||||||
|
cluster_id: int | None = Field(validation_alias='clusterId', default=None)
|
||||||
|
count_vms: int | None = Field(validation_alias='countVMs', default=None)
|
||||||
|
cpu_count_template: int | None = Field(validation_alias='cpuCountTemplate', default=None)
|
||||||
|
creation_date: str | None = Field(validation_alias='creationDate', default=None)
|
||||||
|
creation_error: str | None = Field(validation_alias='creationError', default=None)
|
||||||
|
destroying_date: str | None = Field(validation_alias='destroyingDate', default=None)
|
||||||
|
destroying_error: str | None = Field(validation_alias='destroyingError', default=None)
|
||||||
|
disk_size_template: int | None = Field(validation_alias='diskSizeTemplate', default=None)
|
||||||
|
dynamix_rgid_template: int | None = Field(validation_alias='dynamixRGIDTemplate', default=None)
|
||||||
|
dynamix_sep_id_template: int | None = Field(validation_alias='dynamixSEPIdTemplate', default=None)
|
||||||
|
dynamix_sep_pool_template: str | None = Field(validation_alias='dynamixSEPPoolTemplate', default=None)
|
||||||
|
enable_autoscaling: bool | None = Field(validation_alias='enableAutoscaling', default=None)
|
||||||
|
group_name: str | None = Field(validation_alias='groupName', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
kube_container_repository: str | None = Field(validation_alias='kubeContainerRepository', default=None)
|
||||||
|
machine_os_build_template: str | None = Field(validation_alias='machineOSBuildTemplate', default=None)
|
||||||
|
machine_os_image_id_template: int | None = Field(validation_alias='machineOSImageIdTemplate', default=None)
|
||||||
|
machine_os_type_template: str | None = Field(validation_alias='machineOSTypeTemplate', default=None)
|
||||||
|
machine_provider_template: str | None = Field(validation_alias='machineProviderTemplate', default=None)
|
||||||
|
max_worker_count: int | None = Field(validation_alias='maxWorkerCount', default=None)
|
||||||
|
memory_size_template: int | None = Field(validation_alias='memorySizeTemplate', default=None)
|
||||||
|
min_worker_count: int | None = Field(validation_alias='minWorkerCount', default=None)
|
||||||
|
owner_id: int | None = Field(validation_alias='ownerId', default=None)
|
||||||
|
pool_vm_ids: list[int] | None = Field(validation_alias='poolVmIds', default=None)
|
||||||
|
system_group: bool | None = Field(validation_alias='systemGroup', default=None)
|
||||||
|
upgrade_date: str | None = Field(validation_alias='upgradeDate', default=None)
|
||||||
|
upgrade_error: str | None = Field(validation_alias='upgradeError', default=None)
|
||||||
|
worker_ids: list[int] | None = Field(validation_alias='workerIds', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
worker_group: WorkerGroup | None = Field(validation_alias='workerGroup', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetWorkerGroupResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetWorkerGroupImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/getWorkerGroup'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'worker_group_name': 'workerGroupName',
|
||||||
|
'worker_group_id': 'workerGroupId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int | None = None,
|
||||||
|
worker_group_name: str | None = None,
|
||||||
|
worker_group_id: int | None = None,
|
||||||
|
) -> DigitalenergyClusterGetWorkerGroupResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
annotations: list[str] | None = Field(validation_alias='annotations', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetWorkerGroupAnnotationsResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetWorkerGroupAnnotationsImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/getWorkerGroupAnnotations'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'worker_group_id': 'workerGroupId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
worker_group_id: int,
|
||||||
|
) -> DigitalenergyClusterGetWorkerGroupAnnotationsResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
labels: list[str] | None = Field(validation_alias='labels', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetWorkerGroupLabelsResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetWorkerGroupLabelsImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/getWorkerGroupLabels'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'worker_group_id': 'workerGroupId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
worker_group_id: int,
|
||||||
|
) -> DigitalenergyClusterGetWorkerGroupLabelsResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
taints: list[str] | None = Field(validation_alias='taints', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetWorkerGroupTaintsResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterGetWorkerGroupTaintsImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/getWorkerGroupTaints'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'worker_group_id': 'workerGroupId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
worker_group_id: int,
|
||||||
|
) -> DigitalenergyClusterGetWorkerGroupTaintsResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterJoinPoolVMsImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/joinPoolVMs'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'worker_group_name': 'workerGroupName',
|
||||||
|
'worker_group_id': 'workerGroupId',
|
||||||
|
'pool_vmids': 'poolVMIDs',
|
||||||
|
'dynamix_rg_id': 'dynamixRGId',
|
||||||
|
'dynamix_sep_id': 'dynamixSEPId',
|
||||||
|
'dynamix_sep_pool': 'dynamixSEPPool',
|
||||||
|
'pool_vm_labels': 'poolVMLabels',
|
||||||
|
'pool_vm_annotations': 'poolVMAnnotations',
|
||||||
|
'pool_vm_taints': 'poolVMTaints',
|
||||||
|
'dynamix_app_id': 'dynamixAppId',
|
||||||
|
'dynamix_app_secret': 'dynamixAppSecret',
|
||||||
|
'dynamix_url': 'dynamixURL',
|
||||||
|
'dynamix_ssourl': 'dynamixSSOURL',
|
||||||
|
'dynamix_auth_type': 'dynamixAuthType',
|
||||||
|
'dynamix_auth_domain': 'dynamixAuthDomain',
|
||||||
|
'dynamix_username': 'dynamixUsername',
|
||||||
|
'dynamix_password': 'dynamixPassword',
|
||||||
|
'source_operator': 'sourceOperator',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int | None = None,
|
||||||
|
worker_group_name: str | None = None,
|
||||||
|
worker_group_id: int | None = None,
|
||||||
|
pool_vmids: list[int] | None = None,
|
||||||
|
dynamix_rg_id: int,
|
||||||
|
dynamix_sep_id: int,
|
||||||
|
dynamix_sep_pool: str,
|
||||||
|
pool_vm_labels: list[str] | None = None,
|
||||||
|
pool_vm_annotations: list[str] | None = None,
|
||||||
|
pool_vm_taints: list[str] | None = None,
|
||||||
|
dynamix_app_id: str | None = None,
|
||||||
|
dynamix_app_secret: str | None = None,
|
||||||
|
dynamix_url: str | None = None,
|
||||||
|
dynamix_ssourl: str | None = None,
|
||||||
|
dynamix_auth_type: str | None = None,
|
||||||
|
dynamix_auth_domain: str | None = None,
|
||||||
|
dynamix_username: str | None = None,
|
||||||
|
dynamix_password: str | None = None,
|
||||||
|
source_operator: str | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
91
src/digital_energy_sdk/api/digitalenergy/cluster/list.py
Normal file
91
src/digital_energy_sdk/api/digitalenergy/cluster/list.py
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Type(Enum):
|
||||||
|
DYNAMIX = 'dynamix'
|
||||||
|
GENERIC = 'generic'
|
||||||
|
DENERGY = 'denergy'
|
||||||
|
BAREMETAL = 'baremetal'
|
||||||
|
|
||||||
|
|
||||||
|
class ClustersItem(_ResultModel):
|
||||||
|
creation_date: str | None = Field(validation_alias='creationDate', default=None)
|
||||||
|
denergy_status: str | None = Field(validation_alias='denergyStatus', default=None)
|
||||||
|
description: str | None = Field(validation_alias='description', default=None)
|
||||||
|
description_status: dict[Any, Any] | None = Field(validation_alias='descriptionStatus', default=None)
|
||||||
|
dynamix_create_task_id: str | None = Field(validation_alias='dynamixCreateTaskId', default=None)
|
||||||
|
dynamix_status: str | None = Field(validation_alias='dynamixStatus', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
installed_autoscaler: bool | None = Field(validation_alias='installedAutoscaler', default=None)
|
||||||
|
installed_criobox: bool | None = Field(validation_alias='installedCriobox', default=None)
|
||||||
|
installed_csi_dynamix: bool | None = Field(validation_alias='installedCsiDynamix', default=None)
|
||||||
|
installed_kyverno: bool | None = Field(validation_alias='installedKyverno', default=None)
|
||||||
|
installed_metric_server: bool | None = Field(validation_alias='installedMetricServer', default=None)
|
||||||
|
installed_monitoring: bool | None = Field(validation_alias='installedMonitoring', default=None)
|
||||||
|
installed_pod_logger: bool | None = Field(validation_alias='installedPodLogger', default=None)
|
||||||
|
installed_rbac_manager: bool | None = Field(validation_alias='installedRbacManager', default=None)
|
||||||
|
installed_servchecker: bool | None = Field(validation_alias='installedServchecker', default=None)
|
||||||
|
installed_trivy: bool | None = Field(validation_alias='installedTrivy', default=None)
|
||||||
|
name: str | None = Field(validation_alias='name', default=None)
|
||||||
|
owner_id: int | None = Field(validation_alias='ownerId', default=None)
|
||||||
|
task_ids: list[int] | None = Field(validation_alias='taskIds', default=None)
|
||||||
|
tech_status: str | None = Field(validation_alias='techStatus', default=None)
|
||||||
|
type: str | None = Field(validation_alias='type', default=None)
|
||||||
|
username: str | None = Field(validation_alias='username', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
clusters: list[ClustersItem] | None = Field(validation_alias='clusters', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterListResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterListImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/list'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'denergy_statuses': 'denergyStatuses',
|
||||||
|
'installed_autoscaler': 'installedAutoscaler',
|
||||||
|
'installed_metric_server': 'installedMetricServer',
|
||||||
|
'installed_kyverno': 'installedKyverno',
|
||||||
|
'installed_trivy': 'installedTrivy',
|
||||||
|
'installed_rbac_manager': 'installedRbacManager',
|
||||||
|
'installed_pod_logger': 'installedPodLogger',
|
||||||
|
'installed_criobox': 'installedCriobox',
|
||||||
|
'installed_csi_dynamix': 'installedCsiDynamix',
|
||||||
|
'sort_by': 'sortBy',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
type: Type | None = None,
|
||||||
|
denergy_statuses: list[str] | None = None,
|
||||||
|
installed_autoscaler: bool | None = None,
|
||||||
|
installed_metric_server: bool | None = None,
|
||||||
|
installed_kyverno: bool | None = None,
|
||||||
|
installed_trivy: bool | None = None,
|
||||||
|
installed_rbac_manager: bool | None = None,
|
||||||
|
installed_pod_logger: bool | None = None,
|
||||||
|
installed_criobox: bool | None = None,
|
||||||
|
installed_csi_dynamix: bool | None = None,
|
||||||
|
sort_by: str | None = None,
|
||||||
|
limit: int | None = None,
|
||||||
|
page: int | None = None,
|
||||||
|
) -> DigitalenergyClusterListResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class TypeResource(Enum):
|
||||||
|
PODS = 'pods'
|
||||||
|
DAEMON_SETS = 'daemonSets'
|
||||||
|
CONFIG_MAPS = 'configMaps'
|
||||||
|
NAMESPACES = 'namespaces'
|
||||||
|
SECRETS = 'secrets'
|
||||||
|
DEPLOYMENTS = 'deployments'
|
||||||
|
STATEFUL_SETS = 'statefulSets'
|
||||||
|
RESOURCE_QUOTAS = 'resourceQuotas'
|
||||||
|
HORIZONTAL_POD_AUTOSCALERS = 'horizontalPodAutoscalers'
|
||||||
|
STORAGE_CLASSES = 'storageClasses'
|
||||||
|
PERSISTENT_VOLUME_CLAIMS = 'persistentVolumeClaims'
|
||||||
|
PERSISTENT_VOLUMES = 'persistentVolumes'
|
||||||
|
REPLICATION_CONTROLLERS = 'replicationControllers'
|
||||||
|
NETWORK_POLICIES = 'networkPolicies'
|
||||||
|
REPLICA_SETS = 'replicaSets'
|
||||||
|
INGRESS_CLASSES = 'ingressClasses'
|
||||||
|
INGRESSES = 'ingresses'
|
||||||
|
JOBS = 'jobs'
|
||||||
|
SERVICES = 'services'
|
||||||
|
CRON_JOBS = 'cronJobs'
|
||||||
|
EVENTS = 'events'
|
||||||
|
LIMIT_RANGES = 'limitRanges'
|
||||||
|
ENDPOINT_SLICES = 'endpointSlices'
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterListKubectlResourcesResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: dict[Any, Any] | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterListKubectlResourcesImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/listKubectlResources'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'type_resource': 'typeResource',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
namespace: str | None = None,
|
||||||
|
type_resource: TypeResource,
|
||||||
|
limit: int | None = None,
|
||||||
|
page: int | None = None,
|
||||||
|
) -> DigitalenergyClusterListKubectlResourcesResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
load_balancers: list[_results.ComtypePrtypeLoadBalancer] | None = Field(validation_alias='loadBalancers', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterListLoadBalancersResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterListLoadBalancersImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/listLoadBalancers'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
) -> DigitalenergyClusterListLoadBalancersResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class NodeStatusesValue(Enum):
|
||||||
|
NOT_EXISTS = 'notExists'
|
||||||
|
BUILDING_STARTED = 'buildingStarted'
|
||||||
|
WRONG_BUILDING = 'wrongBuilding'
|
||||||
|
READY_TO_JOINING = 'readyToJoining'
|
||||||
|
IN_JOINING = 'inJoining'
|
||||||
|
IN_USE = 'inUse'
|
||||||
|
OUT_OF_SERVICE = 'outOfService'
|
||||||
|
STOPPED = 'stopped'
|
||||||
|
BROKEN = 'broken'
|
||||||
|
IN_MAINTENANCE = 'inMaintenance'
|
||||||
|
IN_DESTROYING = 'inDestroying'
|
||||||
|
IN_UPGRADING = 'inUpgrading'
|
||||||
|
WRONG_DESTROYING = 'wrongDestroying'
|
||||||
|
DESTROYED = 'destroyed'
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
masters: list[_results.DelogicComtypePrtypeMaster] | None = Field(validation_alias='masters', default=None)
|
||||||
|
total: int | None = Field(validation_alias='total', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterListMastersResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterListMastersImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/listMasters'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'node_statuses': 'nodeStatuses',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
node_statuses: list[NodeStatusesValue] | None = None,
|
||||||
|
limit: int | None = None,
|
||||||
|
page: int | None = None,
|
||||||
|
) -> DigitalenergyClusterListMastersResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class WorkerGroupsItem(_ResultModel):
|
||||||
|
cluster_id: int | None = Field(validation_alias='clusterId', default=None)
|
||||||
|
cpu_count_template: int | None = Field(validation_alias='cpuCountTemplate', default=None)
|
||||||
|
creation_date: str | None = Field(validation_alias='creationDate', default=None)
|
||||||
|
disk_size_template: int | None = Field(validation_alias='diskSizeTemplate', default=None)
|
||||||
|
dynamix_rgid_template: int | None = Field(validation_alias='dynamixRGIDTemplate', default=None)
|
||||||
|
enable_autoscaling: bool | None = Field(validation_alias='enableAutoscaling', default=None)
|
||||||
|
group_name: str | None = Field(validation_alias='groupName', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
machine_os_build_template: str | None = Field(validation_alias='machineOSBuildTemplate', default=None)
|
||||||
|
machine_os_image_id_template: int | None = Field(validation_alias='machineOSImageIdTemplate', default=None)
|
||||||
|
machine_os_type_template: str | None = Field(validation_alias='machineOSTypeTemplate', default=None)
|
||||||
|
machine_provider_template: str | None = Field(validation_alias='machineProviderTemplate', default=None)
|
||||||
|
max_worker_count: int | None = Field(validation_alias='maxWorkerCount', default=None)
|
||||||
|
memory_size_template: int | None = Field(validation_alias='memorySizeTemplate', default=None)
|
||||||
|
min_worker_count: int | None = Field(validation_alias='minWorkerCount', default=None)
|
||||||
|
owner_id: int | None = Field(validation_alias='ownerId', default=None)
|
||||||
|
pool_vm_ids: list[int] | None = Field(validation_alias='poolVmIds', default=None)
|
||||||
|
worker_ids: list[int] | None = Field(validation_alias='workerIds', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
worker_groups: list[WorkerGroupsItem] | None = Field(validation_alias='workerGroups', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterListWorkerGroupsResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterListWorkerGroupsImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/listWorkerGroups'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
) -> DigitalenergyClusterListWorkerGroupsResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
workers: list[_results.DelogicComtypePrtypeWorker] | None = Field(validation_alias='workers', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterListWorkersResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterListWorkersImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/listWorkers'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
) -> DigitalenergyClusterListWorkersResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from ._group import DigitalenergyClusterLoadBalancersImpl
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['DigitalenergyClusterLoadBalancersImpl']
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
from functools import cached_property
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationGroupImpl
|
||||||
|
from .describe import DigitalenergyClusterLoadBalancersDescribeImpl
|
||||||
|
from .haproxy import DigitalenergyClusterLoadBalancersHaproxyImpl
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterLoadBalancersImpl(APIOperationGroupImpl):
|
||||||
|
@cached_property
|
||||||
|
def describe(self) -> DigitalenergyClusterLoadBalancersDescribeImpl:
|
||||||
|
return DigitalenergyClusterLoadBalancersDescribeImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def haproxy(self) -> DigitalenergyClusterLoadBalancersHaproxyImpl:
|
||||||
|
return DigitalenergyClusterLoadBalancersHaproxyImpl(config=self._config)
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class VrrpItem(_ResultModel):
|
||||||
|
advert_interval: int | None = Field(validation_alias='advertInterval', default=None)
|
||||||
|
instance_name: str | None = Field(validation_alias='instanceName', default=None)
|
||||||
|
interface: str | None = Field(validation_alias='interface', default=None)
|
||||||
|
priority: int | None = Field(validation_alias='priority', default=None)
|
||||||
|
state: str | None = Field(validation_alias='state', default=None)
|
||||||
|
virtual_ip: str | None = Field(validation_alias='virtualIp', default=None)
|
||||||
|
want_state: str | None = Field(validation_alias='wantState', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Haproxy(_ResultModel):
|
||||||
|
config_valid: bool | None = Field(validation_alias='configValid', default=None)
|
||||||
|
enabled: bool | None = Field(validation_alias='enabled', default=None)
|
||||||
|
errors: list[str] | None = Field(validation_alias='errors', default=None)
|
||||||
|
running: bool | None = Field(validation_alias='running', default=None)
|
||||||
|
state: str | None = Field(validation_alias='state', default=None)
|
||||||
|
warnings: list[str] | None = Field(validation_alias='warnings', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Keepalived(_ResultModel):
|
||||||
|
enabled: bool | None = Field(validation_alias='enabled', default=None)
|
||||||
|
errors: list[str] | None = Field(validation_alias='errors', default=None)
|
||||||
|
running: bool | None = Field(validation_alias='running', default=None)
|
||||||
|
state: str | None = Field(validation_alias='state', default=None)
|
||||||
|
vrrp: list[VrrpItem] | None = Field(validation_alias='vrrp', default=None)
|
||||||
|
warnings: list[str] | None = Field(validation_alias='warnings', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
address: str | None = Field(validation_alias='address', default=None)
|
||||||
|
haproxy: Haproxy | None = Field(validation_alias='haproxy', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
keepalived: Keepalived | None = Field(validation_alias='keepalived', default=None)
|
||||||
|
name: str | None = Field(validation_alias='name', default=None)
|
||||||
|
service_shutdown: bool | None = Field(validation_alias='serviceShutdown', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterLoadBalancersDescribeResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterLoadBalancersDescribeImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/loadBalancers/describe'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
) -> DigitalenergyClusterLoadBalancersDescribeResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from ._group import DigitalenergyClusterLoadBalancersHaproxyImpl
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['DigitalenergyClusterLoadBalancersHaproxyImpl']
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
from functools import cached_property
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationGroupImpl
|
||||||
|
from .edit_config import DigitalenergyClusterLoadBalancersHaproxyEditConfigImpl
|
||||||
|
from .get_config import DigitalenergyClusterLoadBalancersHaproxyGetConfigImpl
|
||||||
|
from .reset_to_defaults import DigitalenergyClusterLoadBalancersHaproxyResetToDefaultsImpl
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterLoadBalancersHaproxyImpl(APIOperationGroupImpl):
|
||||||
|
@cached_property
|
||||||
|
def edit_config(self) -> DigitalenergyClusterLoadBalancersHaproxyEditConfigImpl:
|
||||||
|
return DigitalenergyClusterLoadBalancersHaproxyEditConfigImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def get_config(self) -> DigitalenergyClusterLoadBalancersHaproxyGetConfigImpl:
|
||||||
|
return DigitalenergyClusterLoadBalancersHaproxyGetConfigImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def reset_to_defaults(self) -> DigitalenergyClusterLoadBalancersHaproxyResetToDefaultsImpl:
|
||||||
|
return DigitalenergyClusterLoadBalancersHaproxyResetToDefaultsImpl(config=self._config)
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterLoadBalancersHaproxyEditConfigResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: dict[Any, Any] | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterLoadBalancersHaproxyEditConfigImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/loadBalancers/haproxy/editConfig'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'timeout_http_request': 'timeoutHttpRequest',
|
||||||
|
'timeout_check': 'timeoutCheck',
|
||||||
|
'timeout_connect': 'timeoutConnect',
|
||||||
|
'timeout_client': 'timeoutClient',
|
||||||
|
'timeout_queue': 'timeoutQueue',
|
||||||
|
'timeout_server': 'timeoutServer',
|
||||||
|
'timeout_http_keep_alive': 'timeoutHttpKeepAlive',
|
||||||
|
'default_maxconn': 'defaultMaxconn',
|
||||||
|
'global_maxconn': 'globalMaxconn',
|
||||||
|
'server_check_fall': 'serverCheckFall',
|
||||||
|
'server_inter': 'serverInter',
|
||||||
|
'server_downinter': 'serverDowninter',
|
||||||
|
'server_maxconn': 'serverMaxconn',
|
||||||
|
'server_maxqueue': 'serverMaxqueue',
|
||||||
|
'server_rise': 'serverRise',
|
||||||
|
'server_slowstart': 'serverSlowstart',
|
||||||
|
'server_weight': 'serverWeight',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
timeout_http_request: int | None = None,
|
||||||
|
timeout_check: int | None = None,
|
||||||
|
timeout_connect: int | None = None,
|
||||||
|
timeout_client: int | None = None,
|
||||||
|
timeout_queue: int | None = None,
|
||||||
|
timeout_server: int | None = None,
|
||||||
|
timeout_http_keep_alive: int | None = None,
|
||||||
|
retries: int | None = None,
|
||||||
|
default_maxconn: int | None = None,
|
||||||
|
global_maxconn: int | None = None,
|
||||||
|
server_check_fall: int | None = None,
|
||||||
|
server_inter: int | None = None,
|
||||||
|
server_downinter: int | None = None,
|
||||||
|
server_maxconn: int | None = None,
|
||||||
|
server_maxqueue: int | None = None,
|
||||||
|
server_rise: int | None = None,
|
||||||
|
server_slowstart: int | None = None,
|
||||||
|
server_weight: int | None = None,
|
||||||
|
) -> DigitalenergyClusterLoadBalancersHaproxyEditConfigResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Server(_ResultModel):
|
||||||
|
check_fall: int | None = Field(validation_alias='checkFall', default=None)
|
||||||
|
downinter: int | None = Field(validation_alias='downinter', default=None)
|
||||||
|
inter: int | None = Field(validation_alias='inter', default=None)
|
||||||
|
maxconn: int | None = Field(validation_alias='maxconn', default=None)
|
||||||
|
maxqueue: int | None = Field(validation_alias='maxqueue', default=None)
|
||||||
|
rise: int | None = Field(validation_alias='rise', default=None)
|
||||||
|
slowstart: int | None = Field(validation_alias='slowstart', default=None)
|
||||||
|
weight: int | None = Field(validation_alias='weight', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Settings(_ResultModel):
|
||||||
|
default_maxconn: int | None = Field(validation_alias='defaultMaxconn', default=None)
|
||||||
|
global_maxconn: int | None = Field(validation_alias='globalMaxconn', default=None)
|
||||||
|
retries: int | None = Field(validation_alias='retries', default=None)
|
||||||
|
server: Server | None = Field(validation_alias='server', default=None)
|
||||||
|
timeout_check: int | None = Field(validation_alias='timeoutCheck', default=None)
|
||||||
|
timeout_client: int | None = Field(validation_alias='timeoutClient', default=None)
|
||||||
|
timeout_connect: int | None = Field(validation_alias='timeoutConnect', default=None)
|
||||||
|
timeout_http_keep_alive: int | None = Field(validation_alias='timeoutHttpKeepAlive', default=None)
|
||||||
|
timeout_http_request: int | None = Field(validation_alias='timeoutHttpRequest', default=None)
|
||||||
|
timeout_queue: int | None = Field(validation_alias='timeoutQueue', default=None)
|
||||||
|
timeout_server: int | None = Field(validation_alias='timeoutServer', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
address: str | None = Field(validation_alias='address', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
name: str | None = Field(validation_alias='name', default=None)
|
||||||
|
settings: Settings | None = Field(validation_alias='settings', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterLoadBalancersHaproxyGetConfigResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterLoadBalancersHaproxyGetConfigImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/loadBalancers/haproxy/getConfig'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
) -> DigitalenergyClusterLoadBalancersHaproxyGetConfigResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterLoadBalancersHaproxyResetToDefaultsResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: dict[Any, Any] | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterLoadBalancersHaproxyResetToDefaultsImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/loadBalancers/haproxy/resetToDefaults'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
) -> DigitalenergyClusterLoadBalancersHaproxyResetToDefaultsResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
cluster_dns: str | None = Field(validation_alias='clusterDns', default=None)
|
||||||
|
cni: str | None = Field(validation_alias='cni', default=None)
|
||||||
|
encap: str | None = Field(validation_alias='encap', default=None)
|
||||||
|
kube_proxy: str | None = Field(validation_alias='kubeProxy', default=None)
|
||||||
|
mtu: int | None = Field(validation_alias='mtu', default=None)
|
||||||
|
network_policy: str | None = Field(validation_alias='networkPolicy', default=None)
|
||||||
|
overlay: bool | None = Field(validation_alias='overlay', default=None)
|
||||||
|
pod_cidr: str | None = Field(validation_alias='podCidr', default=None)
|
||||||
|
service_cidr: str | None = Field(validation_alias='serviceCidr', default=None)
|
||||||
|
traffic_routing: str | None = Field(validation_alias='trafficRouting', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterNetworkDescribeResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterNetworkDescribeImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/networkDescribe'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
) -> DigitalenergyClusterNetworkDescribeResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterResizeWorkerGroupImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/resizeWorkerGroup'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'worker_group_name': 'workerGroupName',
|
||||||
|
'worker_group_id': 'workerGroupId',
|
||||||
|
'worker_cpu_count': 'workerCPUCount',
|
||||||
|
'worker_memory_size': 'workerMemorySize',
|
||||||
|
'worker_disk_size': 'workerDiskSize',
|
||||||
|
'dynamix_app_id': 'dynamixAppId',
|
||||||
|
'dynamix_app_secret': 'dynamixAppSecret',
|
||||||
|
'dynamix_url': 'dynamixURL',
|
||||||
|
'dynamix_ssourl': 'dynamixSSOURL',
|
||||||
|
'dynamix_auth_type': 'dynamixAuthType',
|
||||||
|
'dynamix_auth_domain': 'dynamixAuthDomain',
|
||||||
|
'dynamix_username': 'dynamixUsername',
|
||||||
|
'dynamix_password': 'dynamixPassword',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int | None = None,
|
||||||
|
worker_group_name: str | None = None,
|
||||||
|
worker_group_id: int | None = None,
|
||||||
|
worker_cpu_count: int | None = None,
|
||||||
|
worker_memory_size: int | None = None,
|
||||||
|
worker_disk_size: int | None = None,
|
||||||
|
dynamix_app_id: str | None = None,
|
||||||
|
dynamix_app_secret: str | None = None,
|
||||||
|
dynamix_url: str | None = None,
|
||||||
|
dynamix_ssourl: str | None = None,
|
||||||
|
dynamix_auth_type: str | None = None,
|
||||||
|
dynamix_auth_domain: str | None = None,
|
||||||
|
dynamix_username: str | None = None,
|
||||||
|
dynamix_password: str | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterSetKubeVersionResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: dict[Any, Any] | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterSetKubeVersionImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/setKubeVersion'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'kube_version': 'kubeVersion',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
kube_version: str,
|
||||||
|
) -> DigitalenergyClusterSetKubeVersionResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterSetLoadBalancerStatusResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: dict[Any, Any] | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterSetLoadBalancerStatusImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/setLoadBalancerStatus'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'machine_status': 'machineStatus',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
machine_status: str,
|
||||||
|
) -> DigitalenergyClusterSetLoadBalancerStatusResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterSetMasterStatusResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: dict[Any, Any] | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterSetMasterStatusImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/setMasterStatus'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'machine_status': 'machineStatus',
|
||||||
|
'node_status': 'nodeStatus',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int | None = None,
|
||||||
|
machine_status: str | None = None,
|
||||||
|
node_status: str | None = None,
|
||||||
|
) -> DigitalenergyClusterSetMasterStatusResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterSetPoolVMStatusResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: dict[Any, Any] | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterSetPoolVMStatusImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/setPoolVMStatus'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'machine_status': 'machineStatus',
|
||||||
|
'node_status': 'nodeStatus',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int | None = None,
|
||||||
|
machine_status: str | None = None,
|
||||||
|
node_status: str | None = None,
|
||||||
|
) -> DigitalenergyClusterSetPoolVMStatusResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterSetStatusResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: dict[Any, Any] | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterSetStatusImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/setStatus'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'denergy_status': 'denergyStatus',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
denergy_status: str,
|
||||||
|
) -> DigitalenergyClusterSetStatusResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterSetWorkerStatusResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: dict[Any, Any] | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterSetWorkerStatusImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/setWorkerStatus'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'machine_status': 'machineStatus',
|
||||||
|
'node_status': 'nodeStatus',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int | None = None,
|
||||||
|
machine_status: str | None = None,
|
||||||
|
node_status: str | None = None,
|
||||||
|
) -> DigitalenergyClusterSetWorkerStatusResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
task_id: int | None = Field(validation_alias='taskId', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterUpdateCNIConfigResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterUpdateCNIConfigImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/updateCNIConfig'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'custom_mtu': 'customMTU',
|
||||||
|
'kube_container_repository': 'kubeContainerRepository',
|
||||||
|
'chart_repository': 'chartRepository',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
custom_mtu: int,
|
||||||
|
kube_container_repository: int | None = None,
|
||||||
|
chart_repository: int | None = None,
|
||||||
|
) -> DigitalenergyClusterUpdateCNIConfigResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
kube_config: str | None = Field(validation_alias='kubeConfig', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterUpdateConfigResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterUpdateConfigImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/updateConfig'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'kube_config': 'kubeConfig',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
kube_config: str,
|
||||||
|
) -> DigitalenergyClusterUpdateConfigResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterUpdateInfoImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/updateInfo'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterUpdateOwnerIdResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: dict[Any, Any] | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterUpdateOwnerIdImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/updateOwnerId'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_ids': 'clusterIds',
|
||||||
|
'owner_id': 'ownerId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_ids: list[int],
|
||||||
|
owner_id: int,
|
||||||
|
) -> DigitalenergyClusterUpdateOwnerIdResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterUpdateWorkerGroupImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/updateWorkerGroup'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'worker_group_name': 'workerGroupName',
|
||||||
|
'worker_group_id': 'workerGroupId',
|
||||||
|
'enable_autoscaling': 'enableAutoscaling',
|
||||||
|
'max_worker_count': 'maxWorkerCount',
|
||||||
|
'min_worker_count': 'minWorkerCount',
|
||||||
|
'app_container_repository': 'appContainerRepository',
|
||||||
|
'chart_repository': 'chartRepository',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int | None = None,
|
||||||
|
worker_group_name: str | None = None,
|
||||||
|
worker_group_id: int | None = None,
|
||||||
|
enable_autoscaling: bool | None = None,
|
||||||
|
max_worker_count: int | None = None,
|
||||||
|
min_worker_count: int | None = None,
|
||||||
|
app_container_repository: int | None = None,
|
||||||
|
chart_repository: int | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterUpdateWorkerGroupAnnotationsImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/updateWorkerGroupAnnotations'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'worker_group_id': 'workerGroupId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
worker_group_id: int,
|
||||||
|
annotations: list[str],
|
||||||
|
) -> _results.ComtypeIotypeWorkerGroupResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterUpdateWorkerGroupLabelsImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/updateWorkerGroupLabels'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'worker_group_id': 'workerGroupId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
worker_group_id: int,
|
||||||
|
labels: list[str],
|
||||||
|
) -> _results.ComtypeIotypeWorkerGroupResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterUpdateWorkerGroupTaintsImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/updateWorkerGroupTaints'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_id': 'clusterId',
|
||||||
|
'worker_group_id': 'workerGroupId',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_id: int,
|
||||||
|
worker_group_id: int,
|
||||||
|
taints: list[str],
|
||||||
|
) -> _results.ComtypeIotypeWorkerGroupResult:
|
||||||
|
raise NotImplementedError
|
||||||
33
src/digital_energy_sdk/api/digitalenergy/cluster/verify.py
Normal file
33
src/digital_energy_sdk/api/digitalenergy/cluster/verify.py
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterVerifyImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/cluster/verify'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'master_ids': 'masterIds',
|
||||||
|
'worker_ids': 'workerIds',
|
||||||
|
'chart_repository': 'chartRepository',
|
||||||
|
'app_container_repository': 'appContainerRepository',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
master_ids: list[int] | None = None,
|
||||||
|
worker_ids: list[int] | None = None,
|
||||||
|
chart_repository: int | None = None,
|
||||||
|
app_container_repository: int | None = None,
|
||||||
|
) -> _results.ComtypeIotypeCreateTaskResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from ._group import DigitalenergyClusterTemplateImpl
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['DigitalenergyClusterTemplateImpl']
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
from functools import cached_property
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationGroupImpl
|
||||||
|
from .delete import DigitalenergyClusterTemplateDeleteImpl
|
||||||
|
from .duplicate import DigitalenergyClusterTemplateDuplicateImpl
|
||||||
|
from .get import DigitalenergyClusterTemplateGetImpl
|
||||||
|
from .list import DigitalenergyClusterTemplateListImpl
|
||||||
|
from .update import DigitalenergyClusterTemplateUpdateImpl
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterTemplateImpl(APIOperationGroupImpl):
|
||||||
|
@cached_property
|
||||||
|
def delete(self) -> DigitalenergyClusterTemplateDeleteImpl:
|
||||||
|
return DigitalenergyClusterTemplateDeleteImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def duplicate(self) -> DigitalenergyClusterTemplateDuplicateImpl:
|
||||||
|
return DigitalenergyClusterTemplateDuplicateImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def get(self) -> DigitalenergyClusterTemplateGetImpl:
|
||||||
|
return DigitalenergyClusterTemplateGetImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def list(self) -> DigitalenergyClusterTemplateListImpl:
|
||||||
|
return DigitalenergyClusterTemplateListImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def update(self) -> DigitalenergyClusterTemplateUpdateImpl:
|
||||||
|
return DigitalenergyClusterTemplateUpdateImpl(config=self._config)
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterTemplateDeleteResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterTemplateDeleteImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/clusterTemplate/delete'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
) -> DigitalenergyClusterTemplateDeleteResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterTemplateDuplicateResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterTemplateDuplicateImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/clusterTemplate/duplicate'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_template_name': 'clusterTemplateName',
|
||||||
|
'cluster_template_description': 'clusterTemplateDescription',
|
||||||
|
'share_cluster_template': 'shareClusterTemplate',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
cluster_template_name: str | None = None,
|
||||||
|
cluster_template_description: str | None = None,
|
||||||
|
share_cluster_template: bool = False,
|
||||||
|
) -> DigitalenergyClusterTemplateDuplicateResult:
|
||||||
|
raise NotImplementedError
|
||||||
176
src/digital_energy_sdk/api/digitalenergy/cluster_template/get.py
Normal file
176
src/digital_energy_sdk/api/digitalenergy/cluster_template/get.py
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class Template(_ResultModel):
|
||||||
|
app_container_repository: int | None = Field(validation_alias='appContainerRepository', default=None)
|
||||||
|
audit_enable: bool | None = Field(validation_alias='auditEnable', default=None)
|
||||||
|
audit_log_max_age: int | None = Field(validation_alias='auditLogMaxAge', default=None)
|
||||||
|
audit_log_max_backup: int | None = Field(validation_alias='auditLogMaxBackup', default=None)
|
||||||
|
audit_log_max_size: int | None = Field(validation_alias='auditLogMaxSize', default=None)
|
||||||
|
audit_policy: str | None = Field(validation_alias='auditPolicy', default=None)
|
||||||
|
balancers_dynamix_sep_id: int | None = Field(validation_alias='balancersDynamixSEPId', default=None)
|
||||||
|
balancers_dynamix_sep_pool: str | None = Field(validation_alias='balancersDynamixSEPPool', default=None)
|
||||||
|
certificate_issuer_id: int | None = Field(validation_alias='certificateIssuerId', default=None)
|
||||||
|
certificate_key: str | None = Field(validation_alias='certificateKey', default=None)
|
||||||
|
certificate_validity_before: str | None = Field(validation_alias='certificateValidityBefore', default=None)
|
||||||
|
chart_repository: int | None = Field(validation_alias='chartRepository', default=None)
|
||||||
|
cluster_hostname: str | None = Field(validation_alias='clusterHostname', default=None)
|
||||||
|
cluster_machine_os_build: str | None = Field(validation_alias='clusterMachineOSBuild', default=None)
|
||||||
|
cluster_machine_os_type: str | None = Field(validation_alias='clusterMachineOSType', default=None)
|
||||||
|
cluster_name: str | None = Field(validation_alias='clusterName', default=None)
|
||||||
|
cluster_template_description: str | None = Field(validation_alias='clusterTemplateDescription', default=None)
|
||||||
|
cluster_template_name: str | None = Field(validation_alias='clusterTemplateName', default=None)
|
||||||
|
cluster_type: str | None = Field(validation_alias='clusterType', default=None)
|
||||||
|
container_network_type: str | None = Field(validation_alias='containerNetworkType', default=None)
|
||||||
|
creation_date: str | None = Field(validation_alias='creationDate', default=None)
|
||||||
|
custom_mtu: int | None = Field(validation_alias='customMTU', default=None)
|
||||||
|
denergy_runtime_type: str | None = Field(validation_alias='denergyRuntimeType', default=None)
|
||||||
|
description: str | None = Field(validation_alias='description', default=None)
|
||||||
|
domain_resolvers: list[str] | None = Field(validation_alias='domainResolvers', default=None)
|
||||||
|
dynamix_app_id: str | None = Field(validation_alias='dynamixAppId', default=None)
|
||||||
|
dynamix_app_secret: str | None = Field(validation_alias='dynamixAppSecret', default=None)
|
||||||
|
dynamix_auth_domain: str | None = Field(validation_alias='dynamixAuthDomain', default=None)
|
||||||
|
dynamix_auth_type: str | None = Field(validation_alias='dynamixAuthType', default=None)
|
||||||
|
dynamix_k8_ci_id: int | None = Field(validation_alias='dynamixK8CIId', default=None)
|
||||||
|
dynamix_password: str | None = Field(validation_alias='dynamixPassword', default=None)
|
||||||
|
dynamix_rg_id: int | None = Field(validation_alias='dynamixRGId', default=None)
|
||||||
|
dynamix_sep_id: int | None = Field(validation_alias='dynamixSEPId', default=None)
|
||||||
|
dynamix_sep_pool: str | None = Field(validation_alias='dynamixSEPPool', default=None)
|
||||||
|
dynamix_ssourl: str | None = Field(validation_alias='dynamixSSOURL', default=None)
|
||||||
|
dynamix_url: str | None = Field(validation_alias='dynamixURL', default=None)
|
||||||
|
dynamix_username: str | None = Field(validation_alias='dynamixUsername', default=None)
|
||||||
|
enable_custom_load_balancer_hostnames: bool | None = Field(validation_alias='enableCustomLoadBalancerHostnames', default=None)
|
||||||
|
enable_custom_master_hostnames: bool | None = Field(validation_alias='enableCustomMasterHostnames', default=None)
|
||||||
|
enable_custom_worker_hostnames: bool | None = Field(validation_alias='enableCustomWorkerHostnames', default=None)
|
||||||
|
encrypted: bool | None = Field(validation_alias='encrypted', default=None)
|
||||||
|
ess_auth_token: str | None = Field(validation_alias='essAuthToken', default=None)
|
||||||
|
ext_virtual_address: str | None = Field(validation_alias='extVirtualAddress', default=None)
|
||||||
|
external_lb_addresses: list[str] | None = Field(validation_alias='externalLBAddresses', default=None)
|
||||||
|
global_network_id: int | None = Field(validation_alias='globalNetworkId', default=None)
|
||||||
|
i_load_balancer_cpu_count: int | None = Field(validation_alias='iLoadBalancerCPUCount', default=None)
|
||||||
|
i_load_balancer_cloud_init: str | None = Field(validation_alias='iLoadBalancerCloudInit', default=None)
|
||||||
|
i_load_balancer_count: int | None = Field(validation_alias='iLoadBalancerCount', default=None)
|
||||||
|
i_load_balancer_disk_size: int | None = Field(validation_alias='iLoadBalancerDiskSize', default=None)
|
||||||
|
i_load_balancer_gpu_ids: list[int] | None = Field(validation_alias='iLoadBalancerGpuIds', default=None)
|
||||||
|
i_load_balancer_memory_size: int | None = Field(validation_alias='iLoadBalancerMemorySize', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
initial_secure_shell_port: int | None = Field(validation_alias='initialSecureShellPort', default=None)
|
||||||
|
install_criobox: bool | None = Field(validation_alias='installCriobox', default=None)
|
||||||
|
install_csi_dynamix: bool | None = Field(validation_alias='installCsiDynamix', default=None)
|
||||||
|
install_ess: bool | None = Field(validation_alias='installEss', default=None)
|
||||||
|
install_kyverno: bool | None = Field(validation_alias='installKyverno', default=None)
|
||||||
|
install_metrics: bool | None = Field(validation_alias='installMetrics', default=None)
|
||||||
|
install_monitoring: bool | None = Field(validation_alias='installMonitoring', default=None)
|
||||||
|
install_pod_logger: bool | None = Field(validation_alias='installPodLogger', default=None)
|
||||||
|
install_rbac_manager: bool | None = Field(validation_alias='installRbacManager', default=None)
|
||||||
|
install_trivy: bool | None = Field(validation_alias='installTrivy', default=None)
|
||||||
|
int_virtual_address: str | None = Field(validation_alias='intVirtualAddress', default=None)
|
||||||
|
internal_lb_addresses: list[str] | None = Field(validation_alias='internalLBAddresses', default=None)
|
||||||
|
kube_config: str | None = Field(validation_alias='kubeConfig', default=None)
|
||||||
|
kube_container_repository: int | None = Field(validation_alias='kubeContainerRepository', default=None)
|
||||||
|
kube_version: str | None = Field(validation_alias='kubeVersion', default=None)
|
||||||
|
last_editor: int | None = Field(validation_alias='lastEditor', default=None)
|
||||||
|
load_balancer_external_ip_addresses: list[str] | None = Field(validation_alias='loadBalancerExternalIPAddresses', default=None)
|
||||||
|
load_balancer_hostnames: list[str] | None = Field(validation_alias='loadBalancerHostnames', default=None)
|
||||||
|
load_balancer_internal_ip_addresses: list[str] | None = Field(validation_alias='loadBalancerInternalIPAddresses', default=None)
|
||||||
|
load_balancer_machine_os_build: list[str] | None = Field(validation_alias='loadBalancerMachineOSBuild', default=None)
|
||||||
|
load_balancer_machine_os_type: list[str] | None = Field(validation_alias='loadBalancerMachineOSType', default=None)
|
||||||
|
load_balancer_root_passwords: list[str] | None = Field(validation_alias='loadBalancerRootPasswords', default=None)
|
||||||
|
load_balancer_root_usernames: list[str] | None = Field(validation_alias='loadBalancerRootUsernames', default=None)
|
||||||
|
load_balancer_secure_shell_ports: list[int] | None = Field(validation_alias='loadBalancerSecureShellPorts', default=None)
|
||||||
|
load_balancer_user_passwords: list[str] | None = Field(validation_alias='loadBalancerUserPasswords', default=None)
|
||||||
|
load_balancer_user_usernames: list[str] | None = Field(validation_alias='loadBalancerUserUsernames', default=None)
|
||||||
|
local_network_id: int | None = Field(validation_alias='localNetworkId', default=None)
|
||||||
|
machine_os_build: str | None = Field(validation_alias='machineOSBuild', default=None)
|
||||||
|
machine_os_image_id: int | None = Field(validation_alias='machineOSImageId', default=None)
|
||||||
|
machine_os_type: str | None = Field(validation_alias='machineOSType', default=None)
|
||||||
|
machine_provider: str | None = Field(validation_alias='machineProvider', default=None)
|
||||||
|
master_addresses: list[str] | None = Field(validation_alias='masterAddresses', default=None)
|
||||||
|
master_cpu_count: int | None = Field(validation_alias='masterCPUCount', default=None)
|
||||||
|
master_cloud_init: str | None = Field(validation_alias='masterCloudInit', default=None)
|
||||||
|
master_count: int | None = Field(validation_alias='masterCount', default=None)
|
||||||
|
master_disk_size: int | None = Field(validation_alias='masterDiskSize', default=None)
|
||||||
|
master_gpu_ids: list[int] | None = Field(validation_alias='masterGpuIds', default=None)
|
||||||
|
master_hostnames: list[str] | None = Field(validation_alias='masterHostnames', default=None)
|
||||||
|
master_memory_size: int | None = Field(validation_alias='masterMemorySize', default=None)
|
||||||
|
master_nodes_external_ip_adresses: list[str] | None = Field(validation_alias='masterNodesExternalIPAdresses', default=None)
|
||||||
|
master_nodes_machine_os_builds: list[str] | None = Field(validation_alias='masterNodesMachineOSBuilds', default=None)
|
||||||
|
master_nodes_machine_os_types: list[str] | None = Field(validation_alias='masterNodesMachineOSTypes', default=None)
|
||||||
|
master_nodes_root_passwords: list[str] | None = Field(validation_alias='masterNodesRootPasswords', default=None)
|
||||||
|
master_nodes_root_usernames: list[str] | None = Field(validation_alias='masterNodesRootUsernames', default=None)
|
||||||
|
master_nodes_secure_shell_ports: list[int] | None = Field(validation_alias='masterNodesSecureShellPorts', default=None)
|
||||||
|
master_nodes_user_passwords: list[str] | None = Field(validation_alias='masterNodesUserPasswords', default=None)
|
||||||
|
master_nodes_user_usernames: list[str] | None = Field(validation_alias='masterNodesUserUsernames', default=None)
|
||||||
|
masters_dynamix_sep_id: int | None = Field(validation_alias='mastersDynamixSEPId', default=None)
|
||||||
|
masters_dynamix_sep_pool: str | None = Field(validation_alias='mastersDynamixSEPPool', default=None)
|
||||||
|
owner_id: int | None = Field(validation_alias='ownerId', default=None)
|
||||||
|
package_repository: int | None = Field(validation_alias='packageRepository', default=None)
|
||||||
|
provide_dns: bool | None = Field(validation_alias='provideDNS', default=None)
|
||||||
|
save_computes_on_failed_k8_s_creation: bool | None = Field(validation_alias='saveComputesOnFailedK8SCreation', default=None)
|
||||||
|
shared: bool | None = Field(validation_alias='shared', default=None)
|
||||||
|
storage_policy_id: int | None = Field(validation_alias='storagePolicyID', default=None)
|
||||||
|
use_custom_external_lb_addresses: bool | None = Field(validation_alias='useCustomExternalLBAddresses', default=None)
|
||||||
|
use_custom_internal_lb_addresses: bool | None = Field(validation_alias='useCustomInternalLBAddresses', default=None)
|
||||||
|
use_custom_master_ip_addresses: bool | None = Field(validation_alias='useCustomMasterIPAddresses', default=None)
|
||||||
|
use_custom_worker_ip_addresses: bool | None = Field(validation_alias='useCustomWorkerIPAddresses', default=None)
|
||||||
|
use_dynamix_extnet: bool | None = Field(validation_alias='useDynamixExtnet', default=None)
|
||||||
|
user_id: int | None = Field(validation_alias='userId', default=None)
|
||||||
|
version_crypt: str | None = Field(validation_alias='versionCrypt', default=None)
|
||||||
|
vins_global_network_id: int | None = Field(validation_alias='vinsGlobalNetworkId', default=None)
|
||||||
|
worker_addresses: list[str] | None = Field(validation_alias='workerAddresses', default=None)
|
||||||
|
worker_annotations: list[str] | None = Field(validation_alias='workerAnnotations', default=None)
|
||||||
|
worker_cpu_count: int | None = Field(validation_alias='workerCPUCount', default=None)
|
||||||
|
worker_cloud_init: str | None = Field(validation_alias='workerCloudInit', default=None)
|
||||||
|
worker_count: int | None = Field(validation_alias='workerCount', default=None)
|
||||||
|
worker_disk_size: int | None = Field(validation_alias='workerDiskSize', default=None)
|
||||||
|
worker_gpu_ids: list[int] | None = Field(validation_alias='workerGpuIds', default=None)
|
||||||
|
worker_group_name: str | None = Field(validation_alias='workerGroupName', default=None)
|
||||||
|
worker_hostnames: list[str] | None = Field(validation_alias='workerHostnames', default=None)
|
||||||
|
worker_labels: list[str] | None = Field(validation_alias='workerLabels', default=None)
|
||||||
|
worker_memory_size: int | None = Field(validation_alias='workerMemorySize', default=None)
|
||||||
|
worker_nodes_external_ip_adresses: list[str] | None = Field(validation_alias='workerNodesExternalIPAdresses', default=None)
|
||||||
|
worker_nodes_machine_os_builds: list[str] | None = Field(validation_alias='workerNodesMachineOSBuilds', default=None)
|
||||||
|
worker_nodes_machine_os_types: list[str] | None = Field(validation_alias='workerNodesMachineOSTypes', default=None)
|
||||||
|
worker_nodes_root_passwords: list[str] | None = Field(validation_alias='workerNodesRootPasswords', default=None)
|
||||||
|
worker_nodes_root_usernames: list[str] | None = Field(validation_alias='workerNodesRootUsernames', default=None)
|
||||||
|
worker_nodes_secure_shell_ports: list[int] | None = Field(validation_alias='workerNodesSecureShellPorts', default=None)
|
||||||
|
worker_nodes_user_passwords: list[str] | None = Field(validation_alias='workerNodesUserPasswords', default=None)
|
||||||
|
worker_nodes_user_usernames: list[str] | None = Field(validation_alias='workerNodesUserUsernames', default=None)
|
||||||
|
worker_taints: list[str] | None = Field(validation_alias='workerTaints', default=None)
|
||||||
|
workers_dynamix_sep_id: int | None = Field(validation_alias='workersDynamixSEPId', default=None)
|
||||||
|
workers_dynamix_sep_pool: str | None = Field(validation_alias='workersDynamixSEPPool', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
template: Template | None = Field(validation_alias='template', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterTemplateGetResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterTemplateGetImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/clusterTemplate/get'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
id: int,
|
||||||
|
) -> DigitalenergyClusterTemplateGetResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class ClusterType(Enum):
|
||||||
|
DYNAMIX = 'dynamix'
|
||||||
|
GENERIC = 'generic'
|
||||||
|
DENERGY = 'denergy'
|
||||||
|
BAREMETAL = 'baremetal'
|
||||||
|
|
||||||
|
|
||||||
|
class TemplatesItem(_ResultModel):
|
||||||
|
cluster_template_name: str | None = Field(validation_alias='clusterTemplateName', default=None)
|
||||||
|
cluster_type: str | None = Field(validation_alias='clusterType', default=None)
|
||||||
|
container_network_type: str | None = Field(validation_alias='containerNetworkType', default=None)
|
||||||
|
creation_date: str | None = Field(validation_alias='creationDate', default=None)
|
||||||
|
description: str | None = Field(validation_alias='description', default=None)
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
kube_version: str | None = Field(validation_alias='kubeVersion', default=None)
|
||||||
|
machine_os_type: str | None = Field(validation_alias='machineOSType', default=None)
|
||||||
|
owner_id: int | None = Field(validation_alias='ownerId', default=None)
|
||||||
|
shared: bool | None = Field(validation_alias='shared', default=None)
|
||||||
|
user_id: int | None = Field(validation_alias='userId', default=None)
|
||||||
|
username: str | None = Field(validation_alias='username', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
templates: list[TemplatesItem] | None = Field(validation_alias='templates', default=None)
|
||||||
|
total: int | None = Field(validation_alias='total', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterTemplateListResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterTemplateListImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/clusterTemplate/list'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'cluster_type': 'clusterType',
|
||||||
|
'sort_by': 'sortBy',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
cluster_type: ClusterType | None = None,
|
||||||
|
sort_by: str | None = None,
|
||||||
|
limit: int | None = None,
|
||||||
|
page: int | None = None,
|
||||||
|
) -> DigitalenergyClusterTemplateListResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,176 @@
|
|||||||
|
from http import HTTPMethod
|
||||||
|
from typing import Any
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
from pydantic import Field
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationImpl as _APIOperationImpl
|
||||||
|
from digital_energy_sdk.base import ParamModel as _ParamModel
|
||||||
|
from digital_energy_sdk.base import ParamFile as _ParamFile
|
||||||
|
from digital_energy_sdk.base import ResultModel as _ResultModel
|
||||||
|
from digital_energy_sdk.types import results as _results
|
||||||
|
|
||||||
|
|
||||||
|
class ExtraCluster2(_ParamModel):
|
||||||
|
app_container_repository: int | None = Field(serialization_alias='appContainerRepository', default=None)
|
||||||
|
audit_enable: bool | None = Field(serialization_alias='auditEnable', default=None)
|
||||||
|
audit_log_max_age: int | None = Field(serialization_alias='auditLogMaxAge', default=None)
|
||||||
|
audit_log_max_backup: int | None = Field(serialization_alias='auditLogMaxBackup', default=None)
|
||||||
|
audit_log_max_size: int | None = Field(serialization_alias='auditLogMaxSize', default=None)
|
||||||
|
audit_policy: str | None = Field(serialization_alias='auditPolicy', default=None)
|
||||||
|
balancers_dynamix_sep_id: int | None = Field(serialization_alias='balancersDynamixSEPId', default=None)
|
||||||
|
balancers_dynamix_sep_pool: str | None = Field(serialization_alias='balancersDynamixSEPPool', default=None)
|
||||||
|
certificate_issuer_id: int | None = Field(serialization_alias='certificateIssuerId', default=None)
|
||||||
|
certificate_key: str | None = Field(serialization_alias='certificateKey', default=None)
|
||||||
|
certificate_validity_before: str | None = Field(serialization_alias='certificateValidityBefore', default=None)
|
||||||
|
chart_repository: int | None = Field(serialization_alias='chartRepository', default=None)
|
||||||
|
cluster_hostname: str | None = Field(serialization_alias='clusterHostname', default=None)
|
||||||
|
cluster_machine_os_build: str | None = Field(serialization_alias='clusterMachineOSBuild', default=None)
|
||||||
|
cluster_machine_os_type: str | None = Field(serialization_alias='clusterMachineOSType', default=None)
|
||||||
|
cluster_name: str | None = Field(serialization_alias='clusterName', default=None)
|
||||||
|
cluster_template_description: str | None = Field(serialization_alias='clusterTemplateDescription', default=None)
|
||||||
|
cluster_template_name: str | None = Field(serialization_alias='clusterTemplateName', default=None)
|
||||||
|
cluster_type: str | None = Field(serialization_alias='clusterType', default=None)
|
||||||
|
container_network_type: str | None = Field(serialization_alias='containerNetworkType', default=None)
|
||||||
|
create_cluster_template: bool | None = Field(serialization_alias='createClusterTemplate', default=None)
|
||||||
|
custom_mtu: int | None = Field(serialization_alias='customMTU', default=None)
|
||||||
|
denergy_runtime_type: str | None = Field(serialization_alias='denergyRuntimeType', default=None)
|
||||||
|
description: str | None = Field(serialization_alias='description', default=None)
|
||||||
|
domain_resolvers: list[str] | None = Field(serialization_alias='domainResolvers', default=None)
|
||||||
|
dynamix_app_id: str | None = Field(serialization_alias='dynamixAppId', default=None)
|
||||||
|
dynamix_app_secret: str | None = Field(serialization_alias='dynamixAppSecret', default=None)
|
||||||
|
dynamix_auth_domain: str | None = Field(serialization_alias='dynamixAuthDomain', default=None)
|
||||||
|
dynamix_auth_type: str | None = Field(serialization_alias='dynamixAuthType', default=None)
|
||||||
|
dynamix_k8_ci_id: int | None = Field(serialization_alias='dynamixK8CIId', default=None)
|
||||||
|
dynamix_password: str | None = Field(serialization_alias='dynamixPassword', default=None)
|
||||||
|
dynamix_rg_id: int | None = Field(serialization_alias='dynamixRGId', default=None)
|
||||||
|
dynamix_sep_id: int | None = Field(serialization_alias='dynamixSEPId', default=None)
|
||||||
|
dynamix_sep_pool: str | None = Field(serialization_alias='dynamixSEPPool', default=None)
|
||||||
|
dynamix_ssourl: str | None = Field(serialization_alias='dynamixSSOURL', default=None)
|
||||||
|
dynamix_url: str | None = Field(serialization_alias='dynamixURL', default=None)
|
||||||
|
dynamix_username: str | None = Field(serialization_alias='dynamixUsername', default=None)
|
||||||
|
enable_custom_load_balancer_hostnames: bool | None = Field(serialization_alias='enableCustomLoadBalancerHostnames', default=None)
|
||||||
|
enable_custom_master_hostnames: bool | None = Field(serialization_alias='enableCustomMasterHostnames', default=None)
|
||||||
|
enable_custom_worker_hostnames: bool | None = Field(serialization_alias='enableCustomWorkerHostnames', default=None)
|
||||||
|
ess_auth_token: str | None = Field(serialization_alias='essAuthToken', default=None)
|
||||||
|
ext_virtual_address: str | None = Field(serialization_alias='extVirtualAddress', default=None)
|
||||||
|
external_lb_addresses: list[str] | None = Field(serialization_alias='externalLBAddresses', default=None)
|
||||||
|
global_network_id: int | None = Field(serialization_alias='globalNetworkId', default=None)
|
||||||
|
i_load_balancer_cpu_count: int | None = Field(serialization_alias='iLoadBalancerCPUCount', default=None)
|
||||||
|
i_load_balancer_cloud_init: str | None = Field(serialization_alias='iLoadBalancerCloudInit', default=None)
|
||||||
|
i_load_balancer_count: int | None = Field(serialization_alias='iLoadBalancerCount', default=None)
|
||||||
|
i_load_balancer_disk_size: int | None = Field(serialization_alias='iLoadBalancerDiskSize', default=None)
|
||||||
|
i_load_balancer_gpu_ids: list[int] | None = Field(serialization_alias='iLoadBalancerGpuIds', default=None)
|
||||||
|
i_load_balancer_memory_size: int | None = Field(serialization_alias='iLoadBalancerMemorySize', default=None)
|
||||||
|
initial_secure_shell_port: int | None = Field(serialization_alias='initialSecureShellPort', default=None)
|
||||||
|
install_criobox: bool | None = Field(serialization_alias='installCriobox', default=None)
|
||||||
|
install_csi_dynamix: bool | None = Field(serialization_alias='installCsiDynamix', default=None)
|
||||||
|
install_ess: bool | None = Field(serialization_alias='installEss', default=None)
|
||||||
|
install_kyverno: bool | None = Field(serialization_alias='installKyverno', default=None)
|
||||||
|
install_metrics: bool | None = Field(serialization_alias='installMetrics', default=None)
|
||||||
|
install_monitoring: bool | None = Field(serialization_alias='installMonitoring', default=None)
|
||||||
|
install_pod_logger: bool | None = Field(serialization_alias='installPodLogger', default=None)
|
||||||
|
install_rbac_manager: bool | None = Field(serialization_alias='installRbacManager', default=None)
|
||||||
|
install_trivy: bool | None = Field(serialization_alias='installTrivy', default=None)
|
||||||
|
int_virtual_address: str | None = Field(serialization_alias='intVirtualAddress', default=None)
|
||||||
|
internal_lb_addresses: list[str] | None = Field(serialization_alias='internalLBAddresses', default=None)
|
||||||
|
kube_config: str | None = Field(serialization_alias='kubeConfig', default=None)
|
||||||
|
kube_container_repository: int | None = Field(serialization_alias='kubeContainerRepository', default=None)
|
||||||
|
kube_version: str | None = Field(serialization_alias='kubeVersion', default=None)
|
||||||
|
load_balancer_external_ip_addresses: list[str] | None = Field(serialization_alias='loadBalancerExternalIPAddresses', default=None)
|
||||||
|
load_balancer_hostnames: list[str] | None = Field(serialization_alias='loadBalancerHostnames', default=None)
|
||||||
|
load_balancer_internal_ip_addresses: list[str] | None = Field(serialization_alias='loadBalancerInternalIPAddresses', default=None)
|
||||||
|
load_balancer_machine_os_build: list[str] | None = Field(serialization_alias='loadBalancerMachineOSBuild', default=None)
|
||||||
|
load_balancer_machine_os_type: list[str] | None = Field(serialization_alias='loadBalancerMachineOSType', default=None)
|
||||||
|
load_balancer_root_passwords: list[str] | None = Field(serialization_alias='loadBalancerRootPasswords', default=None)
|
||||||
|
load_balancer_root_usernames: list[str] | None = Field(serialization_alias='loadBalancerRootUsernames', default=None)
|
||||||
|
load_balancer_secure_shell_ports: list[int] | None = Field(serialization_alias='loadBalancerSecureShellPorts', default=None)
|
||||||
|
load_balancer_user_passwords: list[str] | None = Field(serialization_alias='loadBalancerUserPasswords', default=None)
|
||||||
|
load_balancer_user_usernames: list[str] | None = Field(serialization_alias='loadBalancerUserUsernames', default=None)
|
||||||
|
local_network_id: int | None = Field(serialization_alias='localNetworkId', default=None)
|
||||||
|
machine_os_build: str | None = Field(serialization_alias='machineOSBuild', default=None)
|
||||||
|
machine_os_image_id: int | None = Field(serialization_alias='machineOSImageId', default=None)
|
||||||
|
machine_os_type: str | None = Field(serialization_alias='machineOSType', default=None)
|
||||||
|
machine_provider: str | None = Field(serialization_alias='machineProvider', default=None)
|
||||||
|
master_addresses: list[str] | None = Field(serialization_alias='masterAddresses', default=None)
|
||||||
|
master_cpu_count: int | None = Field(serialization_alias='masterCPUCount', default=None)
|
||||||
|
master_cloud_init: str | None = Field(serialization_alias='masterCloudInit', default=None)
|
||||||
|
master_count: int | None = Field(serialization_alias='masterCount', default=None)
|
||||||
|
master_disk_size: int | None = Field(serialization_alias='masterDiskSize', default=None)
|
||||||
|
master_gpu_ids: list[int] | None = Field(serialization_alias='masterGpuIds', default=None)
|
||||||
|
master_hostnames: list[str] | None = Field(serialization_alias='masterHostnames', default=None)
|
||||||
|
master_memory_size: int | None = Field(serialization_alias='masterMemorySize', default=None)
|
||||||
|
master_nodes_external_ip_adresses: list[str] | None = Field(serialization_alias='masterNodesExternalIPAdresses', default=None)
|
||||||
|
master_nodes_machine_os_builds: list[str] | None = Field(serialization_alias='masterNodesMachineOSBuilds', default=None)
|
||||||
|
master_nodes_machine_os_types: list[str] | None = Field(serialization_alias='masterNodesMachineOSTypes', default=None)
|
||||||
|
master_nodes_root_passwords: list[str] | None = Field(serialization_alias='masterNodesRootPasswords', default=None)
|
||||||
|
master_nodes_root_usernames: list[str] | None = Field(serialization_alias='masterNodesRootUsernames', default=None)
|
||||||
|
master_nodes_secure_shell_ports: list[int] | None = Field(serialization_alias='masterNodesSecureShellPorts', default=None)
|
||||||
|
master_nodes_user_passwords: list[str] | None = Field(serialization_alias='masterNodesUserPasswords', default=None)
|
||||||
|
master_nodes_user_usernames: list[str] | None = Field(serialization_alias='masterNodesUserUsernames', default=None)
|
||||||
|
masters_dynamix_sep_id: int | None = Field(serialization_alias='mastersDynamixSEPId', default=None)
|
||||||
|
masters_dynamix_sep_pool: str | None = Field(serialization_alias='mastersDynamixSEPPool', default=None)
|
||||||
|
package_repository: int | None = Field(serialization_alias='packageRepository', default=None)
|
||||||
|
provide_dns: bool | None = Field(serialization_alias='provideDNS', default=None)
|
||||||
|
save_computes_on_failed_k8_s_creation: bool | None = Field(serialization_alias='saveComputesOnFailedK8SCreation', default=None)
|
||||||
|
shared_cluster_template: bool | None = Field(serialization_alias='sharedClusterTemplate', default=None)
|
||||||
|
storage_policy_id: int | None = Field(serialization_alias='storagePolicyId', default=None)
|
||||||
|
use_custom_external_lb_addresses: bool | None = Field(serialization_alias='useCustomExternalLBAddresses', default=None)
|
||||||
|
use_custom_internal_lb_addresses: bool | None = Field(serialization_alias='useCustomInternalLBAddresses', default=None)
|
||||||
|
use_custom_master_ip_addresses: bool | None = Field(serialization_alias='useCustomMasterIPAddresses', default=None)
|
||||||
|
use_custom_worker_ip_addresses: bool | None = Field(serialization_alias='useCustomWorkerIPAddresses', default=None)
|
||||||
|
use_dynamix_extnet: bool | None = Field(serialization_alias='useDynamixExtnet', default=None)
|
||||||
|
vins_global_network_id: int | None = Field(serialization_alias='vinsGlobalNetworkId', default=None)
|
||||||
|
worker_addresses: list[str] | None = Field(serialization_alias='workerAddresses', default=None)
|
||||||
|
worker_annotations: list[str] | None = Field(serialization_alias='workerAnnotations', default=None)
|
||||||
|
worker_cpu_count: int | None = Field(serialization_alias='workerCPUCount', default=None)
|
||||||
|
worker_cloud_init: str | None = Field(serialization_alias='workerCloudInit', default=None)
|
||||||
|
worker_count: int | None = Field(serialization_alias='workerCount', default=None)
|
||||||
|
worker_disk_size: int | None = Field(serialization_alias='workerDiskSize', default=None)
|
||||||
|
worker_gpu_ids: list[int] | None = Field(serialization_alias='workerGpuIds', default=None)
|
||||||
|
worker_group_name: str | None = Field(serialization_alias='workerGroupName', default=None)
|
||||||
|
worker_hostnames: list[str] | None = Field(serialization_alias='workerHostnames', default=None)
|
||||||
|
worker_labels: list[str] | None = Field(serialization_alias='workerLabels', default=None)
|
||||||
|
worker_memory_size: int | None = Field(serialization_alias='workerMemorySize', default=None)
|
||||||
|
worker_nodes_external_ip_adresses: list[str] | None = Field(serialization_alias='workerNodesExternalIPAdresses', default=None)
|
||||||
|
worker_nodes_machine_os_builds: list[str] | None = Field(serialization_alias='workerNodesMachineOSBuilds', default=None)
|
||||||
|
worker_nodes_machine_os_types: list[str] | None = Field(serialization_alias='workerNodesMachineOSTypes', default=None)
|
||||||
|
worker_nodes_root_passwords: list[str] | None = Field(serialization_alias='workerNodesRootPasswords', default=None)
|
||||||
|
worker_nodes_root_usernames: list[str] | None = Field(serialization_alias='workerNodesRootUsernames', default=None)
|
||||||
|
worker_nodes_secure_shell_ports: list[int] | None = Field(serialization_alias='workerNodesSecureShellPorts', default=None)
|
||||||
|
worker_nodes_user_passwords: list[str] | None = Field(serialization_alias='workerNodesUserPasswords', default=None)
|
||||||
|
worker_nodes_user_usernames: list[str] | None = Field(serialization_alias='workerNodesUserUsernames', default=None)
|
||||||
|
worker_taints: list[str] | None = Field(serialization_alias='workerTaints', default=None)
|
||||||
|
workers_dynamix_sep_id: int | None = Field(serialization_alias='workersDynamixSEPId', default=None)
|
||||||
|
workers_dynamix_sep_pool: str | None = Field(serialization_alias='workersDynamixSEPPool', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class ExtraCluster1(_ParamModel):
|
||||||
|
extra_cluster: ExtraCluster2 | None = Field(serialization_alias='extraCluster', default=None)
|
||||||
|
id: int | None = Field(serialization_alias='id', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class Result(_ResultModel):
|
||||||
|
id: int | None = Field(validation_alias='id', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterTemplateUpdateResult(_ResultModel):
|
||||||
|
error: bool | None = Field(validation_alias='error', default=None)
|
||||||
|
error_code: int | None = Field(validation_alias='errorCode', default=None)
|
||||||
|
message: str | None = Field(validation_alias='message', default=None)
|
||||||
|
result: Result | None = Field(validation_alias='result', default=None)
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyClusterTemplateUpdateImpl(_APIOperationImpl):
|
||||||
|
path = '/api/v1/digitalenergy/clusterTemplate/update'
|
||||||
|
http_method = HTTPMethod.POST
|
||||||
|
param_aliases = {
|
||||||
|
'extra_cluster': 'extraCluster',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __call__(
|
||||||
|
self,
|
||||||
|
*,
|
||||||
|
extra_cluster: ExtraCluster1,
|
||||||
|
) -> DigitalenergyClusterTemplateUpdateResult:
|
||||||
|
raise NotImplementedError
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from ._group import DigitalenergyCodescoringImpl
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['DigitalenergyCodescoringImpl']
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
from functools import cached_property
|
||||||
|
|
||||||
|
from digital_energy_sdk.base import APIOperationGroupImpl
|
||||||
|
from .describe import DigitalenergyCodescoringDescribeImpl
|
||||||
|
from .install import DigitalenergyCodescoringInstallImpl
|
||||||
|
from .uninstall import DigitalenergyCodescoringUninstallImpl
|
||||||
|
|
||||||
|
|
||||||
|
class DigitalenergyCodescoringImpl(APIOperationGroupImpl):
|
||||||
|
@cached_property
|
||||||
|
def describe(self) -> DigitalenergyCodescoringDescribeImpl:
|
||||||
|
return DigitalenergyCodescoringDescribeImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def install(self) -> DigitalenergyCodescoringInstallImpl:
|
||||||
|
return DigitalenergyCodescoringInstallImpl(config=self._config)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def uninstall(self) -> DigitalenergyCodescoringUninstallImpl:
|
||||||
|
return DigitalenergyCodescoringUninstallImpl(config=self._config)
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user