Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7df3848866 | |||
| 66601495dd | |||
| fac66abef6 | |||
| 56db28cb37 | |||
| 1703d1ed33 |
@@ -1,32 +0,0 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: end-of-file-fixer
|
||||
- id: file-contents-sorter
|
||||
files: .*mapping.yml
|
||||
args:
|
||||
- --unique
|
||||
- id: no-commit-to-branch
|
||||
name: no-commit-to-branch (main, master, dev_*)
|
||||
args:
|
||||
- --pattern
|
||||
- dev_.*
|
||||
- repo: https://github.com/pycqa/flake8
|
||||
rev: 7.1.2
|
||||
hooks:
|
||||
- id: flake8
|
||||
name: flake8 (1/2)
|
||||
files: src/dynamix_sdk/types\.py|.*__init__\.py|.*_api\.py
|
||||
args:
|
||||
- --extend-ignore=F401,F403,F405
|
||||
- id: flake8
|
||||
name: flake8 (2/2)
|
||||
exclude: src/dynamix_sdk/types\.py|.*__init__\.py|.*_api\.py
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: pytest-local-tests
|
||||
name: pytest local tests
|
||||
entry: pytest tests/local
|
||||
language: system
|
||||
pass_filenames: false
|
||||
17
CHANGELOG.md
17
CHANGELOG.md
@@ -1,20 +1,13 @@
|
||||
# Список изменений в версии 1.2.3
|
||||
# Список изменений в версии 1.4.1
|
||||
|
||||
## Добавлено
|
||||
|
||||
### Функциональный интерфейс
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
|
||||
## Удалено
|
||||
|
||||
### Функциональный интерфейс
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
|
||||
## Исправлено
|
||||
|
||||
### Функциональный интерфейс
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BPYS-990 | Функции `cloudapi.kvmx86.create`, `cloudapi.kvmx86.create_blank`: вызов функций завершался ошибкой валидации поля `sdn_logical_port_id` для модели `InterfaceAPIParamsNM` при передаче данных в параметр `interfaces`. |
|
||||
| BPYS-1101 | Функция `cloudapi.disks.list_unattached`: вызов функции завершался ошибкой валидации поля `data.0.blkdiscard`. В модель результата добавлено поле `data.blkdiscard`. |
|
||||
| BPYS-1100 | Функция `cloudapi.disks.list_unattached`: вызов функции завершался ошибкой валидации поля `data.0.cache`. В модель результата добавлено поле `data.cache_mode`. |
|
||||
| BPYS-1102 | Функция `cloudapi.disks.list_unattached`: вызов функции завершался ошибкой валидации поля `data.0.storage_policy_id`. В модель результата добавлено поле `data.storage_policy_id`. |
|
||||
| BPYS-1103 | Функция `cloudapi.disks.list_unattached`: вызов функции завершался ошибкой валидации поля `data.0.to_clean`. В модель результата добавлено поле `data.to_clean`. |
|
||||
|
||||
4
Makefile
4
Makefile
@@ -1,4 +0,0 @@
|
||||
dev:
|
||||
pip install -e .
|
||||
pip install -r requirements-dev.txt
|
||||
pre-commit install
|
||||
362
README.md
362
README.md
@@ -15,7 +15,8 @@
|
||||
- [Ошибки и исключения (exceptions)](#ошибки-и-исключения-exceptions)
|
||||
- [Ошибки валидации данных](#ошибки-валидации-данных)
|
||||
- [Ошибки HTTP](#ошибки-http)
|
||||
- [Доступный функционал](#доступный-функционал)
|
||||
- [Ошибка несовместимости c API](#ошибка-несовместимости-с-api)
|
||||
- [Доступная функциональность](#доступная-функциональность)
|
||||
- [Способы авторизации](#способы-авторизации)
|
||||
- [Функции API](#функции-api)
|
||||
- [Cloudapi](#cloudapi)
|
||||
@@ -26,7 +27,7 @@
|
||||
|
||||
**Dynamix Python SDK** предоставляет удобный интерфейс для интеграции взаимодействия с API **Dynamix Enterprise** в программный код на языке Python.
|
||||
|
||||
**Примечание:** проект находится в стадии активной разработки, [доступный функционал](#доступный-функционал) будет расширяться с каждой новой версией.
|
||||
**Примечание:** проект находится в стадии активной разработки, [доступная функциональность](#доступная-функциональность) будет расширяться с каждой новой версией.
|
||||
|
||||
## Системные требования
|
||||
|
||||
@@ -34,6 +35,8 @@
|
||||
|
||||
| Версия платформы | Версия SDK |
|
||||
| --- | --- |
|
||||
| 4.5.0 | 1.4.x |
|
||||
| 4.4.0 | 1.3.x |
|
||||
| 4.4.0 build 963 | 1.2.x |
|
||||
| 4.3.0 | 1.1.x |
|
||||
| 4.2.0 | 1.0.x |
|
||||
@@ -119,6 +122,24 @@ dx = Dynamix(
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Задание декораторов для всех вызываемых функций</summary>
|
||||
|
||||
```python
|
||||
from dynamix_sdk import Dynamix
|
||||
|
||||
|
||||
Dynamix(
|
||||
...,
|
||||
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 секунд. Данное поведение можно скорректировать:
|
||||
@@ -186,6 +207,24 @@ BVSAuth(
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Игнорирование проверки совместимости с API</summary>
|
||||
|
||||
**Важно:** игнорирование проверки совместимости с API может вызвать непредвиденные ошибки в работе SDK, поэтому использование данной возможности допустимо только принимая на себя всю ответственность за возможные последствия.
|
||||
|
||||
При игнорирование выводится только сообщение с предупреждением о несовместимости.
|
||||
|
||||
```python
|
||||
from dynamix_sdk import Dynamix
|
||||
|
||||
|
||||
Dynamix(
|
||||
...,
|
||||
ignore_api_compatibility=True,
|
||||
)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Функциональный интерфейс
|
||||
|
||||
Функциональный интерфейс предоставляет функции, соответствующие функциям API платформы.
|
||||
@@ -196,17 +235,35 @@ BVSAuth(
|
||||
|
||||

|
||||
|
||||
Предусмотрена возможность использования сокращённого названия для некоторых часто используемых атрибутов:
|
||||
|
||||
```python
|
||||
from dynamix_sdk import Dynamix
|
||||
|
||||
|
||||
dx = Dynamix(...)
|
||||
|
||||
# /cloudapi/kvmx86/create
|
||||
dx.api.ca.kvmx86.create(...) # ca = cloudapi
|
||||
|
||||
# /cloudbroker/account/create
|
||||
dx.api.cb.account.create(...) # cb = cloudbroker
|
||||
|
||||
# /system/usermanager/whoami
|
||||
dx.api.sys.usermanager.whoami(...) # sys = system
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Передача вложенных параметров </summary>
|
||||
|
||||
```python
|
||||
from dynamix_sdk import Dynamix, types
|
||||
from dynamix_sdk import Dynamix, types as sdk_types
|
||||
|
||||
|
||||
dx = Dynamix(...)
|
||||
|
||||
data_disk_1 = types.DiskAPIParamsNM(name='data_disk_1', size_gb=10)
|
||||
data_disk_1 = sdk_types.DiskAPIParamsNM(name='data_disk_1', size_gb=10)
|
||||
|
||||
# /cloudapi/kvmx86/create
|
||||
new_vm_id = dx.api.cloudapi.kvmx86.create(
|
||||
@@ -224,7 +281,7 @@ new_vm_id = dx.api.cloudapi.kvmx86.create(
|
||||
<details><summary>Передача параметров перечисляемого типа (enum) </summary>
|
||||
|
||||
```python
|
||||
from dynamix_sdk import Dynamix, types
|
||||
from dynamix_sdk import Dynamix, types as sdk_types
|
||||
|
||||
|
||||
dx = Dynamix(...)
|
||||
@@ -236,8 +293,8 @@ new_vm_id = dx.api.cloudapi.kvmx86.create(
|
||||
cpu_count=1,
|
||||
ram_size_mb=1024,
|
||||
image_id=456,
|
||||
chipset=types.Chipset.Q35, # enum
|
||||
numa_affinity=types.NumaAffinity.none, # enum
|
||||
chipset=sdk_types.Chipset.Q35, # enum
|
||||
numa_affinity=sdk_types.NumaAffinity.NONE, # enum
|
||||
)
|
||||
|
||||
```
|
||||
@@ -455,8 +512,13 @@ SDK для выполнения HTTP-запросов использует би
|
||||
from requests.exceptions import RequestException, HTTPError
|
||||
from dynamix_sdk import Dynamix
|
||||
|
||||
|
||||
dx = Dynamix(...)
|
||||
try:
|
||||
dx = Dynamix(...) # происходит HTTP-запрос для проверки совместимости с API
|
||||
except HTTPError as e:
|
||||
resp = e.response
|
||||
print(f'{e}: {resp.text}')
|
||||
except RequestException as e:
|
||||
print(e)
|
||||
|
||||
vm_id = 1
|
||||
|
||||
@@ -477,7 +539,26 @@ except RequestException as e:
|
||||
|
||||
Подробную информацию об исключениях библиотеки **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>dynamix_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>dynamix_sdk.exceptions.RequestException</code>, необходимо передать в конструкторы классов <code>Dynamix</code>, <code>DECS3OAuth</code>, <code>BVSAuth</code> параметр <code>wrap_request_exceptions=True</code>
|
||||
</details>
|
||||
|
||||
#### Ошибка несовместимости с API
|
||||
При создании экземпляра класса `Dynamix`, SDK производит проверку совместимости с API.
|
||||
При несовместимости будет вызвано исключение `exceptions.IncompatibleAPIError`.
|
||||
|
||||
## Доступная функциональность
|
||||
|
||||
### Способы авторизации
|
||||
|
||||
@@ -499,6 +580,7 @@ except RequestException as e:
|
||||
- /cloudapi/account/disable
|
||||
- /cloudapi/account/enable
|
||||
- /cloudapi/account/get
|
||||
- /cloudapi/account/getResourceConsumption
|
||||
- /cloudapi/account/list
|
||||
- /cloudapi/account/listDeleted
|
||||
- /cloudapi/account/restore
|
||||
@@ -510,6 +592,7 @@ except RequestException as e:
|
||||
<details><summary>audit</summary>
|
||||
|
||||
- /cloudapi/audit/get
|
||||
- /cloudapi/audit/list
|
||||
|
||||
</details>
|
||||
|
||||
@@ -534,7 +617,12 @@ except RequestException as e:
|
||||
- /cloudapi/bservice/groupUpdateVins
|
||||
- /cloudapi/bservice/list
|
||||
- /cloudapi/bservice/listDeleted
|
||||
- /cloudapi/bservice/migrateToZone
|
||||
- /cloudapi/bservice/restore
|
||||
- /cloudapi/bservice/snapshotCreate
|
||||
- /cloudapi/bservice/snapshotDelete
|
||||
- /cloudapi/bservice/snapshotList
|
||||
- /cloudapi/bservice/snapshotRollback
|
||||
- /cloudapi/bservice/start
|
||||
- /cloudapi/bservice/stop
|
||||
|
||||
@@ -542,6 +630,7 @@ except RequestException as e:
|
||||
|
||||
<details><summary>compute</summary>
|
||||
|
||||
- /cloudapi/compute/abort_shared_snapshot_merge
|
||||
- /cloudapi/compute/affinityLabelRemove
|
||||
- /cloudapi/compute/affinityLabelSet
|
||||
- /cloudapi/compute/affinityRelations
|
||||
@@ -551,29 +640,54 @@ except RequestException as e:
|
||||
- /cloudapi/compute/antiAffinityRuleAdd
|
||||
- /cloudapi/compute/antiAffinityRuleRemove
|
||||
- /cloudapi/compute/antiAffinityRulesClear
|
||||
- /cloudapi/compute/attachGpu
|
||||
- /cloudapi/compute/attachPciDevice
|
||||
- /cloudapi/compute/bootDiskSet
|
||||
- /cloudapi/compute/cdEject
|
||||
- /cloudapi/compute/cdInsert
|
||||
- /cloudapi/compute/changeMac
|
||||
- /cloudapi/compute/change_mtu
|
||||
- /cloudapi/compute/change_security_groups
|
||||
- /cloudapi/compute/changeIp
|
||||
- /cloudapi/compute/changeLinkState
|
||||
- /cloudapi/compute/clone
|
||||
- /cloudapi/compute/clone_abort
|
||||
- /cloudapi/compute/createTemplate
|
||||
- /cloudapi/compute/delete
|
||||
- /cloudapi/compute/deleteCustomFields
|
||||
- /cloudapi/compute/detachGpu
|
||||
- /cloudapi/compute/detachPciDevice
|
||||
- /cloudapi/compute/disable
|
||||
- /cloudapi/compute/diskAdd
|
||||
- /cloudapi/compute/diskAttach
|
||||
- /cloudapi/compute/diskDel
|
||||
- /cloudapi/compute/diskDetach
|
||||
- /cloudapi/compute/diskResize
|
||||
- /cloudapi/compute/diskMigrate
|
||||
- /cloudapi/compute/diskSwitchToReplication
|
||||
- /cloudapi/compute/enable
|
||||
- /cloudapi/compute/get
|
||||
- /cloudapi/compute/getConsoleUrl
|
||||
- /cloudapi/compute/guest_agent_disable
|
||||
- /cloudapi/compute/guest_agent_enable
|
||||
- /cloudapi/compute/guest_agent_execute
|
||||
- /cloudapi/compute/guest_agent_feature_update
|
||||
- /cloudapi/compute/list
|
||||
- /cloudapi/compute/listDeleted
|
||||
- /cloudapi/compute/migrateToZone
|
||||
- /cloudapi/compute/moveToRg
|
||||
- /cloudapi/compute/netAttach
|
||||
- /cloudapi/compute/netDetach
|
||||
- /cloudapi/compute/pause
|
||||
- /cloudapi/compute/pfwAdd
|
||||
- /cloudapi/compute/pfwDel
|
||||
- /cloudapi/compute/pfwList
|
||||
- /cloudapi/compute/pinToStack
|
||||
- /cloudapi/compute/pin_to_node
|
||||
- /cloudapi/compute/powerCycle
|
||||
- /cloudapi/compute/reboot
|
||||
- /cloudapi/compute/redeploy
|
||||
- /cloudapi/compute/reset
|
||||
- /cloudapi/compute/resize
|
||||
- /cloudapi/compute/restore
|
||||
- /cloudapi/compute/resume
|
||||
- /cloudapi/compute/setCustomFields
|
||||
- /cloudapi/compute/snapshotCreate
|
||||
@@ -583,7 +697,7 @@ except RequestException as e:
|
||||
- /cloudapi/compute/stop
|
||||
- /cloudapi/compute/tagAdd
|
||||
- /cloudapi/compute/tagRemove
|
||||
- /cloudapi/compute/unpinFromStack
|
||||
- /cloudapi/compute/unpin_from_node
|
||||
- /cloudapi/compute/update
|
||||
- /cloudapi/compute/userGrant
|
||||
- /cloudapi/compute/userList
|
||||
@@ -594,6 +708,7 @@ except RequestException as e:
|
||||
|
||||
<details><summary>disks</summary>
|
||||
|
||||
- /cloudapi/disks/change_disk_storage_policy
|
||||
- /cloudapi/disks/create
|
||||
- /cloudapi/disks/delete
|
||||
- /cloudapi/disks/deleteDisks
|
||||
@@ -642,6 +757,7 @@ except RequestException as e:
|
||||
|
||||
<details><summary>image</summary>
|
||||
|
||||
- /cloudapi/image/change_storage_policy
|
||||
- /cloudapi/image/create
|
||||
- /cloudapi/image/createVirtual
|
||||
- /cloudapi/image/delete
|
||||
@@ -664,11 +780,24 @@ except RequestException as e:
|
||||
|
||||
- /cloudapi/k8s/create
|
||||
- /cloudapi/k8s/delete
|
||||
- /cloudapi/k8s/deleteMasterFromGroup
|
||||
- /cloudapi/k8s/deleteWorkerFromGroup
|
||||
- /cloudapi/k8s/disable
|
||||
- /cloudapi/k8s/enable
|
||||
- /cloudapi/k8s/get
|
||||
- /cloudapi/k8s/getConfig
|
||||
- /cloudapi/k8s/getNodeAnnotations
|
||||
- /cloudapi/k8s/getNodeLabels
|
||||
- /cloudapi/k8s/getNodeTaints
|
||||
- /cloudapi/k8s/list
|
||||
- /cloudapi/k8s/listDeleted
|
||||
- /cloudapi/k8s/migrateToZone
|
||||
- /cloudapi/k8s/restore
|
||||
- /cloudapi/k8s/start
|
||||
- /cloudapi/k8s/stop
|
||||
- /cloudapi/k8s/update
|
||||
- /cloudapi/k8s/updateWorkerNodesMetaData
|
||||
- /cloudapi/k8s/workerAdd
|
||||
- /cloudapi/k8s/workerReset
|
||||
- /cloudapi/k8s/workerRestart
|
||||
- /cloudapi/k8s/workersGroupAdd
|
||||
@@ -692,6 +821,7 @@ except RequestException as e:
|
||||
- /cloudapi/lb/backendServerDelete
|
||||
- /cloudapi/lb/backendServerUpdate
|
||||
- /cloudapi/lb/backendUpdate
|
||||
- /cloudapi/lb/configReset
|
||||
- /cloudapi/lb/create
|
||||
- /cloudapi/lb/delete
|
||||
- /cloudapi/lb/disable
|
||||
@@ -705,6 +835,13 @@ except RequestException as e:
|
||||
- /cloudapi/lb/list
|
||||
- /cloudapi/lb/listDeleted
|
||||
- /cloudapi/lb/makeHighlyAvailable
|
||||
- /cloudapi/lb/migrateToZone
|
||||
- /cloudapi/lb/restart
|
||||
- /cloudapi/lb/restore
|
||||
- /cloudapi/lb/start
|
||||
- /cloudapi/lb/stop
|
||||
- /cloudapi/lb/update
|
||||
- /cloudapi/lb/updateSysctlParams
|
||||
|
||||
</details>
|
||||
|
||||
@@ -715,16 +852,26 @@ except RequestException as e:
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>pcidevice</summary>
|
||||
|
||||
- /cloudapi/pcidevice/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>rg</summary>
|
||||
|
||||
- /cloudapi/rg/accessGrant
|
||||
- /cloudapi/rg/accessRevoke
|
||||
- /cloudapi/rg/add_storage_policy
|
||||
- /cloudapi/rg/create
|
||||
- /cloudapi/rg/del_storage_policy
|
||||
- /cloudapi/rg/delete
|
||||
- /cloudapi/rg/disable
|
||||
- /cloudapi/rg/enable
|
||||
- /cloudapi/rg/get
|
||||
- /cloudapi/rg/getResourceConsumption
|
||||
- /cloudapi/rg/list
|
||||
- /cloudapi/rg/listDeleted
|
||||
- /cloudapi/rg/removeDefNet
|
||||
- /cloudapi/rg/restore
|
||||
- /cloudapi/rg/setDefNet
|
||||
@@ -732,10 +879,28 @@ except RequestException as e:
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>stack</summary>
|
||||
<details><summary>security_group</summary>
|
||||
|
||||
- /cloudapi/stack/get
|
||||
- /cloudapi/stack/list
|
||||
- /cloudapi/security_group/get
|
||||
- /cloudapi/security_group/create
|
||||
- /cloudapi/security_group/create_rule
|
||||
- /cloudapi/security_group/delete
|
||||
- /cloudapi/security_group/delete_rule
|
||||
- /cloudapi/security_group/list
|
||||
- /cloudapi/security_group/update
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>sep</summary>
|
||||
|
||||
- /cloudapi/sep/listAvailableSepAndPools
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>storage_policy</summary>
|
||||
|
||||
- /cloudapi/storage_policy/get
|
||||
- /cloudapi/storage_policy/list
|
||||
|
||||
</details>
|
||||
|
||||
@@ -746,11 +911,33 @@ except RequestException as e:
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>trunk</summary>
|
||||
|
||||
- /cloudapi/trunk/get
|
||||
- /cloudapi/trunk/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>user</summary>
|
||||
|
||||
- /cloudapi/user/apiList
|
||||
- /cloudapi/user/brief
|
||||
- /cloudapi/user/get
|
||||
- /cloudapi/user/getAudit
|
||||
- /cloudapi/user/getResourceConsumption
|
||||
- /cloudapi/user/setData
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>vfpool</summary>
|
||||
|
||||
- /cloudapi/vfpool/get
|
||||
- /cloudapi/vfpool/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>vgpu</summary>
|
||||
|
||||
- /cloudapi/vgpu/list
|
||||
|
||||
</details>
|
||||
|
||||
@@ -760,13 +947,21 @@ except RequestException as e:
|
||||
- /cloudapi/vins/createInRG
|
||||
- /cloudapi/vins/delete
|
||||
- /cloudapi/vins/disable
|
||||
- /cloudapi/vins/dnsApply
|
||||
- /cloudapi/vins/enable
|
||||
- /cloudapi/vins/extNetConnect
|
||||
- /cloudapi/vins/extNetDisconnect
|
||||
- /cloudapi/vins/extNetList
|
||||
- /cloudapi/vins/get
|
||||
- /cloudapi/vins/ipList
|
||||
- /cloudapi/vins/ipRelease
|
||||
- /cloudapi/vins/ipReserve
|
||||
- /cloudapi/vins/list
|
||||
- /cloudapi/vins/listDeleted
|
||||
- /cloudapi/vins/migrateToZone
|
||||
- /cloudapi/vins/natRuleAdd
|
||||
- /cloudapi/vins/natRuleDel
|
||||
- /cloudapi/vins/natRuleList
|
||||
- /cloudapi/vins/restore
|
||||
- /cloudapi/vins/staticRouteAdd
|
||||
- /cloudapi/vins/staticRouteDel
|
||||
@@ -776,16 +971,149 @@ except RequestException as e:
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>zone</summary>
|
||||
|
||||
- /cloudapi/zone/get
|
||||
- /cloudapi/zone/list
|
||||
|
||||
</details>
|
||||
|
||||
#### Cloudbroker
|
||||
|
||||
<details><summary>account</summary>
|
||||
|
||||
- /cloudbroker/account/add_storage_policy
|
||||
- /cloudbroker/account/addUser
|
||||
- /cloudbroker/account/addZone
|
||||
- /cloudbroker/account/create
|
||||
- /cloudbroker/account/del_storage_policy
|
||||
- /cloudbroker/account/delete
|
||||
- /cloudbroker/account/deleteAccounts
|
||||
- /cloudbroker/account/deleteUser
|
||||
- /cloudbroker/account/disable
|
||||
- /cloudbroker/account/disableAccounts
|
||||
- /cloudbroker/account/enable
|
||||
- /cloudbroker/account/enableAccounts
|
||||
- /cloudbroker/account/get
|
||||
- /cloudbroker/account/getResourceConsumption
|
||||
- /cloudbroker/account/list
|
||||
- /cloudbroker/account/listDeleted
|
||||
- /cloudbroker/account/removeZone
|
||||
- /cloudbroker/account/restore
|
||||
- /cloudbroker/account/setCpuAllocationParameter
|
||||
- /cloudbroker/account/setCpuAllocationRatio
|
||||
- /cloudbroker/account/update
|
||||
- /cloudbroker/account/updateComputeFeatures
|
||||
- /cloudbroker/account/updateResourceTypes
|
||||
- /cloudbroker/account/updateUser
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>audit</summary>
|
||||
|
||||
- /cloudbroker/audit/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>compute</summary>
|
||||
|
||||
- /cloudbroker/compute/change_read_only
|
||||
- /cloudbroker/compute/change_security_groups
|
||||
- /cloudbroker/compute/clone
|
||||
- /cloudbroker/compute/clone_abort
|
||||
- /cloudbroker/compute/migrate_storage_list
|
||||
- /cloudbroker/compute/start_migration_in
|
||||
- /cloudbroker/compute/start_migration_out
|
||||
- /cloudbroker/compute/stop_migration_in
|
||||
- /cloudbroker/compute/stop_migration_out
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>disks</summary>
|
||||
|
||||
- /cloudbroker/disks/migrate
|
||||
- /cloudbroker/disks/migrate_abort
|
||||
- /cloudbroker/disks/migrate_status
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>image</summary>
|
||||
|
||||
- /cloudbroker/image/change_storage_policy
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>node</summary>
|
||||
|
||||
- cloudbroker/node/add_ssh_identity
|
||||
- cloudbroker/node/get_ssh_identity
|
||||
- cloudbroker/node/update_description
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>rg</summary>
|
||||
|
||||
- /cloudbroker/rg/add_storage_policy
|
||||
- /cloudbroker/rg/del_storage_policy
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>security_group</summary>
|
||||
|
||||
- /cloudbroker/security_group/create
|
||||
- /cloudbroker/security_group/create_rule
|
||||
- /cloudbroker/security_group/delete
|
||||
- /cloudbroker/security_group/delete_rule
|
||||
- /cloudbroker/security_group/get
|
||||
- /cloudbroker/security_group/list
|
||||
- /cloudbroker/security_group/update
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>storage_policy</summary>
|
||||
|
||||
- /cloudbroker/storage_policy/add_pool
|
||||
- /cloudbroker/storage_policy/create
|
||||
- /cloudbroker/storage_policy/delete
|
||||
- /cloudbroker/storage_policy/delete_pool
|
||||
- /cloudbroker/storage_policy/disable
|
||||
- /cloudbroker/storage_policy/enable
|
||||
- /cloudbroker/storage_policy/get
|
||||
- /cloudbroker/storage_policy/list
|
||||
- /cloudbroker/storage_policy/update
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>user</summary>
|
||||
|
||||
- /cloudbroker/user/block
|
||||
- /cloudbroker/user/create
|
||||
- /cloudbroker/user/get
|
||||
- /cloudbroker/user/list
|
||||
- /cloudbroker/user/unblock
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>vins</summary>
|
||||
|
||||
- /cloudbroker/vins/update
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>vnfdev</summary>
|
||||
|
||||
- /cloudbroker/vnfdev/migrate_abort
|
||||
|
||||
</details>
|
||||
|
||||
#### System
|
||||
|
||||
<details><summary>info</summary>
|
||||
|
||||
- /system/info/version
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>usermanager</summary>
|
||||
|
||||
- /system/usermanager/whoami
|
||||
|
||||
@@ -5,7 +5,7 @@ authors = [
|
||||
{name = "Vladislav Nesterov"},
|
||||
{name = "Stanislav Karimov"},
|
||||
]
|
||||
version = "1.2.3"
|
||||
version = "1.4.1"
|
||||
|
||||
readme = "README.md"
|
||||
|
||||
@@ -13,7 +13,7 @@ requires-python = ">=3.12"
|
||||
|
||||
dependencies = [
|
||||
"requests>=2.32.3",
|
||||
"pydantic>=2.10.5",
|
||||
"pydantic==2.10.5",
|
||||
"pyyaml>=6.0.2",
|
||||
]
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
pre-commit==4.1.0
|
||||
pytest==8.3.5
|
||||
@@ -8,3 +8,15 @@ class API(_base.BaseAPI):
|
||||
cloudapi: CloudapiAPI
|
||||
cloudbroker: CloudbrokerAPI
|
||||
system: SystemAPI
|
||||
|
||||
@property
|
||||
def ca(self):
|
||||
return self.cloudapi
|
||||
|
||||
@property
|
||||
def cb(self):
|
||||
return self.cloudbroker
|
||||
|
||||
@property
|
||||
def sys(self):
|
||||
return self.system
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from enum import Enum
|
||||
|
||||
from dynamix_sdk.utils import (
|
||||
AutoNameEnum as _AutoNameEnum,
|
||||
enum_auto as _enum_auto,
|
||||
@@ -23,19 +25,19 @@ class AffinityPolicy(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class AffinityTopology(str, _AutoNameEnum):
|
||||
vm = 'compute'
|
||||
node = _enum_auto()
|
||||
VM = 'compute'
|
||||
NODE = 'node'
|
||||
|
||||
|
||||
class BootDevice(str, _AutoNameEnum):
|
||||
cdrom = _enum_auto()
|
||||
hd = _enum_auto()
|
||||
network = _enum_auto()
|
||||
CDROM = 'cdrom'
|
||||
HD = 'hd'
|
||||
NETWORK = 'network'
|
||||
|
||||
|
||||
class Chipset(str, _AutoNameEnum):
|
||||
Q35 = _enum_auto()
|
||||
i440fx = _enum_auto()
|
||||
I440FX = 'i440fx'
|
||||
|
||||
|
||||
class Driver(str, _AutoNameEnum):
|
||||
@@ -59,27 +61,27 @@ class NetTypeForChangeIP(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class NumaAffinity(str, _AutoNameEnum):
|
||||
none = _enum_auto()
|
||||
strict = _enum_auto()
|
||||
loose = _enum_auto()
|
||||
NONE = 'none'
|
||||
STRICT = 'strict'
|
||||
LOOSE = 'loose'
|
||||
|
||||
|
||||
class TXMode(str, _AutoNameEnum):
|
||||
iothread = _enum_auto()
|
||||
selected_by_hypervisor = 'selected by hypervisor'
|
||||
timer = _enum_auto()
|
||||
IOTHREAD = 'iothread'
|
||||
SELECTED_BY_HYPERVISOR = 'selected by hypervisor'
|
||||
TIMER = 'timer'
|
||||
|
||||
|
||||
class Ioeventfd(str, _AutoNameEnum):
|
||||
off = _enum_auto()
|
||||
on = _enum_auto()
|
||||
selected_by_hypervisor = 'selected by hypervisor'
|
||||
OFF = 'off'
|
||||
ON = 'on'
|
||||
SELECTED_BY_HYPERVISOR = 'selected by hypervisor'
|
||||
|
||||
|
||||
class EventIdx(str, _AutoNameEnum):
|
||||
off = _enum_auto()
|
||||
on = _enum_auto()
|
||||
selected_by_hypervisor = 'selected by hypervisor'
|
||||
OFF = 'off'
|
||||
ON = 'on'
|
||||
SELECTED_BY_HYPERVISOR = 'selected by hypervisor'
|
||||
|
||||
|
||||
class ResourceGroupStatus(str, _AutoNameEnum):
|
||||
@@ -101,13 +103,13 @@ class LockStatus(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class VMFeature(str, _AutoNameEnum):
|
||||
changemac = _enum_auto()
|
||||
cpupin = _enum_auto()
|
||||
dpdk = _enum_auto()
|
||||
hugepages = _enum_auto()
|
||||
numa = _enum_auto()
|
||||
trunk = _enum_auto()
|
||||
vfnic = _enum_auto()
|
||||
CHANGEMAC = 'changemac'
|
||||
CPUPIN = 'cpupin'
|
||||
DPDK = 'dpdk'
|
||||
HUGEPAGES = 'hugepages'
|
||||
NUMA = 'numa'
|
||||
TRUNK = 'trunk'
|
||||
VFNIC = 'vfnic'
|
||||
|
||||
|
||||
class RGDefaultNetTypeForSet(str, _AutoNameEnum):
|
||||
@@ -122,10 +124,10 @@ class RGDefaultNetType(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class RGResourceType(str, _AutoNameEnum):
|
||||
vm = 'compute'
|
||||
k8s = _enum_auto()
|
||||
lb = _enum_auto()
|
||||
vins = _enum_auto()
|
||||
VM = 'compute'
|
||||
K8S = 'k8s'
|
||||
LB = 'lb'
|
||||
VINS = 'vins'
|
||||
|
||||
|
||||
class DiskStatus(str, _AutoNameEnum):
|
||||
@@ -169,6 +171,8 @@ class VMTechStatus(str, _AutoNameEnum):
|
||||
DOWN = _enum_auto()
|
||||
MERGE = _enum_auto()
|
||||
MIGRATING = _enum_auto()
|
||||
MIGRATING_IN = _enum_auto()
|
||||
MIGRATING_OUT = _enum_auto()
|
||||
PAUSED = _enum_auto()
|
||||
PAUSING = _enum_auto()
|
||||
ROLLBACK = _enum_auto()
|
||||
@@ -181,8 +185,8 @@ class VMTechStatus(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class DiskType(str, _AutoNameEnum):
|
||||
B = _enum_auto()
|
||||
D = _enum_auto()
|
||||
BOOT = 'B'
|
||||
DATA = 'D'
|
||||
|
||||
|
||||
class AccountStatus(str, _AutoNameEnum):
|
||||
@@ -194,11 +198,11 @@ class AccountStatus(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class AccountResourceType(str, _AutoNameEnum):
|
||||
vm = 'compute'
|
||||
k8s = _enum_auto()
|
||||
lb = _enum_auto()
|
||||
vins = _enum_auto()
|
||||
flipgroup = _enum_auto()
|
||||
VM = 'compute'
|
||||
K8S = 'k8s'
|
||||
LB = 'lb'
|
||||
VINS = 'vins'
|
||||
FLIPGROUP = 'flipgroup'
|
||||
|
||||
|
||||
class ImageTechStatus(str, _AutoNameEnum):
|
||||
@@ -215,16 +219,16 @@ class ImageStatus(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class ImageType(str, _AutoNameEnum):
|
||||
cdrom = _enum_auto()
|
||||
linux = _enum_auto()
|
||||
unknown = _enum_auto()
|
||||
virtual = _enum_auto()
|
||||
windows = _enum_auto()
|
||||
CDROM = 'cdrom'
|
||||
LINUX = 'linux'
|
||||
UNKNOWN = 'unknown'
|
||||
VIRTUAL = 'virtual'
|
||||
WINDOWS = 'windows'
|
||||
|
||||
|
||||
class NetIfaceNamingTemplate(str, _AutoNameEnum):
|
||||
ens = _enum_auto()
|
||||
eth = _enum_auto()
|
||||
ENS = 'ens'
|
||||
ETH = 'eth'
|
||||
|
||||
|
||||
class VINSStatus(str, _AutoNameEnum):
|
||||
@@ -286,17 +290,17 @@ class VINSInterfaceType(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class NATRuleProtocol(str, _AutoNameEnum):
|
||||
tcp = _enum_auto()
|
||||
udp = _enum_auto()
|
||||
TCP = 'tcp'
|
||||
UDP = 'udp'
|
||||
|
||||
|
||||
class VNFDevType(str, _AutoNameEnum):
|
||||
vyos = _enum_auto()
|
||||
VYOS = 'vyos'
|
||||
|
||||
|
||||
class BootMode(str, _AutoNameEnum):
|
||||
bios = _enum_auto()
|
||||
uefi = _enum_auto()
|
||||
BIOS = 'bios'
|
||||
UEFI = 'uefi'
|
||||
|
||||
|
||||
class BServiceStatus(str, _AutoNameEnum):
|
||||
@@ -354,6 +358,7 @@ class SEPType(str, _AutoNameEnum):
|
||||
TATLIN = _enum_auto()
|
||||
DORADO = _enum_auto()
|
||||
SHARED = _enum_auto()
|
||||
USTOR = _enum_auto()
|
||||
|
||||
|
||||
class ExtNetStatus(str, _AutoNameEnum):
|
||||
@@ -368,9 +373,9 @@ class ExtNetStatus(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class BootLoaderType(str, _AutoNameEnum):
|
||||
linux = _enum_auto()
|
||||
unknown = _enum_auto()
|
||||
windows = _enum_auto()
|
||||
LINUX = 'linux'
|
||||
UNKNOWN = 'unknown'
|
||||
WINDOWS = 'windows'
|
||||
|
||||
|
||||
class FlipGroupClientType(str, _AutoNameEnum):
|
||||
@@ -388,8 +393,8 @@ class FlipGroupNetType(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class PoolDiskType(str, _AutoNameEnum):
|
||||
B = _enum_auto()
|
||||
D = _enum_auto()
|
||||
BOOT = 'B'
|
||||
DATA = 'D'
|
||||
ANY = _enum_auto()
|
||||
|
||||
|
||||
@@ -443,16 +448,6 @@ class DataDisksChangeMode(str, _AutoNameEnum):
|
||||
KEEP = _enum_auto()
|
||||
|
||||
|
||||
class PhysicalNodeStatus(str, _AutoNameEnum):
|
||||
DECOMMISSIONED = _enum_auto()
|
||||
DECOMMISSIONING = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
ERROR = _enum_auto()
|
||||
INSTALLING = _enum_auto()
|
||||
MAINTENANCE = _enum_auto()
|
||||
RESTRICTED = _enum_auto()
|
||||
|
||||
|
||||
class AuthBroker(str, _AutoNameEnum):
|
||||
DECS3O = 'decs3o'
|
||||
BVS = 'bvs'
|
||||
@@ -516,3 +511,116 @@ class DPDKNetStatus(str, _AutoNameEnum):
|
||||
DESTROYED = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
|
||||
|
||||
class VFPoolStatus(str, _AutoNameEnum):
|
||||
CREATED = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
|
||||
|
||||
class LinkState(str, _AutoNameEnum):
|
||||
ON = 'on'
|
||||
OFF = 'off'
|
||||
|
||||
|
||||
class ZoneStatus(str, _AutoNameEnum):
|
||||
CREATED = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
|
||||
|
||||
class TrafficDirection(str, _AutoNameEnum):
|
||||
INBOUND = 'inbound'
|
||||
OUTBOUND = 'outbound'
|
||||
|
||||
|
||||
class SGRuleEthertype(str, _AutoNameEnum):
|
||||
IPV4 = 'IPv4'
|
||||
IPV6 = 'IPv6'
|
||||
|
||||
|
||||
class SGRuleProtocol(str, _AutoNameEnum):
|
||||
ICMP = 'icmp'
|
||||
TCP = 'tcp'
|
||||
UDP = 'udp'
|
||||
|
||||
|
||||
class TrunkStatus(str, _AutoNameEnum):
|
||||
CREATED = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
DESTROYING = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
ENABLING = _enum_auto()
|
||||
MODELED = _enum_auto()
|
||||
|
||||
|
||||
class StoragePolicyStatus(str, _AutoNameEnum):
|
||||
DISABLED = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
|
||||
|
||||
class JobStatus(str, _AutoNameEnum):
|
||||
ABORTED = _enum_auto()
|
||||
CLEANUPED = _enum_auto()
|
||||
ERROR = _enum_auto()
|
||||
OK = _enum_auto()
|
||||
PROCESSING = _enum_auto()
|
||||
SCHEDULED = _enum_auto()
|
||||
|
||||
|
||||
class PGPUProcessorType(str, _AutoNameEnum):
|
||||
NVIDIA = _enum_auto()
|
||||
DUMMY = _enum_auto()
|
||||
|
||||
|
||||
class PGPUMode(str, _AutoNameEnum):
|
||||
PASSTHROUGH = _enum_auto()
|
||||
|
||||
|
||||
class VGPUStatus(str, _AutoNameEnum):
|
||||
ALLOCATED = _enum_auto()
|
||||
ALLOCATING = _enum_auto()
|
||||
CLAIMED = _enum_auto()
|
||||
CLAIMING = _enum_auto()
|
||||
CREATED = _enum_auto()
|
||||
DEALLOCATED = _enum_auto()
|
||||
DEALLOCATING = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
ERROR = _enum_auto()
|
||||
|
||||
|
||||
class NetMapSourceType(str, _AutoNameEnum):
|
||||
NETWORK = 'network'
|
||||
BRIDGE = 'bridge'
|
||||
|
||||
|
||||
class DiskMigrateJobType(int, Enum):
|
||||
PULL = 1
|
||||
COPY = 2
|
||||
COMMIT = 3
|
||||
|
||||
|
||||
class PCIDeviceStatus(str, _AutoNameEnum):
|
||||
CLAIMED = _enum_auto()
|
||||
CLAIMING = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
ERROR = _enum_auto()
|
||||
|
||||
|
||||
class CPUAllocationMode(str, _AutoNameEnum):
|
||||
STRICT = 'strict'
|
||||
LOOSE = 'loose'
|
||||
|
||||
|
||||
class SEPTechStatus(str, _AutoNameEnum):
|
||||
DISABLED = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
|
||||
|
||||
class DiskCacheMode(str, _AutoNameEnum):
|
||||
NONE = 'none'
|
||||
WRITETHROUGH = 'writethrough'
|
||||
|
||||
@@ -5,6 +5,7 @@ from . import enums as _enums
|
||||
class DiskAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
name: str
|
||||
size_gb: int
|
||||
storage_policy_id: int
|
||||
|
||||
description: None | str = None
|
||||
image_id: None | int = None
|
||||
@@ -13,9 +14,17 @@ class DiskAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
|
||||
|
||||
class InterfaceAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
enabled: bool = True
|
||||
net_id: int
|
||||
net_prefix: None | int = None
|
||||
net_type: _enums.NetType
|
||||
sdn_logical_port_id: None | str = None
|
||||
security_group_ids: None | list[int] = None
|
||||
security_group_mode: bool = False
|
||||
sdn_segment_id: None | str = None
|
||||
sdn_object_group_id: None | str = None
|
||||
sdn_logical_port_display_name: None | str = None
|
||||
sdn_logical_port_description: None | str = None
|
||||
|
||||
ip_addr: None | str = None
|
||||
mac: None | str = None
|
||||
@@ -26,3 +35,26 @@ class RouteAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
dst_net_ip: str
|
||||
dst_net_mask: str
|
||||
gateway: str
|
||||
|
||||
|
||||
class StoragePolicyQuotasAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
id: int
|
||||
storage_size_gb: int
|
||||
|
||||
|
||||
class SEPPoolsAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
pool_names: list[str]
|
||||
sep_id: int
|
||||
|
||||
|
||||
class OSUserAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
guid: str
|
||||
login: str
|
||||
password: str
|
||||
ssh_public_key: str
|
||||
|
||||
|
||||
class NetMapConfigAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
target_dev: str
|
||||
source_type: _enums.NetMapSourceType
|
||||
source_value: str
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,11 +13,18 @@ from .k8s import *
|
||||
from .kvmx86 import *
|
||||
from .lb import *
|
||||
from .locations import *
|
||||
from .pcidevice import *
|
||||
from .rg import *
|
||||
from .stack import *
|
||||
from .security_group import *
|
||||
from .sep import *
|
||||
from .storage_policy import *
|
||||
from .tasks import *
|
||||
from .trunk import *
|
||||
from .user import *
|
||||
from .vfpool import *
|
||||
from .vgpu import *
|
||||
from .vins import *
|
||||
from .zone import *
|
||||
|
||||
|
||||
class CloudapiAPI(_base.BaseAPI):
|
||||
@@ -35,8 +42,15 @@ class CloudapiAPI(_base.BaseAPI):
|
||||
kvmx86: CloudapiKvmx86API
|
||||
lb: CloudapiLbAPI
|
||||
locations: CloudapiLocationsAPI
|
||||
pcidevice: CloudapiPcideviceAPI
|
||||
rg: CloudapiRgAPI
|
||||
stack: CloudapiStackAPI
|
||||
security_group: CloudapiSecurityGroupAPI
|
||||
sep: CloudapiSepAPI
|
||||
storage_policy: CloudapiStoragePolicyAPI
|
||||
tasks: CloudapiTasksAPI
|
||||
trunk: CloudapiTrunkAPI
|
||||
user: CloudapiUserAPI
|
||||
vfpool: CloudapiVfpoolAPI
|
||||
vgpu: CloudapiVgpuAPI
|
||||
vins: CloudapiVinsAPI
|
||||
zone: CloudapiZoneAPI
|
||||
|
||||
@@ -5,6 +5,7 @@ from .delete_user import *
|
||||
from .disable import *
|
||||
from .enable import *
|
||||
from .get import *
|
||||
from .get_resource_consumption import *
|
||||
from .list import *
|
||||
from .list_deleted import *
|
||||
from .restore import *
|
||||
@@ -20,6 +21,7 @@ class CloudapiAccountAPI(
|
||||
CloudapiAccountDisableProtocol,
|
||||
CloudapiAccountEnableProtocol,
|
||||
CloudapiAccountGetProtocol,
|
||||
CloudapiAccountGetResourceConsumptionProtocol,
|
||||
CloudapiAccountListDeletedProtocol,
|
||||
CloudapiAccountListProtocol,
|
||||
CloudapiAccountRestoreProtocol,
|
||||
|
||||
@@ -25,7 +25,8 @@ class CloudapiAccountGetResultModel(_base.BaseAPIResultModel):
|
||||
resource_types: list[_nested.AccountResourceType]
|
||||
send_access_emails: bool
|
||||
status: _nested.AccountStatus
|
||||
uniq_pools: list[str]
|
||||
storage_policy_ids: list[int]
|
||||
sep_pools: list[str]
|
||||
updated_timestamp: int
|
||||
version: int
|
||||
vins_count: int
|
||||
@@ -33,20 +34,20 @@ class CloudapiAccountGetResultModel(_base.BaseAPIResultModel):
|
||||
vm_features: list[_nested.VMFeature]
|
||||
zones: list[_nested.ZoneAPIResultNM]
|
||||
|
||||
@property
|
||||
def created_datetime(self):
|
||||
@_base.computed_field
|
||||
def created_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.created_timestamp)
|
||||
|
||||
@property
|
||||
def deactivation_datetime(self):
|
||||
@_base.computed_field
|
||||
def deactivation_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.deactivation_timestamp)
|
||||
|
||||
@property
|
||||
def deleted_datetime(self):
|
||||
@_base.computed_field
|
||||
def deleted_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
||||
|
||||
@property
|
||||
def updated_datetime(self):
|
||||
@_base.computed_field
|
||||
def updated_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiAccountGetResourceConsumptionResultModel(
|
||||
_base.BaseAPIResultModel,
|
||||
):
|
||||
id: int
|
||||
consumed: _nested.ResourceCountersAPIResultNM
|
||||
reserved: _nested.ResourceCountersAPIResultNM
|
||||
quotas: _nested.TenantQuotasForResourceConsumptionAPIResultNM
|
||||
|
||||
|
||||
class CloudapiAccountGetResourceConsumptionProtocol(
|
||||
_base.BasePostAPIFunctionProtocol,
|
||||
):
|
||||
def get_resource_consumption(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
) -> CloudapiAccountGetResourceConsumptionResultModel: ...
|
||||
@@ -3,7 +3,7 @@ import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiAccountListResultModel(_base.BaseAPIResultModel):
|
||||
data: list[_nested.AccountAPIResultNM]
|
||||
data: list[_nested.AccountForCAAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ class CloudapiAccountListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
access_type: None | _nested.AccessType = None,
|
||||
id: None | int = None,
|
||||
name: None | str = None,
|
||||
zone_id: None | int = None,
|
||||
page_number: None | int = None,
|
||||
page_size: None | int = None,
|
||||
sort_by: None | str = None,
|
||||
|
||||
@@ -3,7 +3,7 @@ import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiAccountListDeletedResultModel(_base.BaseAPIResultModel):
|
||||
data: list[_nested.AccountAPIResultNM]
|
||||
data: list[_nested.AccountForCAAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
|
||||
@@ -11,14 +11,13 @@ class CloudapiAccountUpdateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
*,
|
||||
account_id: int,
|
||||
cpu_count_quota: None | int = None,
|
||||
ext_traffic_quota: None | int = None,
|
||||
gpu_count_quota: None | int = None,
|
||||
name: None | str = None,
|
||||
public_ip_count_quota: None | int = None,
|
||||
ext_ip_count_quota: None | int = None,
|
||||
ram_size_quota_mb: None | int = None,
|
||||
send_access_emails: None | bool = None,
|
||||
send_access_emails: bool | None = None,
|
||||
storage_size_quota_gb: None | int = None,
|
||||
uniq_pools: None | list[str] = None,
|
||||
sep_pools: None | list[str] = None,
|
||||
description: str | None = None,
|
||||
default_zone_id: int | None = None,
|
||||
) -> CloudapiAccountUpdateResultBool:
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .get import *
|
||||
from .list import *
|
||||
|
||||
|
||||
class CloudapiAuditAPI(
|
||||
_base.BaseAPI,
|
||||
CloudapiAuditGetProtocol,
|
||||
CloudapiAuditListProtocol,
|
||||
):
|
||||
pass
|
||||
|
||||
@@ -1,27 +1,12 @@
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiAuditGetResultModel(_base.BaseAPIResultModel):
|
||||
args: str
|
||||
api_url_path: str
|
||||
guid: str
|
||||
kwargs: str
|
||||
client_ip_addr: str
|
||||
execution_time_sec: float
|
||||
result: str
|
||||
status_code: int
|
||||
request_timestamp: float
|
||||
response_timestamp: float
|
||||
user_name: str
|
||||
request_datetime_iso8601: str
|
||||
|
||||
@property
|
||||
def request_datetime(self):
|
||||
return self._get_datetime_from_timestamp(self.request_timestamp)
|
||||
|
||||
@property
|
||||
def response_datetime(self):
|
||||
return self._get_datetime_from_timestamp(self.response_timestamp)
|
||||
class CloudapiAuditGetResultModel(
|
||||
_base.BaseAPIResultModel,
|
||||
_nested.AuditAPIResultNM,
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiAuditGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
|
||||
35
src/dynamix_sdk/api/cloudapi/audit/list.py
Normal file
35
src/dynamix_sdk/api/cloudapi/audit/list.py
Normal file
@@ -0,0 +1,35 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiAuditListResultModel(_base.BaseAPIResultModel):
|
||||
data: list[_nested.AuditAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiAuditListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def list(
|
||||
self,
|
||||
*,
|
||||
account_id: int | None = None,
|
||||
api_url_path: str | None = None,
|
||||
bservice_id: int | None = None,
|
||||
exclude_audit_lines: bool = False,
|
||||
flip_group_id: int | None = None,
|
||||
request_id: str | None = None,
|
||||
k8s_id: int | None = None,
|
||||
lb_id: int | None = None,
|
||||
max_status_code: int | None = None,
|
||||
min_status_code: int | None = None,
|
||||
page_number: int = 1,
|
||||
page_size: int = 100,
|
||||
request_timestamp_end: int | None = None,
|
||||
request_timestamp_start: int | None = None,
|
||||
rg_id: int | None = None,
|
||||
sep_id: int | None = None,
|
||||
sort_by: str | None = None,
|
||||
user_name: str | None = None,
|
||||
vins_id: int | None = None,
|
||||
vm_id: int | None = None,
|
||||
) -> CloudapiAuditListResultModel:
|
||||
...
|
||||
@@ -18,7 +18,12 @@ from .group_update_extnet import *
|
||||
from .group_update_vins import *
|
||||
from .list import *
|
||||
from .list_deleted import *
|
||||
from .migrate_to_zone import *
|
||||
from .restore import *
|
||||
from .snapshot_create import *
|
||||
from .snapshot_delete import *
|
||||
from .snapshot_list import *
|
||||
from .snapshot_rollback import *
|
||||
from .start import *
|
||||
from .stop import *
|
||||
|
||||
@@ -44,7 +49,12 @@ class CloudapiBserviceAPI(
|
||||
CloudapiBserviceGroupUpdateVinsProtocol,
|
||||
CloudapiBserviceListDeletedProtocol,
|
||||
CloudapiBserviceListProtocol,
|
||||
CloudapiBserviceMigrateToZoneProtocol,
|
||||
CloudapiBserviceRestoreProtocol,
|
||||
CloudapiBserviceSnapshotCreateProtocol,
|
||||
CloudapiBserviceSnapshotDeleteProtocol,
|
||||
CloudapiBserviceSnapshotListProtocol,
|
||||
CloudapiBserviceSnapshotRollbackProtocol,
|
||||
CloudapiBserviceStartProtocol,
|
||||
CloudapiBserviceStopProtocol,
|
||||
):
|
||||
|
||||
@@ -11,8 +11,8 @@ class CloudapiBserviceCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
*,
|
||||
name: str,
|
||||
rg_id: int,
|
||||
ssh_user: str | None = None,
|
||||
ssh_key: str | None = None,
|
||||
ssh_user_name: str | None = None,
|
||||
ssh_public_key: str | None = None,
|
||||
zone_id: int | None = None,
|
||||
) -> CloudapiBserviceCreateResultInt:
|
||||
...
|
||||
|
||||
@@ -24,8 +24,8 @@ class CloudapiBserviceGetResultModel(_base.BaseAPIResultModel):
|
||||
rg_id: int
|
||||
rg_name: str
|
||||
snapshots: list[_nested.BServiceSnapshotAPIResultNM]
|
||||
ssh_key: str
|
||||
ssh_user: str
|
||||
ssh_public_key: str
|
||||
ssh_user_name: str
|
||||
status: _nested.BServiceStatus
|
||||
tech_status: _nested.BServiceTechStatus
|
||||
updated_by: str
|
||||
@@ -34,16 +34,16 @@ class CloudapiBserviceGetResultModel(_base.BaseAPIResultModel):
|
||||
vms: list[_nested.BServiceVMAPIResultNM]
|
||||
zone_id: int
|
||||
|
||||
@property
|
||||
def created_datetime(self):
|
||||
@_base.computed_field
|
||||
def created_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.created_timestamp)
|
||||
|
||||
@property
|
||||
def deleted_datetime(self):
|
||||
@_base.computed_field
|
||||
def deleted_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
||||
|
||||
@property
|
||||
def updated_datetime(self):
|
||||
@_base.computed_field
|
||||
def updated_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
||||
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@ class CloudapiBserviceGroupAddProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
vm_count: int,
|
||||
cpu_count: int,
|
||||
boot_disk_size_gb: int,
|
||||
driver: _nested.Driver,
|
||||
image_id: int,
|
||||
name: str,
|
||||
ram_size_mb: int,
|
||||
storage_policy_id: int | None = None,
|
||||
ci_user_data: str | None = None,
|
||||
extnet_ids: list[int] | None = None,
|
||||
role: str | None = None,
|
||||
@@ -25,6 +25,6 @@ class CloudapiBserviceGroupAddProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
sep_pool_name: str | None = None,
|
||||
start_timeout: int | None = None,
|
||||
vins_ids: list[int] | None = None,
|
||||
chipset: _nested.Chipset = _nested.Chipset.i440fx,
|
||||
chipset: _nested.Chipset = _nested.Chipset.Q35,
|
||||
) -> CloudapiBserviceGroupAddResultInt:
|
||||
...
|
||||
|
||||
@@ -39,16 +39,16 @@ class CloudapiBserviceGroupGetResultModel(
|
||||
vins_ids: list[int]
|
||||
vms: list[_nested.BServiceGroupVMAPIResultNM]
|
||||
|
||||
@property
|
||||
def created_datetime(self):
|
||||
@_base.computed_field
|
||||
def created_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.created_timestamp)
|
||||
|
||||
@property
|
||||
def deleted_datetime(self):
|
||||
@_base.computed_field
|
||||
def deleted_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
||||
|
||||
@property
|
||||
def updated_datetime(self):
|
||||
@_base.computed_field
|
||||
def updated_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class CloudapiBserviceGroupParentAddProtocol(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
child_id: int,
|
||||
parent_id: int,
|
||||
) -> CloudapiBserviceGroupParentAddResultBool:
|
||||
...
|
||||
|
||||
@@ -12,7 +12,7 @@ class CloudapiBserviceGroupParentRemoveProtocol(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
child_id: int,
|
||||
parent_id: int,
|
||||
) -> CloudapiBserviceGroupParentRemoveResultBool:
|
||||
...
|
||||
|
||||
@@ -14,7 +14,7 @@ class CloudapiBserviceGroupResizeProtocol(
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
chipset: _nested.Chipset = _nested.Chipset.i440fx,
|
||||
chipset: _nested.Chipset = _nested.Chipset.Q35,
|
||||
count_change_mode: _nested.CountChangeMode = (
|
||||
_nested.CountChangeMode.RELATIVE
|
||||
),
|
||||
|
||||
@@ -15,6 +15,7 @@ class CloudapiBserviceListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
account_name: str | None = None,
|
||||
id: int | None = None,
|
||||
name: str | None = None,
|
||||
zone_id: int | None = None,
|
||||
page_number: int | None = None,
|
||||
page_size: int | None = None,
|
||||
rg_id: int | None = None,
|
||||
|
||||
15
src/dynamix_sdk/api/cloudapi/bservice/migrate_to_zone.py
Normal file
15
src/dynamix_sdk/api/cloudapi/bservice/migrate_to_zone.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceMigrateToZoneResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceMigrateToZoneProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def migrate_to_zone(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
zone_id: int,
|
||||
) -> CloudapiBserviceMigrateToZoneResultBool:
|
||||
...
|
||||
17
src/dynamix_sdk/api/cloudapi/bservice/snapshot_create.py
Normal file
17
src/dynamix_sdk/api/cloudapi/bservice/snapshot_create.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceSnapshotCreateResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceSnapshotCreateProtocol(
|
||||
_base.BasePostAPIFunctionProtocol,
|
||||
):
|
||||
def snapshot_create(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
label: str,
|
||||
) -> CloudapiBserviceSnapshotCreateResultBool:
|
||||
...
|
||||
17
src/dynamix_sdk/api/cloudapi/bservice/snapshot_delete.py
Normal file
17
src/dynamix_sdk/api/cloudapi/bservice/snapshot_delete.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceSnapshotDeleteResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceSnapshotDeleteProtocol(
|
||||
_base.BasePostAPIFunctionProtocol,
|
||||
):
|
||||
def snapshot_delete(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
label: str,
|
||||
) -> CloudapiBserviceSnapshotDeleteResultBool:
|
||||
...
|
||||
16
src/dynamix_sdk/api/cloudapi/bservice/snapshot_list.py
Normal file
16
src/dynamix_sdk/api/cloudapi/bservice/snapshot_list.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiBserviceSnapshotListResultModel(_base.BaseAPIResultModel):
|
||||
data: list[_nested.BServiceSnapshotAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiBserviceSnapshotListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def snapshot_list(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
) -> CloudapiBserviceSnapshotListResultModel:
|
||||
...
|
||||
17
src/dynamix_sdk/api/cloudapi/bservice/snapshot_rollback.py
Normal file
17
src/dynamix_sdk/api/cloudapi/bservice/snapshot_rollback.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceSnapshotRollbackResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceSnapshotRollbackProtocol(
|
||||
_base.BasePostAPIFunctionProtocol,
|
||||
):
|
||||
def snapshot_rollback(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
label: str,
|
||||
) -> CloudapiBserviceSnapshotRollbackResultBool:
|
||||
...
|
||||
@@ -1,4 +1,5 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .abort_shared_snapshot_merge import *
|
||||
from .affinity_label_remove import *
|
||||
from .affinity_label_set import *
|
||||
from .affinity_relations import *
|
||||
@@ -8,29 +9,54 @@ from .affinity_rules_clear import *
|
||||
from .anti_affinity_rule_add import *
|
||||
from .anti_affinity_rule_remove import *
|
||||
from .anti_affinity_rules_clear import *
|
||||
from .attach_gpu import *
|
||||
from .attach_pci_device import *
|
||||
from .boot_disk_set import *
|
||||
from .cd_eject import *
|
||||
from .cd_insert import *
|
||||
from .change_ip import *
|
||||
from .change_link_state import *
|
||||
from .change_mac import *
|
||||
from .change_mtu import *
|
||||
from .change_security_groups import *
|
||||
from .clone import *
|
||||
from .clone_abort import *
|
||||
from .create_template import *
|
||||
from .delete import *
|
||||
from .delete_custom_fields import *
|
||||
from .detach_gpu import *
|
||||
from .detach_pci_device import *
|
||||
from .disable import *
|
||||
from .disk_add import *
|
||||
from .disk_attach import *
|
||||
from .disk_migrate import *
|
||||
from .disk_del import *
|
||||
from .disk_detach import *
|
||||
from .disk_resize import *
|
||||
from .disk_switch_to_replication import *
|
||||
from .enable import *
|
||||
from .get import *
|
||||
from .get_console_url import *
|
||||
from .guest_agent_disable import *
|
||||
from .guest_agent_enable import *
|
||||
from .guest_agent_execute import *
|
||||
from .guest_agent_feature_update import *
|
||||
from .list import *
|
||||
from .list_deleted import *
|
||||
from .migrate_to_zone import *
|
||||
from .move_to_rg import *
|
||||
from .net_attach import *
|
||||
from .net_detach import *
|
||||
from .pause import *
|
||||
from .pfw_add import *
|
||||
from .pfw_del import *
|
||||
from .pfw_list import *
|
||||
from .pin_to_stack import *
|
||||
from .pin_to_node import *
|
||||
from .power_cycle import *
|
||||
from .reboot import *
|
||||
from .redeploy import *
|
||||
from .reset import *
|
||||
from .resize import *
|
||||
from .restore import *
|
||||
from .resume import *
|
||||
from .set_custom_fields import *
|
||||
from .snapshot_create import *
|
||||
@@ -40,7 +66,7 @@ from .start import *
|
||||
from .stop import *
|
||||
from .tag_add import *
|
||||
from .tag_remove import *
|
||||
from .unpin_from_stack import *
|
||||
from .unpin_from_node import *
|
||||
from .update import *
|
||||
from .user_grant import *
|
||||
from .user_list import *
|
||||
@@ -50,6 +76,7 @@ from .user_update import *
|
||||
|
||||
class CloudapiComputeAPI(
|
||||
_base.BaseAPI,
|
||||
CloudapiComputeAbortSharedSnapshotMergeProtocol,
|
||||
CloudapiComputeAffinityLabelRemoveProtocol,
|
||||
CloudapiComputeAffinityLabelSetProtocol,
|
||||
CloudapiComputeAffinityRelationsProtocol,
|
||||
@@ -59,29 +86,54 @@ class CloudapiComputeAPI(
|
||||
CloudapiComputeAntiAffinityRuleAddProtocol,
|
||||
CloudapiComputeAntiAffinityRuleRemoveProtocol,
|
||||
CloudapiComputeAntiAffinityRulesClearProtocol,
|
||||
CloudapiComputeAttachGpuProtocol,
|
||||
CloudapiComputeAttachPciDeviceProtocol,
|
||||
CloudapiComputeBootDiskSetProtocol,
|
||||
CloudapiComputeCdEjectProtocol,
|
||||
CloudapiComputeCdInsertProtocol,
|
||||
CloudapiComputeChangeIpProtocol,
|
||||
CloudapiComputeChangeLinkStateProtocol,
|
||||
CloudapiComputeChangeMacProtocol,
|
||||
CloudapiComputeChangeMtuProtocol,
|
||||
CloudapiComputeChangeSecurityGroupsProtocol,
|
||||
CloudapiComputeCloneAbortProtocol,
|
||||
CloudapiComputeCloneProtocol,
|
||||
CloudapiComputeCreateTemplateProtocol,
|
||||
CloudapiComputeDeleteCustomFieldsProtocol,
|
||||
CloudapiComputeDeleteProtocol,
|
||||
CloudapiComputeDetachGpuProtocol,
|
||||
CloudapiComputeDetachPciDeviceProtocol,
|
||||
CloudapiComputeDisableProtocol,
|
||||
CloudapiComputeDiskAddProtocol,
|
||||
CloudapiComputeDiskAttachProtocol,
|
||||
CloudapiComputeDiskDelProtocol,
|
||||
CloudapiComputeDiskDetachProtocol,
|
||||
CloudapiComputeDiskResizeProtocol,
|
||||
CloudapiComputeDiskMigrateProtocol,
|
||||
CloudapiComputeDiskSwitchToReplicationProtocol,
|
||||
CloudapiComputeEnableProtocol,
|
||||
CloudapiComputeGetConsoleUrlProtocol,
|
||||
CloudapiComputeGetProtocol,
|
||||
CloudapiComputeGuestAgentDisableProtocol,
|
||||
CloudapiComputeGuestAgentEnableProtocol,
|
||||
CloudapiComputeGuestAgentExecuteProtocol,
|
||||
CloudapiComputeGuestAgentFeatureUpdateProtocol,
|
||||
CloudapiComputeListProtocol,
|
||||
CloudapiComputeListDeletedProtocol,
|
||||
CloudapiComputeMigrateToZoneProtocol,
|
||||
CloudapiComputeMoveToRgProtocol,
|
||||
CloudapiComputeNetAttachProtocol,
|
||||
CloudapiComputeNetDetachProtocol,
|
||||
CloudapiComputePauseProtocol,
|
||||
CloudapiComputePfwAddProtocol,
|
||||
CloudapiComputePfwDelProtocol,
|
||||
CloudapiComputePfwListProtocol,
|
||||
CloudapiComputePinToStackProtocol,
|
||||
CloudapiComputePinToNodeProtocol,
|
||||
CloudapiComputePowerCycleProtocol,
|
||||
CloudapiComputeRebootProtocol,
|
||||
CloudapiComputeRedeployProtocol,
|
||||
CloudapiComputeResetProtocol,
|
||||
CloudapiComputeResizeProtocol,
|
||||
CloudapiComputeRestoreProtocol,
|
||||
CloudapiComputeResumeProtocol,
|
||||
CloudapiComputeSetCustomFieldsProtocol,
|
||||
CloudapiComputeSnapshotCreateProtocol,
|
||||
@@ -91,7 +143,7 @@ class CloudapiComputeAPI(
|
||||
CloudapiComputeStopProtocol,
|
||||
CloudapiComputeTagAddProtocol,
|
||||
CloudapiComputeTagRemoveProtocol,
|
||||
CloudapiComputeUnpinFromStackProtocol,
|
||||
CloudapiComputeUnpinFromNodeProtocol,
|
||||
CloudapiComputeUpdateProtocol,
|
||||
CloudapiComputeUserGrantProtocol,
|
||||
CloudapiComputeUserListProtocol,
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeAbortSharedSnapshotMergeResultBool(
|
||||
_base.BaseAPIResultBool,
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAbortSharedSnapshotMergeProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def abort_shared_snapshot_merge(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
label: str,
|
||||
) -> CloudapiComputeAbortSharedSnapshotMergeResultBool:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/compute/attach_gpu.py
Normal file
15
src/dynamix_sdk/api/cloudapi/compute/attach_gpu.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeAttachGpuResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAttachGpuProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def attach_gpu(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
vgpu_id: int,
|
||||
) -> CloudapiComputeAttachGpuResultInt:
|
||||
...
|
||||
17
src/dynamix_sdk/api/cloudapi/compute/attach_pci_device.py
Normal file
17
src/dynamix_sdk/api/cloudapi/compute/attach_pci_device.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeAttachPciDeviceResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAttachPciDeviceProtocol(
|
||||
_base.BasePostAPIFunctionProtocol,
|
||||
):
|
||||
def attach_pci_device(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
pci_device_id: int,
|
||||
) -> CloudapiComputeAttachPciDeviceResultBool:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/compute/boot_disk_set.py
Normal file
15
src/dynamix_sdk/api/cloudapi/compute/boot_disk_set.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeBootDiskSetResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeBootDiskSetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def boot_disk_set(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
) -> CloudapiComputeBootDiskSetResultBool:
|
||||
...
|
||||
19
src/dynamix_sdk/api/cloudapi/compute/change_link_state.py
Normal file
19
src/dynamix_sdk/api/cloudapi/compute/change_link_state.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeChangeLinkStateResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeChangeLinkStateProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def change_link_state(
|
||||
self,
|
||||
*,
|
||||
interface: str,
|
||||
state: _nested.LinkState,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeChangeLinkStateResultBool:
|
||||
...
|
||||
16
src/dynamix_sdk/api/cloudapi/compute/change_mac.py
Normal file
16
src/dynamix_sdk/api/cloudapi/compute/change_mac.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeChangeMacResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeChangeMacProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def change_mac(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
current_mac: str,
|
||||
new_mac: str,
|
||||
) -> CloudapiComputeChangeMacResultBool:
|
||||
...
|
||||
18
src/dynamix_sdk/api/cloudapi/compute/change_mtu.py
Normal file
18
src/dynamix_sdk/api/cloudapi/compute/change_mtu.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeChangeMtuResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeChangeMtuProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def change_mtu(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
interface: str,
|
||||
mtu: int,
|
||||
) -> CloudapiComputeChangeMtuResultBool:
|
||||
...
|
||||
@@ -0,0 +1,19 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeChangeSecurityGroupsResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeChangeSecurityGroupsProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def change_security_groups(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
interface: str,
|
||||
security_group_ids: list[int] | None = None,
|
||||
security_group_mode: bool | None = None,
|
||||
) -> CloudapiComputeChangeSecurityGroupsResultBool:
|
||||
...
|
||||
@@ -1,7 +1,7 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeCloneResultInt(_base.BaseAPIResultInt):
|
||||
class CloudapiComputeCloneResultStr(_base.BaseAPIResultStr):
|
||||
pass
|
||||
|
||||
|
||||
@@ -12,7 +12,10 @@ class CloudapiComputeCloneProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
vm_id: int,
|
||||
name: str,
|
||||
force: bool = False,
|
||||
storage_policy_id: int,
|
||||
snapshot_timestamp: int | None = None,
|
||||
snapshot_name: str | None = None,
|
||||
) -> CloudapiComputeCloneResultInt:
|
||||
sep_pool_name: str | None = None,
|
||||
sep_id: int | None = None,
|
||||
) -> CloudapiComputeCloneResultStr:
|
||||
...
|
||||
|
||||
18
src/dynamix_sdk/api/cloudapi/compute/clone_abort.py
Normal file
18
src/dynamix_sdk/api/cloudapi/compute/clone_abort.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeCloneAbortResultBool(
|
||||
_base.BaseAPIResultBool,
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeCloneAbortProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def clone_abort(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeCloneAbortResultBool:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/compute/create_template.py
Normal file
15
src/dynamix_sdk/api/cloudapi/compute/create_template.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeCreateTemplateResultStr(_base.BaseAPIResultStr):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeCreateTemplateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def create_template(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
name: str
|
||||
) -> CloudapiComputeCreateTemplateResultStr:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/compute/detach_gpu.py
Normal file
15
src/dynamix_sdk/api/cloudapi/compute/detach_gpu.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDetachGpuResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeDetachGpuProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def detach_gpu(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
vgpu_id: int | None = None,
|
||||
) -> CloudapiComputeDetachGpuResultBool:
|
||||
...
|
||||
17
src/dynamix_sdk/api/cloudapi/compute/detach_pci_device.py
Normal file
17
src/dynamix_sdk/api/cloudapi/compute/detach_pci_device.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDetachPciDeviceResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeDetachPciDeviceProtocol(
|
||||
_base.BasePostAPIFunctionProtocol,
|
||||
):
|
||||
def detach_pci_device(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
pci_device_id: int,
|
||||
) -> CloudapiComputeDetachPciDeviceResultBool:
|
||||
...
|
||||
16
src/dynamix_sdk/api/cloudapi/compute/disable.py
Normal file
16
src/dynamix_sdk/api/cloudapi/compute/disable.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDisableResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeDisableProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def disable(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeDisableResultBool:
|
||||
...
|
||||
@@ -13,11 +13,13 @@ class CloudapiComputeDiskAddProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
vm_id: int,
|
||||
name: str,
|
||||
disk_size_gb: int,
|
||||
disk_type: _nested.DiskType = _nested.DiskType.D,
|
||||
storage_policy_id: int,
|
||||
disk_type: _nested.DiskType = _nested.DiskType.DATA,
|
||||
sep_id: int | None = None,
|
||||
sep_pool_name: str | None = None,
|
||||
description: str | None = None,
|
||||
image_id: int | None = None,
|
||||
|
||||
pci_slot_num_hex: str | None = None,
|
||||
bus_num_hex: str | None = None,
|
||||
) -> CloudapiComputeDiskAddResultInt:
|
||||
...
|
||||
|
||||
@@ -12,6 +12,8 @@ class CloudapiComputeDiskAttachProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
disk_type: _nested.DiskType = _nested.DiskType.D,
|
||||
disk_type: _nested.DiskType = _nested.DiskType.DATA,
|
||||
pci_slot_num_hex: str | None = None,
|
||||
bus_num_hex: str | None = None,
|
||||
) -> CloudapiComputeDiskAttachResultBool:
|
||||
...
|
||||
|
||||
19
src/dynamix_sdk/api/cloudapi/compute/disk_migrate.py
Normal file
19
src/dynamix_sdk/api/cloudapi/compute/disk_migrate.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDiskMigrateResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeDiskMigrateProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def disk_migrate(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
target_disk_id: int,
|
||||
mode: int = 1,
|
||||
) -> CloudapiComputeDiskMigrateResultBool:
|
||||
...
|
||||
@@ -1,16 +0,0 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDiskResizeResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeDiskResizeProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disk_resize(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
disk_size_gb: int,
|
||||
) -> CloudapiComputeDiskResizeResultBool:
|
||||
...
|
||||
@@ -0,0 +1,20 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDiskSwitchToReplicationResultBool(
|
||||
_base.BaseAPIResultBool,
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeDiskSwitchToReplicationProtocol(
|
||||
_base.BasePostAPIFunctionProtocol,
|
||||
):
|
||||
def disk_switch_to_replication(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
stop_replication: bool = False,
|
||||
) -> CloudapiComputeDiskSwitchToReplicationResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/compute/enable.py
Normal file
14
src/dynamix_sdk/api/cloudapi/compute/enable.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeEnableResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeEnableProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def enable(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeEnableResultBool:
|
||||
...
|
||||
@@ -1,5 +1,3 @@
|
||||
import typing as _typing
|
||||
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
@@ -15,6 +13,8 @@ class CloudapiComputeGetResultModel(_base.BaseAPIResultModel):
|
||||
arch: str
|
||||
auto_start: bool
|
||||
boot_disk_size_gb: int
|
||||
boot_image_id: int
|
||||
boot_loader_metaiso: _nested.BootLoaderMetaisoAPIResultNM | None
|
||||
boot_loader_type: _nested.BootLoaderType
|
||||
boot_mode: _nested.BootMode
|
||||
boot_order: list[_nested.BootDevice]
|
||||
@@ -39,14 +39,14 @@ class CloudapiComputeGetResultModel(_base.BaseAPIResultModel):
|
||||
hot_resize: bool
|
||||
hp_backed: bool
|
||||
id: int
|
||||
image_id: int
|
||||
image_id: None | int
|
||||
image_name: None | str
|
||||
interfaces: list[_nested.InterfaceForComputeGetAPIResultNM]
|
||||
live_migration_job_id: int
|
||||
lock_status: _nested.LockStatus
|
||||
manager_id: int
|
||||
manager_type: str
|
||||
migration_job: int
|
||||
migration_job_id: int
|
||||
milestones: int
|
||||
name: str
|
||||
need_reboot: bool
|
||||
@@ -54,26 +54,26 @@ class CloudapiComputeGetResultModel(_base.BaseAPIResultModel):
|
||||
numa_affinity: _nested.NumaAffinity
|
||||
numa_node_id: int
|
||||
os_users: list[_nested.OSUserAPIResultNM]
|
||||
pinned_to_stack: bool
|
||||
os_version: str
|
||||
pinned_to_node: bool
|
||||
preferred_cpu_cores: list[int]
|
||||
ram_size_mb: int
|
||||
read_only: bool
|
||||
reference_id: str
|
||||
res_name: str
|
||||
reserved_cpu_cores: list[int]
|
||||
rg_id: int
|
||||
rg_name: str
|
||||
snapshot_sets: list[_nested.SnapshotSetAPIResultNM]
|
||||
stateless_sep_id: int
|
||||
stateless_sep_type: str
|
||||
stateless_sep_id: int | None = None
|
||||
stateless_sep_type: str | None = None
|
||||
status: _nested.VMStatus
|
||||
tags: dict
|
||||
tech_status: _nested.VMTechStatus
|
||||
updated_by: str
|
||||
updated_timestamp: int
|
||||
user_managed: bool
|
||||
vgpus: list[dict[str, _typing.Any]]
|
||||
virtual_image_id: int
|
||||
virtual_image_name: None | str
|
||||
vgpus: list[_nested.VGPUAPIResultNM]
|
||||
vm_ci_id: int
|
||||
vnc_password: str
|
||||
guest_agent: _nested.GuestAgentAPIResultNM
|
||||
@@ -85,16 +85,16 @@ class CloudapiComputeGetResultModel(_base.BaseAPIResultModel):
|
||||
natable_vins_network: str = ''
|
||||
natable_vins_network_name: str = ''
|
||||
|
||||
@property
|
||||
def created_datetime(self):
|
||||
@_base.computed_field
|
||||
def created_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.created_timestamp)
|
||||
|
||||
@property
|
||||
def deleted_datetime(self):
|
||||
@_base.computed_field
|
||||
def deleted_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
||||
|
||||
@property
|
||||
def updated_datetime(self):
|
||||
@_base.computed_field
|
||||
def updated_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
||||
|
||||
|
||||
|
||||
14
src/dynamix_sdk/api/cloudapi/compute/get_console_url.py
Normal file
14
src/dynamix_sdk/api/cloudapi/compute/get_console_url.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeGetConsoleUrlResultStr(_base.BaseAPIResultStr):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeGetConsoleUrlProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def get_console_url(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeGetConsoleUrlResultStr:
|
||||
...
|
||||
16
src/dynamix_sdk/api/cloudapi/compute/guest_agent_disable.py
Normal file
16
src/dynamix_sdk/api/cloudapi/compute/guest_agent_disable.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeGuestAgentDisableResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeGuestAgentDisableProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def guest_agent_disable(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeGuestAgentDisableResultBool:
|
||||
...
|
||||
16
src/dynamix_sdk/api/cloudapi/compute/guest_agent_enable.py
Normal file
16
src/dynamix_sdk/api/cloudapi/compute/guest_agent_enable.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeGuestAgentEnableResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeGuestAgentEnableProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def guest_agent_enable(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeGuestAgentEnableResultBool:
|
||||
...
|
||||
21
src/dynamix_sdk/api/cloudapi/compute/guest_agent_execute.py
Normal file
21
src/dynamix_sdk/api/cloudapi/compute/guest_agent_execute.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import typing as _typing
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeGuestAgentExecuteResultModel(
|
||||
_base.BaseAPIResultModel,
|
||||
):
|
||||
exec_result: dict
|
||||
|
||||
|
||||
class CloudapiComputeGuestAgentExecuteProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def guest_agent_execute(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
cmd: str,
|
||||
args: dict[str, _typing.Any],
|
||||
) -> CloudapiComputeGuestAgentExecuteResultModel:
|
||||
...
|
||||
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeGuestAgentFeatureUpdateResultBool(
|
||||
_base.BaseAPIResultBool,
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeGuestAgentFeatureUpdateProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def guest_agent_feature_update(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeGuestAgentFeatureUpdateResultBool:
|
||||
...
|
||||
@@ -18,6 +18,7 @@ class CloudapiComputeListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
include_deleted: bool = False,
|
||||
ip_addr: str | None = None,
|
||||
name: str | None = None,
|
||||
zone_id: int | None = None,
|
||||
page_number: int | None = None,
|
||||
page_size: int | None = None,
|
||||
rg_id: int | None = None,
|
||||
|
||||
27
src/dynamix_sdk/api/cloudapi/compute/list_deleted.py
Normal file
27
src/dynamix_sdk/api/cloudapi/compute/list_deleted.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeListDeletedResultModel(_base.BaseAPIResultModel):
|
||||
data: list[_nested.VMAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiComputeListDeletedProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def list_deleted(
|
||||
self,
|
||||
*,
|
||||
id: int | None = None,
|
||||
name: str | None = None,
|
||||
account_id: int | None = None,
|
||||
rg_name: str | None = None,
|
||||
rg_id: int | None = None,
|
||||
tech_status: _nested.VMTechStatus | None = None,
|
||||
ip_addr: str | None = None,
|
||||
ext_net_name: str | None = None,
|
||||
ext_net_id: int | None = None,
|
||||
page_number: int | None = None,
|
||||
page_size: int | None = None,
|
||||
sort_by: str | None = None,
|
||||
) -> CloudapiComputeListDeletedResultModel:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/compute/migrate_to_zone.py
Normal file
15
src/dynamix_sdk/api/cloudapi/compute/migrate_to_zone.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeMigrateToZoneResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeMigrateToZoneProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def migrate_to_zone(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
zone_id: int,
|
||||
) -> CloudapiComputeMigrateToZoneResultBool:
|
||||
...
|
||||
18
src/dynamix_sdk/api/cloudapi/compute/move_to_rg.py
Normal file
18
src/dynamix_sdk/api/cloudapi/compute/move_to_rg.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeMoveToRgResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeMoveToRgProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def move_to_rg(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
rg_id: int,
|
||||
new_vm_name: str | None = None,
|
||||
auto_start: bool = False,
|
||||
force_stop: bool = False,
|
||||
) -> CloudapiComputeMoveToRgResultBool:
|
||||
...
|
||||
@@ -16,9 +16,17 @@ class CloudapiComputeNetAttachProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
vm_id: int,
|
||||
net_type: _nested.NetType,
|
||||
net_id: int,
|
||||
security_group_ids: None | list[int] = None,
|
||||
security_group_mode: bool = False,
|
||||
enabled: bool = True,
|
||||
ip_addr: None | str = None,
|
||||
mtu: None | int = None,
|
||||
mac: None | str = None,
|
||||
sdn_logical_port_id: None | str = None,
|
||||
net_prefix: int | None = None,
|
||||
sdn_segment_id: str | None = None,
|
||||
sdn_object_group_id: str | None = None,
|
||||
sdn_logical_port_display_name: str | None = None,
|
||||
sdn_logical_port_description: str | None = None,
|
||||
) -> CloudapiComputeNetAttachResultModel:
|
||||
...
|
||||
|
||||
15
src/dynamix_sdk/api/cloudapi/compute/pin_to_node.py
Normal file
15
src/dynamix_sdk/api/cloudapi/compute/pin_to_node.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputePinToNodeResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputePinToNodeProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def pin_to_node(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
auto_start: bool = False,
|
||||
) -> CloudapiComputePinToNodeResultBool:
|
||||
...
|
||||
@@ -1,15 +0,0 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputePinToStackResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputePinToStackProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def pin_to_stack(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
auto_start: bool = False,
|
||||
) -> CloudapiComputePinToStackResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/compute/power_cycle.py
Normal file
14
src/dynamix_sdk/api/cloudapi/compute/power_cycle.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputePowerCycleResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputePowerCycleProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def power_cycle(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputePowerCycleResultBool:
|
||||
...
|
||||
@@ -11,6 +11,7 @@ class CloudapiComputeRedeployProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
storage_policy_id: int | None = None,
|
||||
start: bool = False,
|
||||
boot_disk_size_gb: int | None = None,
|
||||
data_disks_change_mode: _nested.DataDisksChangeMode = (
|
||||
@@ -18,5 +19,6 @@ class CloudapiComputeRedeployProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
),
|
||||
force_stop: bool = False,
|
||||
image_id: int | None = None,
|
||||
os_version: str | None = None,
|
||||
) -> CloudapiComputeRedeployResultBool:
|
||||
...
|
||||
|
||||
14
src/dynamix_sdk/api/cloudapi/compute/reset.py
Normal file
14
src/dynamix_sdk/api/cloudapi/compute/reset.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeResetResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeResetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def reset(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeResetResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/compute/restore.py
Normal file
14
src/dynamix_sdk/api/cloudapi/compute/restore.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeRestoreResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeRestoreProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def restore(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeRestoreResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/compute/unpin_from_node.py
Normal file
14
src/dynamix_sdk/api/cloudapi/compute/unpin_from_node.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeUnpinFromNodeResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeUnpinFromNodeProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def unpin_from_node(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeUnpinFromNodeResultBool:
|
||||
...
|
||||
@@ -1,14 +0,0 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeUnpinFromStackResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeUnpinFromStackProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def unpin_from_stack(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeUnpinFromStackResultBool:
|
||||
...
|
||||
@@ -23,5 +23,6 @@ class CloudapiComputeUpdateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
boot_mode: _nested.BootMode | None = None,
|
||||
network_interface_naming: _nested.NetIfaceNamingTemplate | None = None,
|
||||
hot_resize: bool | None = None,
|
||||
os_version: str | None = None,
|
||||
) -> CloudapiComputeUpdateResultBool:
|
||||
...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .change_disk_storage_policy import *
|
||||
from .create import *
|
||||
from .delete import *
|
||||
from .delete_disks import *
|
||||
@@ -19,6 +20,7 @@ from .unshare import *
|
||||
|
||||
class CloudapiDisksAPI(
|
||||
_base.BaseAPI,
|
||||
CloudapiDisksChangeDiskStoragePolicyProtocol,
|
||||
CloudapiDisksCreateProtocol,
|
||||
CloudapiDisksDeleteDisksProtocol,
|
||||
CloudapiDisksDeleteProtocol,
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiDisksChangeDiskStoragePolicyResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiDisksChangeDiskStoragePolicyProtocol(
|
||||
_base.BasePostAPIFunctionProtocol,
|
||||
):
|
||||
def change_disk_storage_policy(
|
||||
self,
|
||||
*,
|
||||
disk_id: int,
|
||||
storage_policy_id: int,
|
||||
) -> CloudapiDisksChangeDiskStoragePolicyResultBool:
|
||||
...
|
||||
@@ -12,7 +12,7 @@ class CloudapiDisksCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
account_id: int,
|
||||
name: str,
|
||||
size_gb: int,
|
||||
iops: int = 2000,
|
||||
storage_policy_id: int,
|
||||
description: str | None = None,
|
||||
sep_id: int | None = None,
|
||||
sep_pool_name: str | None = None,
|
||||
|
||||
@@ -6,6 +6,8 @@ class CloudapiDisksGetResultModel(_base.BaseAPIResultModel):
|
||||
account_id: int
|
||||
account_name: str
|
||||
acl: dict
|
||||
blkdiscard: bool
|
||||
cache_mode: _nested.DiskCacheMode
|
||||
created_by: str
|
||||
created_timestamp: int
|
||||
deleted_by: str
|
||||
@@ -32,13 +34,14 @@ class CloudapiDisksGetResultModel(_base.BaseAPIResultModel):
|
||||
sep_pool_name: str
|
||||
sep_type: _nested.SEPType
|
||||
shared: bool
|
||||
size_available: float
|
||||
size_available: float
|
||||
size_available_gb: float
|
||||
size_max_gb: int
|
||||
size_used: float
|
||||
size_used_gb: float
|
||||
snapshots: list[_nested.SnapshotAPIResultNM]
|
||||
status: _nested.DiskStatus
|
||||
storage_policy_id: int
|
||||
tech_status: _nested.DiskTechStatus
|
||||
to_clean: bool
|
||||
type: _nested.DiskType
|
||||
updated_by: str
|
||||
vm_id: int | None
|
||||
@@ -46,24 +49,24 @@ class CloudapiDisksGetResultModel(_base.BaseAPIResultModel):
|
||||
vms: dict[str, str]
|
||||
updated_timestamp: int = 0
|
||||
|
||||
@property
|
||||
def created_datetime(self):
|
||||
@_base.computed_field
|
||||
def created_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.created_timestamp)
|
||||
|
||||
@property
|
||||
def deleted_datetime(self):
|
||||
@_base.computed_field
|
||||
def deleted_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
||||
|
||||
@property
|
||||
def destruction_datetime(self):
|
||||
@_base.computed_field
|
||||
def destruction_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.destruction_timestamp)
|
||||
|
||||
@property
|
||||
def purge_datetime(self):
|
||||
@_base.computed_field
|
||||
def purge_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.purge_timestamp)
|
||||
|
||||
@property
|
||||
def updated_datetime(self):
|
||||
@_base.computed_field
|
||||
def updated_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ class CloudapiDisksListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
shared: bool | None = None,
|
||||
sort_by: str | None = None,
|
||||
status: _nested.DiskStatus | None = None,
|
||||
storage_policy_id: int | None = None,
|
||||
type: _nested.DiskType | None = None,
|
||||
) -> CloudapiDisksListResultModel:
|
||||
...
|
||||
|
||||
@@ -19,6 +19,7 @@ class CloudapiDisksListUnattachedProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
page_size: int | None = None,
|
||||
sep_id: int | None = None,
|
||||
sep_pool_name: str | None = None,
|
||||
storage_policy_id: int | None = None,
|
||||
sort_by: str | None = None,
|
||||
status: _nested.DiskStatus | None = None,
|
||||
type: _nested.DiskType | None = None,
|
||||
|
||||
@@ -20,7 +20,7 @@ class CloudapiExtnetGetResultModel(_base.BaseAPIResultModel):
|
||||
mtu: int
|
||||
name: str
|
||||
net_ip: str
|
||||
net_mask: int
|
||||
net_prefix: int
|
||||
network_ids: _nested.NetworkIDsAPIResultNM
|
||||
ntp_servers: list[str]
|
||||
ovs_bridge: str
|
||||
@@ -29,6 +29,7 @@ class CloudapiExtnetGetResultModel(_base.BaseAPIResultModel):
|
||||
primary_vnfdev_id: int
|
||||
redundant: bool
|
||||
secondary_vnfdev_id: int
|
||||
security_group_mode: bool
|
||||
shared_with: list[int]
|
||||
status: _nested.ExtNetStatus
|
||||
vlan_id: int
|
||||
|
||||
@@ -16,6 +16,7 @@ class CloudapiExtnetListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
name: str | None = None,
|
||||
net_ip: str | None = None,
|
||||
ovs_bridge: str | None = None,
|
||||
zone_id: int | None = None,
|
||||
page_number: int | None = None,
|
||||
page_size: int | None = None,
|
||||
sort_by: str | None = None,
|
||||
|
||||
@@ -7,7 +7,7 @@ class CloudapiFlipgroupCreateResultModel(_base.BaseAPIResultModel):
|
||||
id: int
|
||||
ip_addr: str
|
||||
name: str
|
||||
net_mask: int
|
||||
net_prefix: int
|
||||
|
||||
|
||||
class CloudapiFlipgroupCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
|
||||
@@ -25,22 +25,20 @@ class CloudapiFlipgroupGetResultModel(_base.BaseAPIResultModel):
|
||||
net_cidr: str
|
||||
net_id: int
|
||||
net_type: _nested.FlipGroupNetType
|
||||
rg_id: int
|
||||
rg_name: str
|
||||
status: _nested.FlipGroupStatus
|
||||
updated_by: str
|
||||
updated_timestamp: int
|
||||
|
||||
@property
|
||||
def created_datetime(self):
|
||||
@_base.computed_field
|
||||
def created_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.created_timestamp)
|
||||
|
||||
@property
|
||||
def deleted_datetime(self):
|
||||
@_base.computed_field
|
||||
def deleted_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
||||
|
||||
@property
|
||||
def updated_datetime(self):
|
||||
@_base.computed_field
|
||||
def updated_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ class CloudapiFlipgroupListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
name: str | None = None,
|
||||
page_number: int | None = None,
|
||||
page_size: int | None = None,
|
||||
rg_id: int | None = None,
|
||||
sort_by: str | None = None,
|
||||
status: _nested.FlipGroupStatus | None = None,
|
||||
vins_id: int | None = None,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .change_storage_policy import *
|
||||
from .create import *
|
||||
from .create_virtual import *
|
||||
from .delete import *
|
||||
@@ -10,6 +11,7 @@ from .rename import *
|
||||
|
||||
class CloudapiImageAPI(
|
||||
_base.BaseAPI,
|
||||
CloudapiImageChangeStoragePolicyProtocol,
|
||||
CloudapiImageCreateProtocol,
|
||||
CloudapiImageCreateVirtualProtocol,
|
||||
CloudapiImageDeleteProtocol,
|
||||
|
||||
17
src/dynamix_sdk/api/cloudapi/image/change_storage_policy.py
Normal file
17
src/dynamix_sdk/api/cloudapi/image/change_storage_policy.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiImageChangeStoragePolicyResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiImageChangeStoragePolicyProtocol(
|
||||
_base.BasePostAPIFunctionProtocol,
|
||||
):
|
||||
def change_storage_policy(
|
||||
self,
|
||||
*,
|
||||
image_id: int,
|
||||
storage_policy_id: int,
|
||||
) -> CloudapiImageChangeStoragePolicyResultBool:
|
||||
...
|
||||
@@ -12,13 +12,13 @@ class CloudapiImageCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
*,
|
||||
account_id: int,
|
||||
boot_mode: _nested.BootMode,
|
||||
drivers: list[_nested.Driver],
|
||||
boot_loader_type: _nested.BootLoaderType,
|
||||
name: str,
|
||||
download_url: str,
|
||||
storage_policy_id: int,
|
||||
hot_resize: bool = False,
|
||||
network_interface_naming: _nested.NetIfaceNamingTemplate = (
|
||||
_nested.NetIfaceNamingTemplate.ens
|
||||
_nested.NetIfaceNamingTemplate.ENS
|
||||
),
|
||||
download_password: str | None = None,
|
||||
os_password: str | None = None,
|
||||
|
||||
@@ -11,5 +11,6 @@ class CloudapiImageCreateVirtualProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
*,
|
||||
name: str,
|
||||
target_image_id: int,
|
||||
account_id: int | None = None,
|
||||
) -> CloudapiImageCreateVirtualResultInt:
|
||||
...
|
||||
|
||||
@@ -12,7 +12,6 @@ class CloudapiImageGetResultModel(_base.BaseAPIResultModel):
|
||||
boot_mode: _nested.BootMode | _EmptyStr | None
|
||||
bootable: bool
|
||||
cd_presented_to: dict[str, list[int]]
|
||||
ckey: str
|
||||
deleted_timestamp: int
|
||||
description: str
|
||||
drivers: list[_nested.Driver]
|
||||
@@ -32,27 +31,29 @@ class CloudapiImageGetResultModel(_base.BaseAPIResultModel):
|
||||
present_to: dict[str, int]
|
||||
provider_name: str
|
||||
purge_attempt_count: int
|
||||
res_id: str
|
||||
res_id: str | None
|
||||
rescue_cd: bool
|
||||
sep_id: int
|
||||
sep_pool_name: str
|
||||
storage_policy_id: int
|
||||
shared_with: list[int]
|
||||
size_gb: int
|
||||
snapshot_id: str = ''
|
||||
status: _nested.ImageStatus
|
||||
tech_status: _nested.ImageTechStatus
|
||||
to_clean: bool
|
||||
type: _nested.ImageType
|
||||
unc_path: str
|
||||
version: str
|
||||
vm_ci_id: int
|
||||
|
||||
@property
|
||||
def boot_loader_type(self):
|
||||
@_base.computed_field
|
||||
def boot_loader_type(self) -> _nested.BootLoaderType | None:
|
||||
if self.type in _nested.BootLoaderType._member_names_:
|
||||
return _nested.BootLoaderType[self.type]
|
||||
|
||||
@property
|
||||
def deleted_datetime(self):
|
||||
@_base.computed_field
|
||||
def deleted_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
||||
|
||||
|
||||
|
||||
@@ -26,5 +26,6 @@ class CloudapiImageListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
sort_by: str | None = None,
|
||||
status: _nested.ImageStatus | None = None,
|
||||
type: _nested.ImageType | None = None,
|
||||
storage_policy_id: int | None = None,
|
||||
) -> CloudapiImageListResultModel:
|
||||
...
|
||||
|
||||
@@ -13,13 +13,11 @@ class CloudapiK8ciListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
*,
|
||||
id: int | None = None,
|
||||
include_disabled: bool = False,
|
||||
master_node_driver: _nested.Driver | None = None,
|
||||
name: str | None = None,
|
||||
network_plugin: _nested.K8sNetworkPlugin | None = None,
|
||||
page_number: int | None = None,
|
||||
page_size: int | None = None,
|
||||
sort_by: str | None = None,
|
||||
status: _nested.K8CIStatus | None = None,
|
||||
worker_node_driver: _nested.Driver | None = None,
|
||||
) -> CloudapiK8ciListResultModel:
|
||||
...
|
||||
|
||||
@@ -12,12 +12,10 @@ class CloudapiK8ciListDeletedProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
self,
|
||||
*,
|
||||
id: None | int = None,
|
||||
master_node_driver: _nested.Driver | None = None,
|
||||
name: str | None = None,
|
||||
network_plugin: _nested.K8sNetworkPlugin | None = None,
|
||||
page_number: int | None = None,
|
||||
page_size: int | None = None,
|
||||
sort_by: str | None = None,
|
||||
worker_node_driver: _nested.Driver | None = None,
|
||||
) -> CloudapiK8ciListDeletedResultModel:
|
||||
...
|
||||
|
||||
@@ -1,11 +1,24 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .create import *
|
||||
from .delete import *
|
||||
from .delete_master_from_group import *
|
||||
from .delete_worker_from_group import *
|
||||
from .disable import *
|
||||
from .enable import *
|
||||
from .get import *
|
||||
from .get_config import *
|
||||
from .get_node_annotations import *
|
||||
from .get_node_labels import *
|
||||
from .get_node_taints import *
|
||||
from .list import *
|
||||
from .list_deleted import *
|
||||
from .migrate_to_zone import *
|
||||
from .restore import *
|
||||
from .start import *
|
||||
from .stop import *
|
||||
from .update import *
|
||||
from .update_worker_nodes_meta_data import *
|
||||
from .worker_add import *
|
||||
from .worker_reset import *
|
||||
from .worker_restart import *
|
||||
from .workers_group_add import *
|
||||
@@ -16,12 +29,25 @@ from .workers_group_get_by_name import *
|
||||
class CloudapiK8sAPI(
|
||||
_base.BaseAPI,
|
||||
CloudapiK8sCreateProtocol,
|
||||
CloudapiK8sDeleteMasterFromGroupProtocol,
|
||||
CloudapiK8sDeleteProtocol,
|
||||
CloudapiK8sDeleteWorkerFromGroupProtocol,
|
||||
CloudapiK8sDisableProtocol,
|
||||
CloudapiK8sEnableProtocol,
|
||||
CloudapiK8sGetConfigProtocol,
|
||||
CloudapiK8sGetNodeAnnotationsProtocol,
|
||||
CloudapiK8sGetNodeLabelsProtocol,
|
||||
CloudapiK8sGetNodeTaintsProtocol,
|
||||
CloudapiK8sGetProtocol,
|
||||
CloudapiK8sListDeletedProtocol,
|
||||
CloudapiK8sListProtocol,
|
||||
CloudapiK8sMigrateToZoneProtocol,
|
||||
CloudapiK8sRestoreProtocol,
|
||||
CloudapiK8sStartProtocol,
|
||||
CloudapiK8sStopProtocol,
|
||||
CloudapiK8sUpdateProtocol,
|
||||
CloudapiK8sUpdateWorkerNodesMetaDataProtocol,
|
||||
CloudapiK8sWorkerAddProtocol,
|
||||
CloudapiK8sWorkerResetProtocol,
|
||||
CloudapiK8sWorkerRestartProtocol,
|
||||
CloudapiK8sWorkersGroupAddProtocol,
|
||||
|
||||
@@ -15,6 +15,7 @@ class CloudapiK8sCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
k8ci_id: int,
|
||||
worker_group_name: str,
|
||||
network_plugin: _nested.K8sNetworkPlugin,
|
||||
storage_policy_id: int,
|
||||
master_node_sep_id: int | None = None,
|
||||
master_node_sep_pool_name: str | None = None,
|
||||
worker_node_sep_id: int | None = None,
|
||||
@@ -43,8 +44,8 @@ class CloudapiK8sCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
extnet_only: bool = False,
|
||||
ci_user_data: str | None = None,
|
||||
additional_sans: list[str] | None = None,
|
||||
chipset: _nested.Chipset = _nested.Chipset.i440fx,
|
||||
lb_sysctl_params: list[dict] | None = None,
|
||||
chipset: _nested.Chipset = _nested.Chipset.Q35,
|
||||
lb_sysctl_params: list[dict[str, str]] | None = None,
|
||||
zone_id: int | None = None,
|
||||
) -> CloudapiK8sCreateResultStr:
|
||||
...
|
||||
|
||||
18
src/dynamix_sdk/api/cloudapi/k8s/delete_master_from_group.py
Normal file
18
src/dynamix_sdk/api/cloudapi/k8s/delete_master_from_group.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiK8sDeleteMasterFromGroupResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiK8sDeleteMasterFromGroupProtocol(
|
||||
_base.BasePostAPIFunctionProtocol,
|
||||
):
|
||||
def delete_master_from_group(
|
||||
self,
|
||||
*,
|
||||
k8s_id: int,
|
||||
master_group_id: int,
|
||||
master_node_ids: list[int],
|
||||
) -> CloudapiK8sDeleteMasterFromGroupResultBool:
|
||||
...
|
||||
18
src/dynamix_sdk/api/cloudapi/k8s/delete_worker_from_group.py
Normal file
18
src/dynamix_sdk/api/cloudapi/k8s/delete_worker_from_group.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiK8sDeleteWorkerFromGroupResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiK8sDeleteWorkerFromGroupProtocol(
|
||||
_base.BasePostAPIFunctionProtocol,
|
||||
):
|
||||
def delete_worker_from_group(
|
||||
self,
|
||||
*,
|
||||
k8s_id: int,
|
||||
worker_group_id: int,
|
||||
worker_node_id: int,
|
||||
) -> CloudapiK8sDeleteWorkerFromGroupResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/k8s/disable.py
Normal file
14
src/dynamix_sdk/api/cloudapi/k8s/disable.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiK8sDisableResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiK8sDisableProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disable(
|
||||
self,
|
||||
*,
|
||||
k8s_id: int,
|
||||
) -> CloudapiK8sDisableResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/k8s/enable.py
Normal file
14
src/dynamix_sdk/api/cloudapi/k8s/enable.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiK8sEnableResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiK8sEnableProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def enable(
|
||||
self,
|
||||
*,
|
||||
k8s_id: int,
|
||||
) -> CloudapiK8sEnableResultBool:
|
||||
...
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user