Compare commits
1 Commits
1.4.1
...
1.2.latest
| Author | SHA1 | Date | |
|---|---|---|---|
| 27d7234dde |
32
.pre-commit-config.yaml
Normal file
32
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
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
|
||||||
23
CHANGELOG.md
23
CHANGELOG.md
@@ -1,13 +1,20 @@
|
|||||||
# Список изменений в версии 1.4.1
|
# Список изменений в версии 1.2.3
|
||||||
|
|
||||||
## Добавлено
|
## Добавлено
|
||||||
|
|
||||||
## Удалено
|
### Функциональный интерфейс
|
||||||
|
|
||||||
## Исправлено
|
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| 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`. |
|
### Функциональный интерфейс
|
||||||
|
| Идентификатор<br>задачи | Описание |
|
||||||
|
| --- | --- |
|
||||||
|
|
||||||
|
## Исправлено
|
||||||
|
|
||||||
|
### Функциональный интерфейс
|
||||||
|
| Идентификатор<br>задачи | Описание |
|
||||||
|
| --- | --- |
|
||||||
|
| BPYS-990 | Функции `cloudapi.kvmx86.create`, `cloudapi.kvmx86.create_blank`: вызов функций завершался ошибкой валидации поля `sdn_logical_port_id` для модели `InterfaceAPIParamsNM` при передаче данных в параметр `interfaces`. |
|
||||||
|
|||||||
4
Makefile
Normal file
4
Makefile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
dev:
|
||||||
|
pip install -e .
|
||||||
|
pip install -r requirements-dev.txt
|
||||||
|
pre-commit install
|
||||||
362
README.md
362
README.md
@@ -15,8 +15,7 @@
|
|||||||
- [Ошибки и исключения (exceptions)](#ошибки-и-исключения-exceptions)
|
- [Ошибки и исключения (exceptions)](#ошибки-и-исключения-exceptions)
|
||||||
- [Ошибки валидации данных](#ошибки-валидации-данных)
|
- [Ошибки валидации данных](#ошибки-валидации-данных)
|
||||||
- [Ошибки HTTP](#ошибки-http)
|
- [Ошибки HTTP](#ошибки-http)
|
||||||
- [Ошибка несовместимости c API](#ошибка-несовместимости-с-api)
|
- [Доступный функционал](#доступный-функционал)
|
||||||
- [Доступная функциональность](#доступная-функциональность)
|
|
||||||
- [Способы авторизации](#способы-авторизации)
|
- [Способы авторизации](#способы-авторизации)
|
||||||
- [Функции API](#функции-api)
|
- [Функции API](#функции-api)
|
||||||
- [Cloudapi](#cloudapi)
|
- [Cloudapi](#cloudapi)
|
||||||
@@ -27,7 +26,7 @@
|
|||||||
|
|
||||||
**Dynamix Python SDK** предоставляет удобный интерфейс для интеграции взаимодействия с API **Dynamix Enterprise** в программный код на языке Python.
|
**Dynamix Python SDK** предоставляет удобный интерфейс для интеграции взаимодействия с API **Dynamix Enterprise** в программный код на языке Python.
|
||||||
|
|
||||||
**Примечание:** проект находится в стадии активной разработки, [доступная функциональность](#доступная-функциональность) будет расширяться с каждой новой версией.
|
**Примечание:** проект находится в стадии активной разработки, [доступный функционал](#доступный-функционал) будет расширяться с каждой новой версией.
|
||||||
|
|
||||||
## Системные требования
|
## Системные требования
|
||||||
|
|
||||||
@@ -35,8 +34,6 @@
|
|||||||
|
|
||||||
| Версия платформы | Версия SDK |
|
| Версия платформы | Версия SDK |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| 4.5.0 | 1.4.x |
|
|
||||||
| 4.4.0 | 1.3.x |
|
|
||||||
| 4.4.0 build 963 | 1.2.x |
|
| 4.4.0 build 963 | 1.2.x |
|
||||||
| 4.3.0 | 1.1.x |
|
| 4.3.0 | 1.1.x |
|
||||||
| 4.2.0 | 1.0.x |
|
| 4.2.0 | 1.0.x |
|
||||||
@@ -122,24 +119,6 @@ dx = Dynamix(
|
|||||||
|
|
||||||
</details>
|
</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>
|
<details><summary>Настройка повторных попыток при 503</summary>
|
||||||
|
|
||||||
По умолчанию SDK при получении кода ответа 503 производит 10 повторных попыток с интервалом 5 секунд. Данное поведение можно скорректировать:
|
По умолчанию SDK при получении кода ответа 503 производит 10 повторных попыток с интервалом 5 секунд. Данное поведение можно скорректировать:
|
||||||
@@ -207,24 +186,6 @@ BVSAuth(
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details><summary>Игнорирование проверки совместимости с API</summary>
|
|
||||||
|
|
||||||
**Важно:** игнорирование проверки совместимости с API может вызвать непредвиденные ошибки в работе SDK, поэтому использование данной возможности допустимо только принимая на себя всю ответственность за возможные последствия.
|
|
||||||
|
|
||||||
При игнорирование выводится только сообщение с предупреждением о несовместимости.
|
|
||||||
|
|
||||||
```python
|
|
||||||
from dynamix_sdk import Dynamix
|
|
||||||
|
|
||||||
|
|
||||||
Dynamix(
|
|
||||||
...,
|
|
||||||
ignore_api_compatibility=True,
|
|
||||||
)
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### Функциональный интерфейс
|
### Функциональный интерфейс
|
||||||
|
|
||||||
Функциональный интерфейс предоставляет функции, соответствующие функциям API платформы.
|
Функциональный интерфейс предоставляет функции, соответствующие функциям API платформы.
|
||||||
@@ -235,35 +196,17 @@ Dynamix(
|
|||||||
|
|
||||||

|

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