Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b6f5172eb7 | |||
| e340be7d67 |
@@ -1,17 +1,20 @@
|
|||||||
# Список изменений в версии 1.3.1
|
# Список изменений в версии 1.1.2
|
||||||
|
|
||||||
## Добавлено
|
## Добавлено
|
||||||
|
|
||||||
|
### Функциональный интерфейс
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
|
||||||
## Удалено
|
## Удалено
|
||||||
|
|
||||||
|
### Функциональный интерфейс
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
|
||||||
## Исправлено
|
## Исправлено
|
||||||
|
|
||||||
|
### Функциональный интерфейс
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BPYS-842 | Функция cloudbroker.user.get: вызов функции завершался ошибкой валидации полей `_ckey` и `_meta`. |
|
| BPYS-670 | Функция `cloudapi.bservice.group_get`: вызов функции завершался ошибкой валидации поля `computes.0.chipset`. |
|
||||||
|
|||||||
336
README.md
336
README.md
@@ -15,7 +15,6 @@
|
|||||||
- [Ошибки и исключения (exceptions)](#ошибки-и-исключения-exceptions)
|
- [Ошибки и исключения (exceptions)](#ошибки-и-исключения-exceptions)
|
||||||
- [Ошибки валидации данных](#ошибки-валидации-данных)
|
- [Ошибки валидации данных](#ошибки-валидации-данных)
|
||||||
- [Ошибки HTTP](#ошибки-http)
|
- [Ошибки HTTP](#ошибки-http)
|
||||||
- [Ошибка несовместимости c API](#ошибка-несовместимости-с-api)
|
|
||||||
- [Доступный функционал](#доступный-функционал)
|
- [Доступный функционал](#доступный-функционал)
|
||||||
- [Способы авторизации](#способы-авторизации)
|
- [Способы авторизации](#способы-авторизации)
|
||||||
- [Функции API](#функции-api)
|
- [Функции API](#функции-api)
|
||||||
@@ -35,8 +34,6 @@
|
|||||||
|
|
||||||
| Версия платформы | Версия SDK |
|
| Версия платформы | Версия SDK |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| 4.4.0 | 1.3.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 |
|
||||||
|
|
||||||
@@ -121,24 +118,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 секунд. Данное поведение можно скорректировать:
|
||||||
@@ -206,24 +185,6 @@ BVSAuth(
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details><summary>Игнорирование проверки совместимости с API</summary>
|
|
||||||
|
|
||||||
**Важно:** игнорирование проверки совместимости с API может вызвать непредвиденные ошибки в работе SDK, поэтому использование данного функционала допустимо только принимая на себя всю ответственность за возможные последствия.
|
|
||||||
|
|
||||||
При игнорирование выводится только сообщение с предупреждением о несовместимости.
|
|
||||||
|
|
||||||
```python
|
|
||||||
from dynamix_sdk import Dynamix
|
|
||||||
|
|
||||||
|
|
||||||
Dynamix(
|
|
||||||
...,
|
|
||||||
ignore_api_compatibility=True,
|
|
||||||
)
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### Функциональный интерфейс
|
### Функциональный интерфейс
|
||||||
|
|
||||||
Функциональный интерфейс предоставляет функции, соответствующие функциям API платформы.
|
Функциональный интерфейс предоставляет функции, соответствующие функциям API платформы.
|
||||||
@@ -515,24 +476,6 @@ 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
|
|
||||||
```
|
|
||||||
|
|
||||||
Чтобы включить использование исключения <code>dynamix_sdk.exceptions.RequestException</code>, необходимо передать в конструкторы классов <code>Dynamix</code>, <code>DECS3OAuth</code>, <code>BVSAuth</code> параметр <code>wrap_request_exceptions=True</code>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
#### Ошибка несовместимости с API
|
|
||||||
SDK производит проверку совместимости с API.
|
|
||||||
При несовместимости будет вызвано исключение `exceptions.IncompatibleAPIError`.
|
|
||||||
|
|
||||||
## Доступный функционал
|
## Доступный функционал
|
||||||
|
|
||||||
### Способы авторизации
|
### Способы авторизации
|
||||||
@@ -555,7 +498,6 @@ SDK производит проверку совместимости с API.
|
|||||||
- /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
|
||||||
@@ -567,7 +509,6 @@ SDK производит проверку совместимости с API.
|
|||||||
<details><summary>audit</summary>
|
<details><summary>audit</summary>
|
||||||
|
|
||||||
- /cloudapi/audit/get
|
- /cloudapi/audit/get
|
||||||
- /cloudapi/audit/list
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -592,12 +533,7 @@ SDK производит проверку совместимости с API.
|
|||||||
- /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
|
||||||
|
|
||||||
@@ -605,7 +541,6 @@ SDK производит проверку совместимости с API.
|
|||||||
|
|
||||||
<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
|
||||||
@@ -615,41 +550,19 @@ SDK производит проверку совместимости с API.
|
|||||||
- /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
|
||||||
@@ -657,12 +570,9 @@ SDK производит проверку совместимости с API.
|
|||||||
- /cloudapi/compute/pfwDel
|
- /cloudapi/compute/pfwDel
|
||||||
- /cloudapi/compute/pfwList
|
- /cloudapi/compute/pfwList
|
||||||
- /cloudapi/compute/pinToStack
|
- /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
|
||||||
@@ -683,7 +593,6 @@ SDK производит проверку совместимости с API.
|
|||||||
|
|
||||||
<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
|
||||||
@@ -703,13 +612,6 @@ SDK производит проверку совместимости с API.
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details><summary>dpdknet</summary>
|
|
||||||
|
|
||||||
- /cloudapi/dpdknet/get
|
|
||||||
- /cloudapi/dpdknet/list
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details><summary>extnet</summary>
|
<details><summary>extnet</summary>
|
||||||
|
|
||||||
- /cloudapi/extnet/get
|
- /cloudapi/extnet/get
|
||||||
@@ -732,7 +634,6 @@ SDK производит проверку совместимости с API.
|
|||||||
|
|
||||||
<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
|
||||||
@@ -751,36 +652,6 @@ SDK производит проверку совместимости с API.
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details><summary>k8s</summary>
|
|
||||||
|
|
||||||
- /cloudapi/k8s/create
|
|
||||||
- /cloudapi/k8s/delete
|
|
||||||
- /cloudapi/k8s/deleteMasterFromGroup
|
|
||||||
- /cloudapi/k8s/deleteWorkerFromGroup
|
|
||||||
- /cloudapi/k8s/disable
|
|
||||||
- /cloudapi/k8s/enable
|
|
||||||
- /cloudapi/k8s/get
|
|
||||||
- /cloudapi/k8s/getConfig
|
|
||||||
- /cloudapi/k8s/getNodeAnnotations
|
|
||||||
- /cloudapi/k8s/getNodeLabels
|
|
||||||
- /cloudapi/k8s/getNodeTaints
|
|
||||||
- /cloudapi/k8s/list
|
|
||||||
- /cloudapi/k8s/listDeleted
|
|
||||||
- /cloudapi/k8s/migrateToZone
|
|
||||||
- /cloudapi/k8s/restore
|
|
||||||
- /cloudapi/k8s/start
|
|
||||||
- /cloudapi/k8s/stop
|
|
||||||
- /cloudapi/k8s/update
|
|
||||||
- /cloudapi/k8s/updateWorkerNodesMetaData
|
|
||||||
- /cloudapi/k8s/workerAdd
|
|
||||||
- /cloudapi/k8s/workerReset
|
|
||||||
- /cloudapi/k8s/workerRestart
|
|
||||||
- /cloudapi/k8s/workersGroupAdd
|
|
||||||
- /cloudapi/k8s/workersGroupDelete
|
|
||||||
- /cloudapi/k8s/workersGroupGetByName
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details><summary>kvmx86</summary>
|
<details><summary>kvmx86</summary>
|
||||||
|
|
||||||
- /cloudapi/kvmx86/create
|
- /cloudapi/kvmx86/create
|
||||||
@@ -796,11 +667,8 @@ SDK производит проверку совместимости с API.
|
|||||||
- /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/enable
|
|
||||||
- /cloudapi/lb/frontendBind
|
- /cloudapi/lb/frontendBind
|
||||||
- /cloudapi/lb/frontendBindDelete
|
- /cloudapi/lb/frontendBindDelete
|
||||||
- /cloudapi/lb/frontendBindingUpdate
|
- /cloudapi/lb/frontendBindingUpdate
|
||||||
@@ -809,14 +677,6 @@ SDK производит проверку совместимости с API.
|
|||||||
- /cloudapi/lb/get
|
- /cloudapi/lb/get
|
||||||
- /cloudapi/lb/list
|
- /cloudapi/lb/list
|
||||||
- /cloudapi/lb/listDeleted
|
- /cloudapi/lb/listDeleted
|
||||||
- /cloudapi/lb/makeHighlyAvailable
|
|
||||||
- /cloudapi/lb/migrateToZone
|
|
||||||
- /cloudapi/lb/restart
|
|
||||||
- /cloudapi/lb/restore
|
|
||||||
- /cloudapi/lb/start
|
|
||||||
- /cloudapi/lb/stop
|
|
||||||
- /cloudapi/lb/update
|
|
||||||
- /cloudapi/lb/updateSysctlParams
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -827,26 +687,16 @@ SDK производит проверку совместимости с API.
|
|||||||
|
|
||||||
</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
|
||||||
@@ -854,24 +704,6 @@ SDK производит проверку совместимости с API.
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details><summary>security_group</summary>
|
|
||||||
|
|
||||||
- /cloudapi/security_group/get
|
|
||||||
- /cloudapi/security_group/create
|
|
||||||
- /cloudapi/security_group/create_rule
|
|
||||||
- /cloudapi/security_group/delete
|
|
||||||
- /cloudapi/security_group/delete_rule
|
|
||||||
- /cloudapi/security_group/list
|
|
||||||
- /cloudapi/security_group/update
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details><summary>sep</summary>
|
|
||||||
|
|
||||||
- /cloudapi/sep/listAvailableSepAndPools
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details><summary>stack</summary>
|
<details><summary>stack</summary>
|
||||||
|
|
||||||
- /cloudapi/stack/get
|
- /cloudapi/stack/get
|
||||||
@@ -879,13 +711,6 @@ SDK производит проверку совместимости с API.
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details><summary>storage_policy</summary>
|
|
||||||
|
|
||||||
- /cloudapi/storage_policy/get
|
|
||||||
- /cloudapi/storage_policy/list
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details><summary>tasks</summary>
|
<details><summary>tasks</summary>
|
||||||
|
|
||||||
- /cloudapi/tasks/get
|
- /cloudapi/tasks/get
|
||||||
@@ -893,33 +718,10 @@ SDK производит проверку совместимости с API.
|
|||||||
|
|
||||||
</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/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>
|
||||||
|
|
||||||
@@ -929,21 +731,13 @@ SDK производит проверку совместимости с API.
|
|||||||
- /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
|
||||||
@@ -953,142 +747,16 @@ SDK производит проверку совместимости с API.
|
|||||||
|
|
||||||
</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
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details><summary>audit</summary>
|
|
||||||
|
|
||||||
- /cloudbroker/audit/list
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details><summary>compute</summary>
|
|
||||||
|
|
||||||
- /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,15 +5,15 @@ authors = [
|
|||||||
{name = "Vladislav Nesterov"},
|
{name = "Vladislav Nesterov"},
|
||||||
{name = "Stanislav Karimov"},
|
{name = "Stanislav Karimov"},
|
||||||
]
|
]
|
||||||
version = "1.3.1"
|
version = "1.1.2"
|
||||||
|
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.10.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",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
@@ -49,8 +47,6 @@ class NetType(str, _AutoNameEnum):
|
|||||||
DPDK = _enum_auto()
|
DPDK = _enum_auto()
|
||||||
EMPTY = _enum_auto()
|
EMPTY = _enum_auto()
|
||||||
EXTNET = _enum_auto()
|
EXTNET = _enum_auto()
|
||||||
SDN = _enum_auto()
|
|
||||||
TRUNK = _enum_auto()
|
|
||||||
VFNIC = _enum_auto()
|
VFNIC = _enum_auto()
|
||||||
VINS = _enum_auto()
|
VINS = _enum_auto()
|
||||||
|
|
||||||
@@ -103,12 +99,10 @@ class LockStatus(str, _AutoNameEnum):
|
|||||||
|
|
||||||
|
|
||||||
class VMFeature(str, _AutoNameEnum):
|
class VMFeature(str, _AutoNameEnum):
|
||||||
changemac = _enum_auto()
|
|
||||||
cpupin = _enum_auto()
|
cpupin = _enum_auto()
|
||||||
dpdk = _enum_auto()
|
dpdk = _enum_auto()
|
||||||
hugepages = _enum_auto()
|
hugepages = _enum_auto()
|
||||||
numa = _enum_auto()
|
numa = _enum_auto()
|
||||||
trunk = _enum_auto()
|
|
||||||
vfnic = _enum_auto()
|
vfnic = _enum_auto()
|
||||||
|
|
||||||
|
|
||||||
@@ -132,19 +126,13 @@ class RGResourceType(str, _AutoNameEnum):
|
|||||||
|
|
||||||
class DiskStatus(str, _AutoNameEnum):
|
class DiskStatus(str, _AutoNameEnum):
|
||||||
ASSIGNED = _enum_auto()
|
ASSIGNED = _enum_auto()
|
||||||
BACKUP_RUNNING = _enum_auto()
|
|
||||||
CLONING = _enum_auto()
|
|
||||||
CREATED = _enum_auto()
|
CREATED = _enum_auto()
|
||||||
CREATING = _enum_auto()
|
|
||||||
DELETED = _enum_auto()
|
DELETED = _enum_auto()
|
||||||
DESTROYED = _enum_auto()
|
DESTROYED = _enum_auto()
|
||||||
MERGE = _enum_auto()
|
DESTROYING = _enum_auto()
|
||||||
MIGRATING = _enum_auto()
|
|
||||||
MODELED = _enum_auto()
|
MODELED = _enum_auto()
|
||||||
PURGED = _enum_auto()
|
PURGED = _enum_auto()
|
||||||
REPLICATION = _enum_auto()
|
REPLICATION = _enum_auto()
|
||||||
ROLLBACK = _enum_auto()
|
|
||||||
SNAPCREATE = _enum_auto()
|
|
||||||
|
|
||||||
|
|
||||||
class DiskTechStatus(str, _AutoNameEnum):
|
class DiskTechStatus(str, _AutoNameEnum):
|
||||||
@@ -167,17 +155,11 @@ class VMStatus(str, _AutoNameEnum):
|
|||||||
class VMTechStatus(str, _AutoNameEnum):
|
class VMTechStatus(str, _AutoNameEnum):
|
||||||
BACKUP_RUNNING = _enum_auto()
|
BACKUP_RUNNING = _enum_auto()
|
||||||
BACKUP_STOPPED = _enum_auto()
|
BACKUP_STOPPED = _enum_auto()
|
||||||
CLONING = _enum_auto()
|
|
||||||
DOWN = _enum_auto()
|
DOWN = _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()
|
|
||||||
SCHEDULED = _enum_auto()
|
SCHEDULED = _enum_auto()
|
||||||
SNAPCREATE = _enum_auto()
|
|
||||||
STARTED = _enum_auto()
|
STARTED = _enum_auto()
|
||||||
STARTING = _enum_auto()
|
STARTING = _enum_auto()
|
||||||
STOPPED = _enum_auto()
|
STOPPED = _enum_auto()
|
||||||
@@ -251,23 +233,6 @@ class VNFType(str, _AutoNameEnum):
|
|||||||
|
|
||||||
|
|
||||||
class VNFDevStatus(str, _AutoNameEnum):
|
class VNFDevStatus(str, _AutoNameEnum):
|
||||||
MODELED = _enum_auto()
|
|
||||||
CREATED = _enum_auto()
|
|
||||||
DELETED = _enum_auto()
|
|
||||||
DESTROYED = _enum_auto()
|
|
||||||
|
|
||||||
|
|
||||||
class VNFDevTechStatus(str, _AutoNameEnum):
|
|
||||||
DOWN = _enum_auto()
|
|
||||||
MIGRATING = _enum_auto()
|
|
||||||
SCHEDULED = _enum_auto()
|
|
||||||
STARTED = _enum_auto()
|
|
||||||
STARTING = _enum_auto()
|
|
||||||
STOPPED = _enum_auto()
|
|
||||||
STOPPING = _enum_auto()
|
|
||||||
|
|
||||||
|
|
||||||
class VNFStatus(str, _AutoNameEnum):
|
|
||||||
MODELED = _enum_auto()
|
MODELED = _enum_auto()
|
||||||
CREATED = _enum_auto()
|
CREATED = _enum_auto()
|
||||||
ENABLED = _enum_auto()
|
ENABLED = _enum_auto()
|
||||||
@@ -277,7 +242,7 @@ class VNFStatus(str, _AutoNameEnum):
|
|||||||
STASHED = _enum_auto()
|
STASHED = _enum_auto()
|
||||||
|
|
||||||
|
|
||||||
class VNFTechStatus(str, _AutoNameEnum):
|
class VNFDevTechStatus(str, _AutoNameEnum):
|
||||||
STARTING = _enum_auto()
|
STARTING = _enum_auto()
|
||||||
STARTED = _enum_auto()
|
STARTED = _enum_auto()
|
||||||
STOPPING = _enum_auto()
|
STOPPING = _enum_auto()
|
||||||
@@ -451,7 +416,6 @@ class PhysicalNodeStatus(str, _AutoNameEnum):
|
|||||||
DECOMMISSIONED = _enum_auto()
|
DECOMMISSIONED = _enum_auto()
|
||||||
DECOMMISSIONING = _enum_auto()
|
DECOMMISSIONING = _enum_auto()
|
||||||
ENABLED = _enum_auto()
|
ENABLED = _enum_auto()
|
||||||
ERROR = _enum_auto()
|
|
||||||
INSTALLING = _enum_auto()
|
INSTALLING = _enum_auto()
|
||||||
MAINTENANCE = _enum_auto()
|
MAINTENANCE = _enum_auto()
|
||||||
RESTRICTED = _enum_auto()
|
RESTRICTED = _enum_auto()
|
||||||
@@ -470,8 +434,6 @@ class DHCPReservationType(str, _AutoNameEnum):
|
|||||||
|
|
||||||
|
|
||||||
class TaskStatus(str, _AutoNameEnum):
|
class TaskStatus(str, _AutoNameEnum):
|
||||||
ABORTED = _enum_auto()
|
|
||||||
CLEANUPED = _enum_auto()
|
|
||||||
ERROR = _enum_auto()
|
ERROR = _enum_auto()
|
||||||
OK = _enum_auto()
|
OK = _enum_auto()
|
||||||
PROCESSING = _enum_auto()
|
PROCESSING = _enum_auto()
|
||||||
@@ -491,130 +453,3 @@ class K8CIStatus(str, _AutoNameEnum):
|
|||||||
DISABLED = _enum_auto()
|
DISABLED = _enum_auto()
|
||||||
ENABLED = _enum_auto()
|
ENABLED = _enum_auto()
|
||||||
MODELED = _enum_auto()
|
MODELED = _enum_auto()
|
||||||
|
|
||||||
|
|
||||||
class K8sStatus(str, _AutoNameEnum):
|
|
||||||
CREATED = _enum_auto()
|
|
||||||
CREATING = _enum_auto()
|
|
||||||
DELETED = _enum_auto()
|
|
||||||
DELETING = _enum_auto()
|
|
||||||
DESTROYED = _enum_auto()
|
|
||||||
DESTROYING = _enum_auto()
|
|
||||||
DISABLED = _enum_auto()
|
|
||||||
DISABLING = _enum_auto()
|
|
||||||
ENABLED = _enum_auto()
|
|
||||||
ENABLING = _enum_auto()
|
|
||||||
MODELED = _enum_auto()
|
|
||||||
RESTORING = _enum_auto()
|
|
||||||
|
|
||||||
|
|
||||||
class K8sTechStatus(str, _AutoNameEnum):
|
|
||||||
STARTED = _enum_auto()
|
|
||||||
STARTING = _enum_auto()
|
|
||||||
STOPPED = _enum_auto()
|
|
||||||
STOPPING = _enum_auto()
|
|
||||||
|
|
||||||
|
|
||||||
class DPDKNetStatus(str, _AutoNameEnum):
|
|
||||||
CREATED = _enum_auto()
|
|
||||||
DESTROYED = _enum_auto()
|
|
||||||
DISABLED = _enum_auto()
|
|
||||||
ENABLED = _enum_auto()
|
|
||||||
|
|
||||||
|
|
||||||
class VFPoolStatus(str, _AutoNameEnum):
|
|
||||||
CREATED = _enum_auto()
|
|
||||||
DESTROYED = _enum_auto()
|
|
||||||
DISABLED = _enum_auto()
|
|
||||||
ENABLED = _enum_auto()
|
|
||||||
|
|
||||||
|
|
||||||
class LinkState(str, _AutoNameEnum):
|
|
||||||
on = _enum_auto()
|
|
||||||
off = _enum_auto()
|
|
||||||
|
|
||||||
|
|
||||||
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()
|
|
||||||
|
|||||||
@@ -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,12 +13,8 @@ class DiskAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
|||||||
|
|
||||||
|
|
||||||
class InterfaceAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
class InterfaceAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||||
enabled: bool = True
|
|
||||||
net_id: int
|
net_id: int
|
||||||
net_type: _enums.NetType
|
net_type: _enums.NetType
|
||||||
sdn_logical_port_id: str
|
|
||||||
security_group_ids: None | list[int] = None
|
|
||||||
security_group_mode: bool = False
|
|
||||||
|
|
||||||
ip_addr: None | str = None
|
ip_addr: None | str = None
|
||||||
mac: None | str = None
|
mac: None | str = None
|
||||||
@@ -30,26 +25,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
@@ -4,28 +4,18 @@ from .audit import *
|
|||||||
from .bservice import *
|
from .bservice import *
|
||||||
from .compute import *
|
from .compute import *
|
||||||
from .disks import *
|
from .disks import *
|
||||||
from .dpdknet import *
|
|
||||||
from .extnet import *
|
from .extnet import *
|
||||||
from .flipgroup import *
|
from .flipgroup import *
|
||||||
from .image import *
|
from .image import *
|
||||||
from .k8ci import *
|
from .k8ci import *
|
||||||
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 .sep import *
|
|
||||||
from .stack import *
|
from .stack 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):
|
||||||
@@ -34,25 +24,15 @@ class CloudapiAPI(_base.BaseAPI):
|
|||||||
bservice: CloudapiBserviceAPI
|
bservice: CloudapiBserviceAPI
|
||||||
compute: CloudapiComputeAPI
|
compute: CloudapiComputeAPI
|
||||||
disks: CloudapiDisksAPI
|
disks: CloudapiDisksAPI
|
||||||
dpdknet: CloudapiDpdknetAPI
|
|
||||||
extnet: CloudapiExtnetAPI
|
extnet: CloudapiExtnetAPI
|
||||||
flipgroup: CloudapiFlipgroupAPI
|
flipgroup: CloudapiFlipgroupAPI
|
||||||
image: CloudapiImageAPI
|
image: CloudapiImageAPI
|
||||||
k8ci: CloudapiK8ciAPI
|
k8ci: CloudapiK8ciAPI
|
||||||
k8s: CloudapiK8sAPI
|
|
||||||
kvmx86: CloudapiKvmx86API
|
kvmx86: CloudapiKvmx86API
|
||||||
lb: CloudapiLbAPI
|
lb: CloudapiLbAPI
|
||||||
locations: CloudapiLocationsAPI
|
locations: CloudapiLocationsAPI
|
||||||
pcidevice: CloudapiPcideviceAPI
|
|
||||||
rg: CloudapiRgAPI
|
rg: CloudapiRgAPI
|
||||||
security_group: CloudapiSecurityGroupAPI
|
|
||||||
sep: CloudapiSepAPI
|
|
||||||
stack: CloudapiStackAPI
|
stack: CloudapiStackAPI
|
||||||
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,
|
||||||
|
|||||||
@@ -12,6 +12,6 @@ class CloudapiAccountAddUserProtocol(_base.BasePostAPIFunctionProtocol):
|
|||||||
*,
|
*,
|
||||||
account_id: int,
|
account_id: int,
|
||||||
access_type: _nested.AccessTypeForSet,
|
access_type: _nested.AccessTypeForSet,
|
||||||
user_name: str,
|
user_id: str,
|
||||||
) -> CloudapiAccountAddUserResultBool:
|
) -> CloudapiAccountAddUserResultBool:
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import dynamix_sdk.base as _base
|
import dynamix_sdk.base as _base
|
||||||
|
|
||||||
|
|
||||||
class CloudapiAccountDeleteResultStr(_base.BaseAPIResultStr):
|
class CloudapiAccountDeleteResultBool(_base.BaseAPIResultBool):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@@ -11,5 +11,5 @@ class CloudapiAccountDeleteProtocol(_base.BasePostAPIFunctionProtocol):
|
|||||||
*,
|
*,
|
||||||
account_id: int,
|
account_id: int,
|
||||||
permanently: bool = False,
|
permanently: bool = False,
|
||||||
) -> CloudapiAccountDeleteResultStr:
|
) -> CloudapiAccountDeleteResultBool:
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -10,6 +10,6 @@ class CloudapiAccountDeleteUserProtocol(_base.BasePostAPIFunctionProtocol):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
account_id: int,
|
account_id: int,
|
||||||
user_name: str,
|
user_id: str,
|
||||||
) -> CloudapiAccountDeleteUserResultBool:
|
) -> CloudapiAccountDeleteUserResultBool:
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -10,5 +10,6 @@ class CloudapiAccountDisableProtocol(_base.BasePostAPIFunctionProtocol):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
account_id: int,
|
account_id: int,
|
||||||
|
reason: str | None = None,
|
||||||
) -> CloudapiAccountDisableResultBool:
|
) -> CloudapiAccountDisableResultBool:
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -2,54 +2,33 @@ import dynamix_sdk.base as _base
|
|||||||
import dynamix_sdk.api._nested as _nested
|
import dynamix_sdk.api._nested as _nested
|
||||||
|
|
||||||
|
|
||||||
class CloudapiAccountGetResultModel(_base.BaseAPIResultModel):
|
class CloudapiAccountGetResultModel(
|
||||||
acc_lvl_vins_ids: list[int]
|
_base.BaseAPIResultModel,
|
||||||
acl: list[_nested.AccessAPIResultNM]
|
_nested.AccountAPIResultNM,
|
||||||
company_url: str
|
):
|
||||||
company: str
|
company: str
|
||||||
|
company_url: str
|
||||||
cpu_allocation_parameter: str
|
cpu_allocation_parameter: str
|
||||||
cpu_allocation_ratio: int
|
cpu_allocation_ratio: int
|
||||||
created_by: str
|
created_by: str
|
||||||
created_timestamp: int
|
|
||||||
dc_location: str
|
dc_location: str
|
||||||
deactivation_timestamp: int
|
deactivation_timestamp: int
|
||||||
default_zone_id: int
|
|
||||||
deleted_by: str
|
deleted_by: str
|
||||||
deleted_timestamp: int
|
|
||||||
description: str
|
|
||||||
display_name: str
|
display_name: str
|
||||||
guid: int
|
guid: int
|
||||||
id: int
|
|
||||||
name: str
|
|
||||||
quotas: _nested.TenantQuotasAPIResultNM
|
quotas: _nested.TenantQuotasAPIResultNM
|
||||||
resource_types: list[_nested.AccountResourceType]
|
resource_types: list[_nested.AccountResourceType]
|
||||||
send_access_emails: bool
|
send_access_emails: bool
|
||||||
status: _nested.AccountStatus
|
|
||||||
storage_policy_ids: list[int]
|
|
||||||
uniq_pools: list[str]
|
uniq_pools: list[str]
|
||||||
updated_timestamp: int
|
|
||||||
version: int
|
version: int
|
||||||
vins_count: int
|
vins_count: int
|
||||||
|
acc_lvl_vins_ids: list[int]
|
||||||
vm_counts: _nested.VMCountsAPIResultNM
|
vm_counts: _nested.VMCountsAPIResultNM
|
||||||
vm_features: list[_nested.VMFeature]
|
|
||||||
zones: list[_nested.ZoneAPIResultNM]
|
|
||||||
|
|
||||||
@property
|
|
||||||
def created_datetime(self):
|
|
||||||
return self._get_datetime_from_timestamp(self.created_timestamp)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def deactivation_datetime(self):
|
def deactivation_datetime(self):
|
||||||
return self._get_datetime_from_timestamp(self.deactivation_timestamp)
|
return self._get_datetime_from_timestamp(self.deactivation_timestamp)
|
||||||
|
|
||||||
@property
|
|
||||||
def deleted_datetime(self):
|
|
||||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def updated_datetime(self):
|
|
||||||
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiAccountGetProtocol(_base.BasePostAPIFunctionProtocol):
|
class CloudapiAccountGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||||
def get(
|
def get(
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import dynamix_sdk.base as _base
|
import dynamix_sdk.base as _base
|
||||||
|
|
||||||
|
|
||||||
class CloudapiAccountRestoreResultStr(_base.BaseAPIResultStr):
|
class CloudapiAccountRestoreResultBool(_base.BaseAPIResultBool):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@@ -10,5 +10,5 @@ class CloudapiAccountRestoreProtocol(_base.BasePostAPIFunctionProtocol):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
account_id: int,
|
account_id: int,
|
||||||
) -> CloudapiAccountRestoreResultStr:
|
) -> CloudapiAccountRestoreResultBool:
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -14,12 +14,11 @@ class CloudapiAccountUpdateProtocol(_base.BasePostAPIFunctionProtocol):
|
|||||||
ext_traffic_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 = False,
|
send_access_emails: None | bool = None,
|
||||||
storage_size_quota_gb: None | int = None,
|
storage_size_quota_gb: None | int = None,
|
||||||
uniq_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,
|
|
||||||
) -> CloudapiAccountUpdateResultBool:
|
) -> CloudapiAccountUpdateResultBool:
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -12,6 +12,6 @@ class CloudapiAccountUpdateUserProtocol(_base.BasePostAPIFunctionProtocol):
|
|||||||
*,
|
*,
|
||||||
account_id: int,
|
account_id: int,
|
||||||
access_type: _nested.AccessTypeForSet,
|
access_type: _nested.AccessTypeForSet,
|
||||||
user_name: str,
|
user_id: str,
|
||||||
) -> CloudapiAccountUpdateUserResultBool:
|
) -> CloudapiAccountUpdateUserResultBool:
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -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,7 @@ 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,
|
|
||||||
) -> CloudapiBserviceCreateResultInt:
|
) -> CloudapiBserviceCreateResultInt:
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -2,49 +2,18 @@ import dynamix_sdk.base as _base
|
|||||||
import dynamix_sdk.api._nested as _nested
|
import dynamix_sdk.api._nested as _nested
|
||||||
|
|
||||||
|
|
||||||
class CloudapiBserviceGetResultModel(_base.BaseAPIResultModel):
|
class CloudapiBserviceGetResultModel(
|
||||||
account_id: int
|
_base.BaseAPIResultModel,
|
||||||
account_name: str
|
_nested.BaseBServiceAPIResultNM,
|
||||||
base_domain: str
|
):
|
||||||
cpu_count_total: int
|
cpu_count_total: int
|
||||||
created_by: str
|
|
||||||
created_timestamp: int
|
|
||||||
deleted_by: str
|
|
||||||
deleted_timestamp: int
|
|
||||||
disk_size_total_gb: int
|
disk_size_total_gb: int
|
||||||
grid_id: int
|
|
||||||
groups: list[_nested.BServiceGroupAPIResultNM]
|
groups: list[_nested.BServiceGroupAPIResultNM]
|
||||||
guid: int
|
|
||||||
id: int
|
|
||||||
milestones: int
|
milestones: int
|
||||||
name: str
|
|
||||||
parent_service_id: int
|
|
||||||
parent_service_type: str
|
|
||||||
ram_size_total_mb: int
|
ram_size_total_mb: int
|
||||||
rg_id: int
|
|
||||||
rg_name: str
|
|
||||||
snapshots: list[_nested.BServiceSnapshotAPIResultNM]
|
snapshots: list[_nested.BServiceSnapshotAPIResultNM]
|
||||||
ssh_public_key: str
|
ssh_key: str
|
||||||
ssh_user_name: str
|
|
||||||
status: _nested.BServiceStatus
|
|
||||||
tech_status: _nested.BServiceTechStatus
|
|
||||||
updated_by: str
|
|
||||||
updated_timestamp: int
|
|
||||||
user_managed: bool
|
|
||||||
vms: list[_nested.BServiceVMAPIResultNM]
|
vms: list[_nested.BServiceVMAPIResultNM]
|
||||||
zone_id: int
|
|
||||||
|
|
||||||
@property
|
|
||||||
def created_datetime(self):
|
|
||||||
return self._get_datetime_from_timestamp(self.created_timestamp)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def deleted_datetime(self):
|
|
||||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def updated_datetime(self):
|
|
||||||
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiBserviceGetProtocol(_base.BasePostAPIFunctionProtocol):
|
class CloudapiBserviceGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||||
|
|||||||
@@ -14,11 +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,
|
||||||
image_id: int,
|
|
||||||
driver: _nested.Driver,
|
driver: _nested.Driver,
|
||||||
|
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,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import dynamix_sdk.api._nested as _nested
|
|||||||
|
|
||||||
|
|
||||||
class CloudapiBserviceListResultModel(_base.BaseAPIResultModel):
|
class CloudapiBserviceListResultModel(_base.BaseAPIResultModel):
|
||||||
data: list[_nested.BServiceAPIResultNM]
|
data: list[_nested.BServiceForListAPIResultNM]
|
||||||
entry_count: int
|
entry_count: int
|
||||||
|
|
||||||
|
|
||||||
@@ -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,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import dynamix_sdk.api._nested as _nested
|
|||||||
|
|
||||||
|
|
||||||
class CloudapiBserviceListDeletedResultModel(_base.BaseAPIResultModel):
|
class CloudapiBserviceListDeletedResultModel(_base.BaseAPIResultModel):
|
||||||
data: list[_nested.BServiceAPIResultNM]
|
data: list[_nested.BServiceForListAPIResultNM]
|
||||||
entry_count: int
|
entry_count: int
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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,41 +8,19 @@ 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 *
|
||||||
@@ -51,12 +28,9 @@ from .pfw_add import *
|
|||||||
from .pfw_del import *
|
from .pfw_del import *
|
||||||
from .pfw_list import *
|
from .pfw_list import *
|
||||||
from .pin_to_stack 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 *
|
||||||
@@ -76,7 +50,6 @@ from .user_update import *
|
|||||||
|
|
||||||
class CloudapiComputeAPI(
|
class CloudapiComputeAPI(
|
||||||
_base.BaseAPI,
|
_base.BaseAPI,
|
||||||
CloudapiComputeAbortSharedSnapshotMergeProtocol,
|
|
||||||
CloudapiComputeAffinityLabelRemoveProtocol,
|
CloudapiComputeAffinityLabelRemoveProtocol,
|
||||||
CloudapiComputeAffinityLabelSetProtocol,
|
CloudapiComputeAffinityLabelSetProtocol,
|
||||||
CloudapiComputeAffinityRelationsProtocol,
|
CloudapiComputeAffinityRelationsProtocol,
|
||||||
@@ -86,41 +59,19 @@ 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,
|
||||||
@@ -128,12 +79,9 @@ class CloudapiComputeAPI(
|
|||||||
CloudapiComputePfwDelProtocol,
|
CloudapiComputePfwDelProtocol,
|
||||||
CloudapiComputePfwListProtocol,
|
CloudapiComputePfwListProtocol,
|
||||||
CloudapiComputePinToStackProtocol,
|
CloudapiComputePinToStackProtocol,
|
||||||
CloudapiComputePowerCycleProtocol,
|
|
||||||
CloudapiComputeRebootProtocol,
|
CloudapiComputeRebootProtocol,
|
||||||
CloudapiComputeRedeployProtocol,
|
CloudapiComputeRedeployProtocol,
|
||||||
CloudapiComputeResetProtocol,
|
|
||||||
CloudapiComputeResizeProtocol,
|
CloudapiComputeResizeProtocol,
|
||||||
CloudapiComputeRestoreProtocol,
|
|
||||||
CloudapiComputeResumeProtocol,
|
CloudapiComputeResumeProtocol,
|
||||||
CloudapiComputeSetCustomFieldsProtocol,
|
CloudapiComputeSetCustomFieldsProtocol,
|
||||||
CloudapiComputeSnapshotCreateProtocol,
|
CloudapiComputeSnapshotCreateProtocol,
|
||||||
|
|||||||
@@ -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.D,
|
||||||
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:
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -13,7 +13,5 @@ class CloudapiComputeDiskAttachProtocol(_base.BasePostAPIFunctionProtocol):
|
|||||||
vm_id: int,
|
vm_id: int,
|
||||||
disk_id: int,
|
disk_id: int,
|
||||||
disk_type: _nested.DiskType = _nested.DiskType.D,
|
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:
|
|
||||||
...
|
|
||||||
@@ -2,81 +2,18 @@ import dynamix_sdk.base as _base
|
|||||||
import dynamix_sdk.api._nested as _nested
|
import dynamix_sdk.api._nested as _nested
|
||||||
|
|
||||||
|
|
||||||
class CloudapiComputeGetResultModel(_base.BaseAPIResultModel):
|
class CloudapiComputeGetResultModel(
|
||||||
account_id: int
|
_base.BaseAPIResultModel,
|
||||||
account_name: str
|
_nested.BaseVMAPIResultNM,
|
||||||
acl: _nested.VMACLAPIResultNM
|
):
|
||||||
affinity_label: str
|
acl: _nested.VMACLForComputeGetAPIResultNM
|
||||||
affinity_rules: list[_nested.AffinityRuleAPIResultNM]
|
|
||||||
affinity_weight: int
|
|
||||||
anti_affinity_rules: list[_nested.AffinityRuleAPIResultNM]
|
|
||||||
arch: str
|
|
||||||
auto_start: bool
|
|
||||||
boot_disk_size_gb: int
|
|
||||||
boot_image_id: int
|
|
||||||
boot_loader_metaiso: _nested.BootLoaderMetaisoAPIResultNM | None
|
|
||||||
boot_loader_type: _nested.BootLoaderType
|
|
||||||
boot_mode: _nested.BootMode
|
|
||||||
boot_order: list[_nested.BootDevice]
|
|
||||||
cdrom_image_id: int
|
|
||||||
chipset: _nested.Chipset
|
|
||||||
ci_user_data: dict
|
ci_user_data: dict
|
||||||
clone_ids: list[int]
|
|
||||||
clone_reference: int
|
|
||||||
cpu_count: int
|
|
||||||
cpu_pin: bool
|
|
||||||
created_by: str
|
|
||||||
created_timestamp: int
|
|
||||||
custom_fields: dict
|
|
||||||
deleted_by: str
|
|
||||||
deleted_timestamp: int
|
|
||||||
description: str
|
|
||||||
devices: dict
|
|
||||||
disks: list[_nested.DiskForCAComputeGetAPIResultNM]
|
disks: list[_nested.DiskForCAComputeGetAPIResultNM]
|
||||||
driver: _nested.Driver
|
|
||||||
grid_id: int
|
|
||||||
guid: int
|
|
||||||
hot_resize: bool
|
|
||||||
hp_backed: bool
|
|
||||||
id: int
|
|
||||||
image_id: None | int
|
|
||||||
image_name: None | str
|
image_name: None | str
|
||||||
interfaces: list[_nested.InterfaceForComputeGetAPIResultNM]
|
interfaces: list[_nested.InterfaceForComputeGetAPIResultNM]
|
||||||
live_migration_job_id: int
|
|
||||||
lock_status: _nested.LockStatus
|
|
||||||
manager_id: int
|
|
||||||
manager_type: str
|
|
||||||
migration_job_id: int
|
|
||||||
milestones: int
|
|
||||||
name: str
|
|
||||||
need_reboot: bool
|
|
||||||
network_interface_naming: _nested.NetIfaceNamingTemplate
|
|
||||||
numa_affinity: _nested.NumaAffinity
|
|
||||||
numa_node_id: int
|
|
||||||
os_users: list[_nested.OSUserAPIResultNM]
|
os_users: list[_nested.OSUserAPIResultNM]
|
||||||
os_version: str
|
virtual_image_name: None | str
|
||||||
pinned_to_stack: bool
|
|
||||||
preferred_cpu_cores: list[int]
|
|
||||||
ram_size_mb: int
|
|
||||||
reference_id: str
|
|
||||||
res_name: str
|
|
||||||
reserved_cpu_cores: list[int]
|
|
||||||
rg_id: int
|
|
||||||
rg_name: str
|
|
||||||
snapshot_sets: list[_nested.SnapshotSetAPIResultNM]
|
|
||||||
stateless_sep_id: int | None = None
|
|
||||||
stateless_sep_type: str | None = None
|
|
||||||
status: _nested.VMStatus
|
|
||||||
tags: dict
|
|
||||||
tech_status: _nested.VMTechStatus
|
|
||||||
updated_by: str
|
|
||||||
updated_timestamp: int
|
|
||||||
user_managed: bool
|
|
||||||
vgpus: list[_nested.VGPUAPIResultNM]
|
|
||||||
vm_ci_id: int
|
|
||||||
vnc_password: str
|
vnc_password: str
|
||||||
guest_agent: _nested.GuestAgentAPIResultNM
|
|
||||||
zone_id: int
|
|
||||||
|
|
||||||
natable_vins_id: int = 0
|
natable_vins_id: int = 0
|
||||||
natable_vins_ip: str = ''
|
natable_vins_ip: str = ''
|
||||||
@@ -84,18 +21,6 @@ class CloudapiComputeGetResultModel(_base.BaseAPIResultModel):
|
|||||||
natable_vins_network: str = ''
|
natable_vins_network: str = ''
|
||||||
natable_vins_network_name: str = ''
|
natable_vins_network_name: str = ''
|
||||||
|
|
||||||
@property
|
|
||||||
def created_datetime(self):
|
|
||||||
return self._get_datetime_from_timestamp(self.created_timestamp)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def deleted_datetime(self):
|
|
||||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def updated_datetime(self):
|
|
||||||
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiComputeGetProtocol(_base.BasePostAPIFunctionProtocol):
|
class CloudapiComputeGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||||
def get(
|
def get(
|
||||||
|
|||||||
@@ -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,12 +16,8 @@ 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,
|
|
||||||
) -> CloudapiComputeNetAttachResultModel:
|
) -> CloudapiComputeNetAttachResultModel:
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -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,
|
|
||||||
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:
|
|
||||||
...
|
|
||||||
@@ -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:
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import dynamix_sdk.api._nested as _nested
|
|||||||
|
|
||||||
|
|
||||||
class CloudapiComputeUserListResultModel(_base.BaseAPIResultModel):
|
class CloudapiComputeUserListResultModel(_base.BaseAPIResultModel):
|
||||||
data: _nested.VMACLAPIResultNM
|
data: _nested.VMACLForComputeUserListAPIResultNM
|
||||||
entry_count: int
|
entry_count: int
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -2,70 +2,17 @@ import dynamix_sdk.base as _base
|
|||||||
import dynamix_sdk.api._nested as _nested
|
import dynamix_sdk.api._nested as _nested
|
||||||
|
|
||||||
|
|
||||||
class CloudapiDisksGetResultModel(_base.BaseAPIResultModel):
|
class CloudapiDisksGetResultModel(
|
||||||
account_id: int
|
_base.BaseAPIResultModel,
|
||||||
account_name: str
|
_nested.BaseDiskAPIResultNM,
|
||||||
acl: dict
|
_nested.BaseDiskForCADisksAPIResultNM,
|
||||||
created_by: str
|
):
|
||||||
created_timestamp: int
|
|
||||||
deleted_by: str
|
|
||||||
deleted_timestamp: int
|
|
||||||
description: str
|
|
||||||
destruction_timestamp: int
|
|
||||||
device_name: str | None = None
|
|
||||||
grid_id: int
|
|
||||||
id: int
|
|
||||||
image_id: int
|
|
||||||
image_ids: list[int]
|
|
||||||
io_tune: _nested.IOTuneAPIResultNM
|
|
||||||
milestones: int
|
milestones: int
|
||||||
name: str
|
|
||||||
params: str
|
|
||||||
parent_id: int
|
|
||||||
present_to: dict[str, int]
|
|
||||||
purge_timestamp: int
|
|
||||||
replication: _nested.ReplicationAPIResultNM | dict
|
|
||||||
res_id: str
|
|
||||||
res_name: str
|
|
||||||
role: str
|
|
||||||
sep_id: int
|
|
||||||
sep_pool_name: str
|
|
||||||
sep_type: _nested.SEPType
|
|
||||||
shared: bool
|
|
||||||
size_available: float
|
|
||||||
size_max_gb: int
|
|
||||||
size_used: float
|
|
||||||
snapshots: list[_nested.SnapshotAPIResultNM]
|
|
||||||
status: _nested.DiskStatus
|
|
||||||
storage_policy_id: int
|
|
||||||
tech_status: _nested.DiskTechStatus
|
|
||||||
to_clean: bool
|
|
||||||
type: _nested.DiskType
|
|
||||||
updated_by: str
|
|
||||||
vm_id: int | None
|
vm_id: int | None
|
||||||
vm_name: str | None
|
vm_name: str | None
|
||||||
vms: dict[str, str]
|
vms: dict[str, str]
|
||||||
updated_timestamp: int = 0
|
device_name: str | None = None
|
||||||
|
sep_type: _nested.SEPType
|
||||||
@property
|
|
||||||
def created_datetime(self):
|
|
||||||
return self._get_datetime_from_timestamp(self.created_timestamp)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def deleted_datetime(self):
|
|
||||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def destruction_datetime(self):
|
|
||||||
return self._get_datetime_from_timestamp(self.destruction_timestamp)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def purge_datetime(self):
|
|
||||||
return self._get_datetime_from_timestamp(self.purge_timestamp)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def updated_datetime(self):
|
|
||||||
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiDisksGetProtocol(_base.BasePostAPIFunctionProtocol):
|
class CloudapiDisksGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
from ._api import *
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
import dynamix_sdk.base as _base
|
|
||||||
from .get import *
|
|
||||||
from .list import *
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiDpdknetAPI(
|
|
||||||
_base.BaseAPI,
|
|
||||||
CloudapiDpdknetGetProtocol,
|
|
||||||
CloudapiDpdknetListProtocol,
|
|
||||||
):
|
|
||||||
pass
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
import dynamix_sdk.base as _base
|
|
||||||
import dynamix_sdk.api._nested as _nested
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiDpdknetGetResultModel(
|
|
||||||
_base.BaseAPIResultModel,
|
|
||||||
_nested.DPDKNetAPIResultNM,
|
|
||||||
):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiDpdknetGetProtocol(_base.BasePostAPIFunctionProtocol):
|
|
||||||
def get(
|
|
||||||
self,
|
|
||||||
*,
|
|
||||||
dpdk_net_id: int,
|
|
||||||
) -> CloudapiDpdknetGetResultModel:
|
|
||||||
...
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
import dynamix_sdk.base as _base
|
|
||||||
import dynamix_sdk.api._nested as _nested
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiDpdknetListResultModel(_base.BaseAPIResultModel):
|
|
||||||
data: list[_nested.DPDKNetAPIResultNM]
|
|
||||||
entry_count: int
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiDpdknetListProtocol(_base.BasePostAPIFunctionProtocol):
|
|
||||||
def list(
|
|
||||||
self,
|
|
||||||
*,
|
|
||||||
description: str | None = None,
|
|
||||||
grid_id: int | None = None,
|
|
||||||
id: int | None = None,
|
|
||||||
name: str | None = None,
|
|
||||||
page_number: int | None = None,
|
|
||||||
page_size: int | None = None,
|
|
||||||
sort_by: str | None = None,
|
|
||||||
status: _nested.DPDKNetStatus | None = None,
|
|
||||||
vm_ids: list[int] | None = None,
|
|
||||||
) -> CloudapiDpdknetListResultModel:
|
|
||||||
...
|
|
||||||
@@ -2,39 +2,32 @@ import dynamix_sdk.base as _base
|
|||||||
import dynamix_sdk.api._nested as _nested
|
import dynamix_sdk.api._nested as _nested
|
||||||
|
|
||||||
|
|
||||||
class CloudapiExtnetGetResultModel(_base.BaseAPIResultModel):
|
class CloudapiExtnetGetResultModel(
|
||||||
|
_base.BaseAPIResultModel,
|
||||||
|
_nested.ExtNetForListAPIResultNM,
|
||||||
|
):
|
||||||
check_ips: list[str]
|
check_ips: list[str]
|
||||||
default_qos: _nested.QOSAPIResultNM
|
default_qos: _nested.QOSAPIResultNM
|
||||||
default: bool
|
default: bool
|
||||||
description: str
|
description: str
|
||||||
dhcp_excluded_reservations: list[_nested.DHCPReservationAPIResultNM]
|
|
||||||
dhcp_reservations: list[_nested.DHCPReservationAPIResultNM]
|
|
||||||
dns_servers: list[str]
|
dns_servers: list[str]
|
||||||
|
dhcp_excluded_reservations: list[_nested.DHCPReservationAPIResultNM]
|
||||||
free_ip_count: int
|
free_ip_count: int
|
||||||
gateway: str
|
gateway: str
|
||||||
grid_id: int
|
grid_id: int
|
||||||
guid: int
|
guid: int
|
||||||
id: int
|
|
||||||
ip_cidr: str
|
|
||||||
milestones: int
|
milestones: int
|
||||||
mtu: int
|
|
||||||
name: str
|
|
||||||
net_ip: str
|
net_ip: str
|
||||||
net_prefix: int
|
network_id: int
|
||||||
network_ids: _nested.NetworkIDsAPIResultNM
|
|
||||||
ntp_servers: list[str]
|
|
||||||
ovs_bridge: str
|
ovs_bridge: str
|
||||||
pre_reservation_count: int
|
pre_reservation_count: int
|
||||||
pre_reservations: list[_nested.DHCPReservationAPIResultNM]
|
net_mask: int
|
||||||
primary_vnfdev_id: int
|
primary_vnfdev_id: int
|
||||||
redundant: bool
|
dhcp_reservations: list[_nested.DHCPReservationAPIResultNM]
|
||||||
secondary_vnfdev_id: int
|
|
||||||
security_group_mode: bool
|
|
||||||
shared_with: list[int]
|
shared_with: list[int]
|
||||||
status: _nested.ExtNetStatus
|
|
||||||
vlan_id: int
|
vlan_id: int
|
||||||
vnf_ids_by_type: dict[str, int]
|
vnf_ids_by_type: dict[str, int]
|
||||||
zone_id: int
|
ntp_servers: list[str]
|
||||||
|
|
||||||
|
|
||||||
class CloudapiExtnetGetProtocol(_base.BasePostAPIFunctionProtocol):
|
class CloudapiExtnetGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||||
|
|||||||
@@ -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):
|
||||||
@@ -18,6 +18,9 @@ class CloudapiFlipgroupCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
|||||||
name: str,
|
name: str,
|
||||||
net_id: int,
|
net_id: int,
|
||||||
net_type: _nested.FlipGroupNetType,
|
net_type: _nested.FlipGroupNetType,
|
||||||
|
client_type: _nested.FlipGroupClientType = (
|
||||||
|
_nested.FlipGroupClientType.VM
|
||||||
|
),
|
||||||
description: str | None = None,
|
description: str | None = None,
|
||||||
ip_addr: str | None = None,
|
ip_addr: str | None = None,
|
||||||
) -> CloudapiFlipgroupCreateResultModel:
|
) -> CloudapiFlipgroupCreateResultModel:
|
||||||
|
|||||||
@@ -2,32 +2,19 @@ import dynamix_sdk.base as _base
|
|||||||
import dynamix_sdk.api._nested as _nested
|
import dynamix_sdk.api._nested as _nested
|
||||||
|
|
||||||
|
|
||||||
class CloudapiFlipgroupGetResultModel(_base.BaseAPIResultModel):
|
class CloudapiFlipgroupGetResultModel(
|
||||||
account_id: int
|
_base.BaseAPIResultModel,
|
||||||
|
_nested.BaseFlipGroupAPIResultNM,
|
||||||
|
):
|
||||||
account_name: str
|
account_name: str
|
||||||
client_ids: list[int]
|
|
||||||
client_names: list[str]
|
client_names: list[str]
|
||||||
client_type: _nested.FlipGroupClientType
|
|
||||||
conn_id: int
|
|
||||||
conn_type: str
|
|
||||||
created_by: str
|
created_by: str
|
||||||
created_timestamp: int
|
created_timestamp: int
|
||||||
default_gw: str
|
|
||||||
deleted_by: str
|
deleted_by: str
|
||||||
deleted_timestamp: int
|
deleted_timestamp: int
|
||||||
description: str
|
|
||||||
grid_id: int
|
|
||||||
guid: int
|
|
||||||
id: int
|
|
||||||
ip_addr: str
|
|
||||||
milestones: int
|
|
||||||
name: str
|
|
||||||
net_cidr: str
|
net_cidr: str
|
||||||
net_id: int
|
|
||||||
net_type: _nested.FlipGroupNetType
|
|
||||||
rg_id: int
|
rg_id: int
|
||||||
rg_name: str
|
rg_name: str
|
||||||
status: _nested.FlipGroupStatus
|
|
||||||
updated_by: str
|
updated_by: str
|
||||||
updated_timestamp: int
|
updated_timestamp: int
|
||||||
|
|
||||||
|
|||||||
@@ -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,10 +12,10 @@ 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
|
||||||
|
|||||||
@@ -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:
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -2,57 +2,35 @@ 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
|
||||||
from dynamix_sdk.utils import EmptyStr as _EmptyStr
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiImageGetResultModel(_base.BaseAPIResultModel):
|
class CloudapiImageGetResultModel(
|
||||||
account_id: int
|
_base.BaseAPIResultModel,
|
||||||
|
_nested.BaseImageAPIResultNM,
|
||||||
|
):
|
||||||
acl: list[_typing.Any]
|
acl: list[_typing.Any]
|
||||||
arch: str
|
|
||||||
boot_mode: _nested.BootMode | _EmptyStr | None
|
|
||||||
bootable: bool
|
|
||||||
cd_presented_to: dict[str, list[int]]
|
cd_presented_to: dict[str, list[int]]
|
||||||
ckey: str
|
ckey: str
|
||||||
deleted_timestamp: int
|
deleted_timestamp: int
|
||||||
description: str
|
|
||||||
drivers: list[_nested.Driver]
|
|
||||||
enabled: bool
|
enabled: bool
|
||||||
grid_id: int
|
grid_id: int
|
||||||
guid: int
|
guid: int
|
||||||
history: list[_nested.ImageHistoryRecordAPIResultNM]
|
history: list[_nested.ImageHistoryRecordAPIResultNM]
|
||||||
hot_resize: bool
|
|
||||||
id: int
|
|
||||||
last_modified: int
|
last_modified: int
|
||||||
link_to: int
|
|
||||||
milestones: int
|
milestones: int
|
||||||
name: str
|
|
||||||
network_interface_naming: _nested.NetIfaceNamingTemplate
|
|
||||||
os_password: str | None
|
os_password: str | None
|
||||||
os_user_name: str | None
|
|
||||||
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
|
res_id: str
|
||||||
rescue_cd: bool
|
rescue_cd: bool
|
||||||
sep_id: int
|
|
||||||
sep_pool_name: str
|
|
||||||
storage_policy_id: int
|
|
||||||
shared_with: list[int]
|
shared_with: list[int]
|
||||||
size_gb: int
|
|
||||||
snapshot_id: str = ''
|
snapshot_id: str = ''
|
||||||
status: _nested.ImageStatus
|
|
||||||
tech_status: _nested.ImageTechStatus
|
tech_status: _nested.ImageTechStatus
|
||||||
to_clean: bool
|
|
||||||
type: _nested.ImageType
|
|
||||||
unc_path: str
|
unc_path: str
|
||||||
version: str
|
version: str
|
||||||
vm_ci_id: int
|
vm_ci_id: int
|
||||||
|
|
||||||
@property
|
|
||||||
def boot_loader_type(self):
|
|
||||||
if self.type in _nested.BootLoaderType._member_names_:
|
|
||||||
return _nested.BootLoaderType[self.type]
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def deleted_datetime(self):
|
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:
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -2,12 +2,11 @@ import dynamix_sdk.base as _base
|
|||||||
import dynamix_sdk.api._nested as _nested
|
import dynamix_sdk.api._nested as _nested
|
||||||
|
|
||||||
|
|
||||||
class CloudapiK8ciGetResultModel(_base.BaseAPIResultModel):
|
class CloudapiK8ciGetResultModel(
|
||||||
id: int
|
_base.BaseAPIResultModel,
|
||||||
name: str
|
_nested.BaseK8CIAPIResultNM,
|
||||||
version: str
|
):
|
||||||
description: str
|
pass
|
||||||
network_plugins: list[_nested.K8sNetworkPlugin]
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiK8ciGetProtocol(_base.BasePostAPIFunctionProtocol):
|
class CloudapiK8ciGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||||
|
|||||||
@@ -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 +0,0 @@
|
|||||||
from ._api import *
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
import dynamix_sdk.base as _base
|
|
||||||
from .create import *
|
|
||||||
from .delete import *
|
|
||||||
from .delete_master_from_group import *
|
|
||||||
from .delete_worker_from_group import *
|
|
||||||
from .disable import *
|
|
||||||
from .enable import *
|
|
||||||
from .get import *
|
|
||||||
from .get_config import *
|
|
||||||
from .get_node_annotations import *
|
|
||||||
from .get_node_labels import *
|
|
||||||
from .get_node_taints import *
|
|
||||||
from .list import *
|
|
||||||
from .list_deleted import *
|
|
||||||
from .migrate_to_zone import *
|
|
||||||
from .restore import *
|
|
||||||
from .start import *
|
|
||||||
from .stop import *
|
|
||||||
from .update import *
|
|
||||||
from .update_worker_nodes_meta_data import *
|
|
||||||
from .worker_add import *
|
|
||||||
from .worker_reset import *
|
|
||||||
from .worker_restart import *
|
|
||||||
from .workers_group_add import *
|
|
||||||
from .workers_group_delete import *
|
|
||||||
from .workers_group_get_by_name import *
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiK8sAPI(
|
|
||||||
_base.BaseAPI,
|
|
||||||
CloudapiK8sCreateProtocol,
|
|
||||||
CloudapiK8sDeleteMasterFromGroupProtocol,
|
|
||||||
CloudapiK8sDeleteProtocol,
|
|
||||||
CloudapiK8sDeleteWorkerFromGroupProtocol,
|
|
||||||
CloudapiK8sDisableProtocol,
|
|
||||||
CloudapiK8sEnableProtocol,
|
|
||||||
CloudapiK8sGetConfigProtocol,
|
|
||||||
CloudapiK8sGetNodeAnnotationsProtocol,
|
|
||||||
CloudapiK8sGetNodeLabelsProtocol,
|
|
||||||
CloudapiK8sGetNodeTaintsProtocol,
|
|
||||||
CloudapiK8sGetProtocol,
|
|
||||||
CloudapiK8sListDeletedProtocol,
|
|
||||||
CloudapiK8sListProtocol,
|
|
||||||
CloudapiK8sMigrateToZoneProtocol,
|
|
||||||
CloudapiK8sRestoreProtocol,
|
|
||||||
CloudapiK8sStartProtocol,
|
|
||||||
CloudapiK8sStopProtocol,
|
|
||||||
CloudapiK8sUpdateProtocol,
|
|
||||||
CloudapiK8sUpdateWorkerNodesMetaDataProtocol,
|
|
||||||
CloudapiK8sWorkerAddProtocol,
|
|
||||||
CloudapiK8sWorkerResetProtocol,
|
|
||||||
CloudapiK8sWorkerRestartProtocol,
|
|
||||||
CloudapiK8sWorkersGroupAddProtocol,
|
|
||||||
CloudapiK8sWorkersGroupDeleteProtocol,
|
|
||||||
CloudapiK8sWorkersGroupGetByNameProtocol,
|
|
||||||
):
|
|
||||||
pass
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
import dynamix_sdk.base as _base
|
|
||||||
import dynamix_sdk.api._nested as _nested
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiK8sCreateResultStr(_base.BaseAPIResultStr):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiK8sCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
|
||||||
def create(
|
|
||||||
self,
|
|
||||||
*,
|
|
||||||
name: str,
|
|
||||||
rg_id: int,
|
|
||||||
k8ci_id: int,
|
|
||||||
worker_group_name: str,
|
|
||||||
network_plugin: _nested.K8sNetworkPlugin,
|
|
||||||
storage_policy_id: int,
|
|
||||||
master_node_sep_id: int | None = None,
|
|
||||||
master_node_sep_pool_name: str | None = None,
|
|
||||||
worker_node_sep_id: int | None = None,
|
|
||||||
worker_node_sep_pool_name: str | None = None,
|
|
||||||
labels: list[str] | None = None,
|
|
||||||
taints: list[str] | None = None,
|
|
||||||
annotations: list[str] | None = None,
|
|
||||||
init_config: str | None = None,
|
|
||||||
cluster_config: str | None = None,
|
|
||||||
kubelet_config: str | None = None,
|
|
||||||
kube_proxy_config: str | None = None,
|
|
||||||
join_config: str | None = None,
|
|
||||||
master_node_count: int = 1,
|
|
||||||
master_node_cpu_count: int = 2,
|
|
||||||
master_node_ram_size_mb: int = 2048,
|
|
||||||
master_node_disk_size_gb: int | None = None,
|
|
||||||
worker_node_count: int = 1,
|
|
||||||
worker_node_cpu_count: int = 1,
|
|
||||||
worker_node_ram_size_mb: int = 1024,
|
|
||||||
worker_node_disk_size_gb: int | None = None,
|
|
||||||
ext_net_id: int | None = None,
|
|
||||||
vins_id: int | None = None,
|
|
||||||
with_lb: bool = True,
|
|
||||||
lb_ha_mode: bool = False,
|
|
||||||
description: str | None = None,
|
|
||||||
extnet_only: bool = False,
|
|
||||||
ci_user_data: str | None = None,
|
|
||||||
additional_sans: list[str] | None = None,
|
|
||||||
chipset: _nested.Chipset = _nested.Chipset.i440fx,
|
|
||||||
lb_sysctl_params: list[dict[str, str]] | None = None,
|
|
||||||
zone_id: int | None = None,
|
|
||||||
) -> CloudapiK8sCreateResultStr:
|
|
||||||
...
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
import dynamix_sdk.base as _base
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiK8sDeleteResultBool(_base.BaseAPIResultBool):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class CloudapiK8sDeleteProtocol(_base.BasePostAPIFunctionProtocol):
|
|
||||||
def delete(
|
|
||||||
self,
|
|
||||||
*,
|
|
||||||
k8s_id: int,
|
|
||||||
permanently: bool = False,
|
|
||||||
) -> CloudapiK8sDeleteResultBool:
|
|
||||||
...
|
|
||||||
@@ -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:
|
|
||||||
...
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user