Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 27d7234dde | |||
| 9eac1da63f | |||
| c4d0acfba2 | |||
| a63ff017af | |||
| 9f2c3dc81e | |||
| caf367262c |
@@ -23,3 +23,10 @@ repos:
|
||||
- id: flake8
|
||||
name: flake8 (2/2)
|
||||
exclude: src/dynamix_sdk/types\.py|.*__init__\.py|.*_api\.py
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: pytest-local-tests
|
||||
name: pytest local tests
|
||||
entry: pytest tests/local
|
||||
language: system
|
||||
pass_filenames: false
|
||||
|
||||
36
CHANGELOG.md
36
CHANGELOG.md
@@ -1,28 +1,20 @@
|
||||
# Список изменений в версии 1.0.0
|
||||
# Список изменений в версии 1.2.3
|
||||
|
||||
## Добавлено
|
||||
|
||||
### Глобально
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BPYS-3 | Добавлена возможность авторизации через DECS3O. |
|
||||
| BPYS-7 | Добавлена возможность авторизации через BVS. |
|
||||
|
||||
### Функциональный интерфейс
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BPYS-5 | Добавлена функция API `/system/usermanager/whoami`. |
|
||||
| BPYS-4 | Добавлена функция API `/cloudapi/compute/get`. |
|
||||
| BPYS-6 | Добавлена функция API `/cloudapi/kvmx86/create`. |
|
||||
| BPYS-12 | Добавлена функция API `/cloudapi/compute/delete`. |
|
||||
| BPYS-21 | Добавлена функция API `/cloudapi/user/get`. |
|
||||
| BPYS-15 | Добавлена функция API `/cloudapi/compute/update`. |
|
||||
| BPYS-29 | Добавлена функция API `/cloudapi/account/updateUser`. |
|
||||
| BPYS-33 | Добавлена функция API `/cloudapi/account/enable`. |
|
||||
| BPYS-32 | Добавлена функция API `/cloudapi/account/disable`. |
|
||||
| BPYS-45 | Добавлена функция API `/cloudapi/rg/list`. |
|
||||
| BPYS-20 | Добавлена функция API `/cloudapi/account/addUser`. |
|
||||
| BPYS-30 | Добавлена функция API `/cloudapi/account/deleteUser`. |
|
||||
| BPYS-51 | Добавлена функция API `/cloudapi/rg/get`. |
|
||||
| BPYS-52 | Добавлена функция API `/cloudapi/rg/create`. |
|
||||
| BPYS-35 | Добавлена функция API `/cloudapi/compute/list`. |
|
||||
|
||||
## Удалено
|
||||
|
||||
### Функциональный интерфейс
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
|
||||
## Исправлено
|
||||
|
||||
### Функциональный интерфейс
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BPYS-990 | Функции `cloudapi.kvmx86.create`, `cloudapi.kvmx86.create_blank`: вызов функций завершался ошибкой валидации поля `sdn_logical_port_id` для модели `InterfaceAPIParamsNM` при передаче данных в параметр `interfaces`. |
|
||||
|
||||
283
README.md
283
README.md
@@ -19,6 +19,7 @@
|
||||
- [Способы авторизации](#способы-авторизации)
|
||||
- [Функции API](#функции-api)
|
||||
- [Cloudapi](#cloudapi)
|
||||
- [Cloudbroker](#cloudbroker)
|
||||
- [System](#system)
|
||||
|
||||
## Описание
|
||||
@@ -33,6 +34,8 @@
|
||||
|
||||
| Версия платформы | Версия SDK |
|
||||
| --- | --- |
|
||||
| 4.4.0 build 963 | 1.2.x |
|
||||
| 4.3.0 | 1.1.x |
|
||||
| 4.2.0 | 1.0.x |
|
||||
|
||||
### Зависимости
|
||||
@@ -203,14 +206,14 @@ from dynamix_sdk import Dynamix, types
|
||||
|
||||
dx = Dynamix(...)
|
||||
|
||||
data_disk_1 = types.DiskAPIParamsNM(name='data_disk_1', size=10)
|
||||
data_disk_1 = types.DiskAPIParamsNM(name='data_disk_1', size_gb=10)
|
||||
|
||||
# /cloudapi/kvmx86/create
|
||||
new_vm_id = dx.api.cloudapi.kvmx86.create(
|
||||
rg_id=123,
|
||||
name='new_vm',
|
||||
cpu=1,
|
||||
ram=1024,
|
||||
cpu_count=1,
|
||||
ram_size_mb=1024,
|
||||
image_id=456,
|
||||
data_disks=[data_disk_1],
|
||||
)
|
||||
@@ -230,8 +233,8 @@ dx = Dynamix(...)
|
||||
new_vm_id = dx.api.cloudapi.kvmx86.create(
|
||||
rg_id=123,
|
||||
name='new_vm',
|
||||
cpu=1,
|
||||
ram=1024,
|
||||
cpu_count=1,
|
||||
ram_size_mb=1024,
|
||||
image_id=456,
|
||||
chipset=types.Chipset.Q35, # enum
|
||||
numa_affinity=types.NumaAffinity.none, # enum
|
||||
@@ -257,7 +260,7 @@ from dynamix_sdk import Dynamix
|
||||
dx = Dynamix(...)
|
||||
|
||||
# /cloudapi/compute/get
|
||||
get_result = dx.api.cloudapi.compute.get(compute_id=1)
|
||||
get_result = dx.api.cloudapi.compute.get(vm_id=1)
|
||||
|
||||
print(type(get_result)) # <class '....CloudapiComputeGetResultModel'>
|
||||
|
||||
@@ -276,7 +279,7 @@ from dynamix_sdk import Dynamix
|
||||
dx = Dynamix(...)
|
||||
|
||||
# /cloudapi/compute/get
|
||||
vm_name = dx.api.cloudapi.compute.get(compute_id=1).name
|
||||
vm_name = dx.api.cloudapi.compute.get(vm_id=1).name
|
||||
|
||||
```
|
||||
|
||||
@@ -294,7 +297,7 @@ from dynamix_sdk import Dynamix
|
||||
dx = Dynamix(...)
|
||||
|
||||
# /cloudapi/compute/get
|
||||
vm_disk1 = dx.api.cloudapi.compute.get(compute_id=1).disks[0]
|
||||
vm_disk1 = dx.api.cloudapi.compute.get(vm_id=1).disks[0]
|
||||
|
||||
print(type(vm_disk1)) # <class '....DiskAPIResultNM'>
|
||||
|
||||
@@ -313,7 +316,7 @@ from dynamix_sdk import Dynamix
|
||||
dx = Dynamix(...)
|
||||
|
||||
# /cloudapi/compute/get
|
||||
vm_disk1_id = dx.api.cloudapi.compute.get(compute_id=1).disks[0].id
|
||||
vm_disk1_id = dx.api.cloudapi.compute.get(vm_id=1).disks[0].id
|
||||
|
||||
```
|
||||
|
||||
@@ -331,7 +334,7 @@ from dynamix_sdk import Dynamix
|
||||
dx = Dynamix(...)
|
||||
|
||||
# /cloudapi/compute/get
|
||||
get_result = dx.api.cloudapi.compute.get(compute_id=1)
|
||||
get_result = dx.api.cloudapi.compute.get(vm_id=1)
|
||||
|
||||
# Поле, возвращаемое платформой
|
||||
print(type(get_result.created_timestamp)) # <class 'int'>
|
||||
@@ -375,7 +378,7 @@ from dynamix_sdk import Dynamix
|
||||
dx = Dynamix(...)
|
||||
|
||||
# /cloudapi/compute/delete
|
||||
delete_result = dx.api.cloudapi.compute.delete(compute_id=1)
|
||||
delete_result = dx.api.cloudapi.compute.delete(vm_id=1)
|
||||
|
||||
print(type(delete_result)) # <class '....CloudapiComputeDeleteResultBool'>
|
||||
print(type(delete_result.value)) # <class 'bool'>
|
||||
@@ -391,7 +394,7 @@ from dynamix_sdk import Dynamix
|
||||
dx = Dynamix(...)
|
||||
|
||||
# /cloudapi/compute/delete
|
||||
if dx.api.cloudapi.compute.delete(compute_id=1):
|
||||
if dx.api.cloudapi.compute.delete(vm_id=1):
|
||||
print('The VM has been deleted.')
|
||||
|
||||
```
|
||||
@@ -458,7 +461,7 @@ dx = Dynamix(...)
|
||||
vm_id = 1
|
||||
|
||||
try:
|
||||
get_result = dx.api.cloudapi.compute.get(compute_id=vm_id)
|
||||
get_result = dx.api.cloudapi.compute.get(vm_id=vm_id)
|
||||
except HTTPError as e:
|
||||
resp = e.response
|
||||
if resp.status_code == 404:
|
||||
@@ -491,39 +494,293 @@ except RequestException as e:
|
||||
<details><summary>account</summary>
|
||||
|
||||
- /cloudapi/account/addUser
|
||||
- /cloudapi/account/delete
|
||||
- /cloudapi/account/deleteUser
|
||||
- /cloudapi/account/disable
|
||||
- /cloudapi/account/enable
|
||||
- /cloudapi/account/get
|
||||
- /cloudapi/account/list
|
||||
- /cloudapi/account/listDeleted
|
||||
- /cloudapi/account/restore
|
||||
- /cloudapi/account/update
|
||||
- /cloudapi/account/updateUser
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>audit</summary>
|
||||
|
||||
- /cloudapi/audit/get
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>bservice</summary>
|
||||
|
||||
- /cloudapi/bservice/create
|
||||
- /cloudapi/bservice/delete
|
||||
- /cloudapi/bservice/disable
|
||||
- /cloudapi/bservice/enable
|
||||
- /cloudapi/bservice/get
|
||||
- /cloudapi/bservice/groupAdd
|
||||
- /cloudapi/bservice/groupComputeRemove
|
||||
- /cloudapi/bservice/groupGet
|
||||
- /cloudapi/bservice/groupParentAdd
|
||||
- /cloudapi/bservice/groupParentRemove
|
||||
- /cloudapi/bservice/groupRemove
|
||||
- /cloudapi/bservice/groupResize
|
||||
- /cloudapi/bservice/groupStart
|
||||
- /cloudapi/bservice/groupStop
|
||||
- /cloudapi/bservice/groupUpdate
|
||||
- /cloudapi/bservice/groupUpdateExtnet
|
||||
- /cloudapi/bservice/groupUpdateVins
|
||||
- /cloudapi/bservice/list
|
||||
- /cloudapi/bservice/listDeleted
|
||||
- /cloudapi/bservice/restore
|
||||
- /cloudapi/bservice/start
|
||||
- /cloudapi/bservice/stop
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>compute</summary>
|
||||
|
||||
- /cloudapi/compute/affinityLabelRemove
|
||||
- /cloudapi/compute/affinityLabelSet
|
||||
- /cloudapi/compute/affinityRelations
|
||||
- /cloudapi/compute/affinityRuleAdd
|
||||
- /cloudapi/compute/affinityRuleRemove
|
||||
- /cloudapi/compute/affinityRulesClear
|
||||
- /cloudapi/compute/antiAffinityRuleAdd
|
||||
- /cloudapi/compute/antiAffinityRuleRemove
|
||||
- /cloudapi/compute/antiAffinityRulesClear
|
||||
- /cloudapi/compute/cdEject
|
||||
- /cloudapi/compute/cdInsert
|
||||
- /cloudapi/compute/changeIp
|
||||
- /cloudapi/compute/clone
|
||||
- /cloudapi/compute/delete
|
||||
- /cloudapi/compute/deleteCustomFields
|
||||
- /cloudapi/compute/diskAdd
|
||||
- /cloudapi/compute/diskAttach
|
||||
- /cloudapi/compute/diskDel
|
||||
- /cloudapi/compute/diskDetach
|
||||
- /cloudapi/compute/diskResize
|
||||
- /cloudapi/compute/get
|
||||
- /cloudapi/compute/list
|
||||
- /cloudapi/compute/netAttach
|
||||
- /cloudapi/compute/netDetach
|
||||
- /cloudapi/compute/pause
|
||||
- /cloudapi/compute/pfwAdd
|
||||
- /cloudapi/compute/pfwDel
|
||||
- /cloudapi/compute/pfwList
|
||||
- /cloudapi/compute/pinToStack
|
||||
- /cloudapi/compute/reboot
|
||||
- /cloudapi/compute/redeploy
|
||||
- /cloudapi/compute/resize
|
||||
- /cloudapi/compute/resume
|
||||
- /cloudapi/compute/setCustomFields
|
||||
- /cloudapi/compute/snapshotCreate
|
||||
- /cloudapi/compute/snapshotList
|
||||
- /cloudapi/compute/snapshotRollback
|
||||
- /cloudapi/compute/start
|
||||
- /cloudapi/compute/stop
|
||||
- /cloudapi/compute/tagAdd
|
||||
- /cloudapi/compute/tagRemove
|
||||
- /cloudapi/compute/unpinFromStack
|
||||
- /cloudapi/compute/update
|
||||
- /cloudapi/compute/userGrant
|
||||
- /cloudapi/compute/userList
|
||||
- /cloudapi/compute/userRevoke
|
||||
- /cloudapi/compute/userUpdate
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>disks</summary>
|
||||
|
||||
- /cloudapi/disks/create
|
||||
- /cloudapi/disks/delete
|
||||
- /cloudapi/disks/deleteDisks
|
||||
- /cloudapi/disks/get
|
||||
- /cloudapi/disks/limitIO
|
||||
- /cloudapi/disks/list
|
||||
- /cloudapi/disks/listDeleted
|
||||
- /cloudapi/disks/listTypes
|
||||
- /cloudapi/disks/listUnattached
|
||||
- /cloudapi/disks/rename
|
||||
- /cloudapi/disks/resize2
|
||||
- /cloudapi/disks/restore
|
||||
- /cloudapi/disks/share
|
||||
- /cloudapi/disks/snapshotDelete
|
||||
- /cloudapi/disks/snapshotRollback
|
||||
- /cloudapi/disks/unshare
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>dpdknet</summary>
|
||||
|
||||
- /cloudapi/dpdknet/get
|
||||
- /cloudapi/dpdknet/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>extnet</summary>
|
||||
|
||||
- /cloudapi/extnet/get
|
||||
- /cloudapi/extnet/getDefault
|
||||
- /cloudapi/extnet/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>flipgroup</summary>
|
||||
|
||||
- /cloudapi/flipgroup/computeAdd
|
||||
- /cloudapi/flipgroup/computeRemove
|
||||
- /cloudapi/flipgroup/create
|
||||
- /cloudapi/flipgroup/delete
|
||||
- /cloudapi/flipgroup/edit
|
||||
- /cloudapi/flipgroup/get
|
||||
- /cloudapi/flipgroup/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>image</summary>
|
||||
|
||||
- /cloudapi/image/create
|
||||
- /cloudapi/image/createVirtual
|
||||
- /cloudapi/image/delete
|
||||
- /cloudapi/image/get
|
||||
- /cloudapi/image/link
|
||||
- /cloudapi/image/list
|
||||
- /cloudapi/image/rename
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>k8ci</summary>
|
||||
|
||||
- /cloudapi/k8ci/get
|
||||
- /cloudapi/k8ci/list
|
||||
- /cloudapi/k8ci/listDeleted
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>k8s</summary>
|
||||
|
||||
- /cloudapi/k8s/create
|
||||
- /cloudapi/k8s/delete
|
||||
- /cloudapi/k8s/get
|
||||
- /cloudapi/k8s/getConfig
|
||||
- /cloudapi/k8s/list
|
||||
- /cloudapi/k8s/listDeleted
|
||||
- /cloudapi/k8s/restore
|
||||
- /cloudapi/k8s/workerReset
|
||||
- /cloudapi/k8s/workerRestart
|
||||
- /cloudapi/k8s/workersGroupAdd
|
||||
- /cloudapi/k8s/workersGroupDelete
|
||||
- /cloudapi/k8s/workersGroupGetByName
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>kvmx86</summary>
|
||||
|
||||
- /cloudapi/kvmx86/create
|
||||
- /cloudapi/kvmx86/createBlank
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>lb</summary>
|
||||
|
||||
- /cloudapi/lb/backendCreate
|
||||
- /cloudapi/lb/backendDelete
|
||||
- /cloudapi/lb/backendServerAdd
|
||||
- /cloudapi/lb/backendServerDelete
|
||||
- /cloudapi/lb/backendServerUpdate
|
||||
- /cloudapi/lb/backendUpdate
|
||||
- /cloudapi/lb/create
|
||||
- /cloudapi/lb/delete
|
||||
- /cloudapi/lb/disable
|
||||
- /cloudapi/lb/enable
|
||||
- /cloudapi/lb/frontendBind
|
||||
- /cloudapi/lb/frontendBindDelete
|
||||
- /cloudapi/lb/frontendBindingUpdate
|
||||
- /cloudapi/lb/frontendCreate
|
||||
- /cloudapi/lb/frontendDelete
|
||||
- /cloudapi/lb/get
|
||||
- /cloudapi/lb/list
|
||||
- /cloudapi/lb/listDeleted
|
||||
- /cloudapi/lb/makeHighlyAvailable
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>locations</summary>
|
||||
|
||||
- /cloudapi/locations/getUrl
|
||||
- /cloudapi/locations/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>rg</summary>
|
||||
|
||||
- /cloudapi/rg/accessGrant
|
||||
- /cloudapi/rg/accessRevoke
|
||||
- /cloudapi/rg/create
|
||||
- /cloudapi/rg/delete
|
||||
- /cloudapi/rg/disable
|
||||
- /cloudapi/rg/enable
|
||||
- /cloudapi/rg/get
|
||||
- /cloudapi/rg/list
|
||||
- /cloudapi/rg/removeDefNet
|
||||
- /cloudapi/rg/restore
|
||||
- /cloudapi/rg/setDefNet
|
||||
- /cloudapi/rg/update
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>stack</summary>
|
||||
|
||||
- /cloudapi/stack/get
|
||||
- /cloudapi/stack/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>tasks</summary>
|
||||
|
||||
- /cloudapi/tasks/get
|
||||
- /cloudapi/tasks/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>user</summary>
|
||||
|
||||
- /cloudapi/user/apiList
|
||||
- /cloudapi/user/get
|
||||
- /cloudapi/user/getAudit
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>vins</summary>
|
||||
|
||||
- /cloudapi/vins/createInAccount
|
||||
- /cloudapi/vins/createInRG
|
||||
- /cloudapi/vins/delete
|
||||
- /cloudapi/vins/disable
|
||||
- /cloudapi/vins/enable
|
||||
- /cloudapi/vins/get
|
||||
- /cloudapi/vins/ipList
|
||||
- /cloudapi/vins/ipRelease
|
||||
- /cloudapi/vins/ipReserve
|
||||
- /cloudapi/vins/list
|
||||
- /cloudapi/vins/listDeleted
|
||||
- /cloudapi/vins/restore
|
||||
- /cloudapi/vins/staticRouteAdd
|
||||
- /cloudapi/vins/staticRouteDel
|
||||
- /cloudapi/vins/staticRouteList
|
||||
- /cloudapi/vins/vnfdevRedeploy
|
||||
- /cloudapi/vins/vnfdevRestart
|
||||
|
||||
</details>
|
||||
|
||||
#### Cloudbroker
|
||||
|
||||
<details><summary>account</summary>
|
||||
|
||||
- /cloudbroker/account/create
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.2 MiB |
@@ -1,11 +1,15 @@
|
||||
[project]
|
||||
name = "dynamix-sdk"
|
||||
authors = [{name = "Dmitriy Smirnov"}]
|
||||
version = "1.0.0"
|
||||
authors = [
|
||||
{name = "Dmitriy Smirnov"},
|
||||
{name = "Vladislav Nesterov"},
|
||||
{name = "Stanislav Karimov"},
|
||||
]
|
||||
version = "1.2.3"
|
||||
|
||||
readme = "README.md"
|
||||
|
||||
requires-python = ">=3.10.12"
|
||||
requires-python = ">=3.12"
|
||||
|
||||
dependencies = [
|
||||
"requests>=2.32.3",
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
pre-commit==4.1.0
|
||||
pytest==8.3.5
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .cloudapi import *
|
||||
from .cloudbroker import *
|
||||
from .system import *
|
||||
|
||||
|
||||
class API(_base.BaseAPI):
|
||||
cloudapi: CloudapiAPI
|
||||
cloudbroker: CloudbrokerAPI
|
||||
system: SystemAPI
|
||||
|
||||
@@ -23,7 +23,7 @@ class AffinityPolicy(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class AffinityTopology(str, _AutoNameEnum):
|
||||
compute = _enum_auto()
|
||||
vm = 'compute'
|
||||
node = _enum_auto()
|
||||
|
||||
|
||||
@@ -47,10 +47,17 @@ class NetType(str, _AutoNameEnum):
|
||||
DPDK = _enum_auto()
|
||||
EMPTY = _enum_auto()
|
||||
EXTNET = _enum_auto()
|
||||
SDN = _enum_auto()
|
||||
TRUNK = _enum_auto()
|
||||
VFNIC = _enum_auto()
|
||||
VINS = _enum_auto()
|
||||
|
||||
|
||||
class NetTypeForChangeIP(str, _AutoNameEnum):
|
||||
EXTNET = _enum_auto()
|
||||
VINS = _enum_auto()
|
||||
|
||||
|
||||
class NumaAffinity(str, _AutoNameEnum):
|
||||
none = _enum_auto()
|
||||
strict = _enum_auto()
|
||||
@@ -93,14 +100,21 @@ class LockStatus(str, _AutoNameEnum):
|
||||
UNLOCKED = _enum_auto()
|
||||
|
||||
|
||||
class ComputeFeature(str, _AutoNameEnum):
|
||||
class VMFeature(str, _AutoNameEnum):
|
||||
changemac = _enum_auto()
|
||||
cpupin = _enum_auto()
|
||||
dpdk = _enum_auto()
|
||||
hugepages = _enum_auto()
|
||||
numa = _enum_auto()
|
||||
trunk = _enum_auto()
|
||||
vfnic = _enum_auto()
|
||||
|
||||
|
||||
class RGDefaultNetTypeForSet(str, _AutoNameEnum):
|
||||
PRIVATE = _enum_auto()
|
||||
PUBLIC = _enum_auto()
|
||||
|
||||
|
||||
class RGDefaultNetType(str, _AutoNameEnum):
|
||||
NONE = _enum_auto()
|
||||
PRIVATE = _enum_auto()
|
||||
@@ -108,7 +122,7 @@ class RGDefaultNetType(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class RGResourceType(str, _AutoNameEnum):
|
||||
compute = _enum_auto()
|
||||
vm = 'compute'
|
||||
k8s = _enum_auto()
|
||||
lb = _enum_auto()
|
||||
vins = _enum_auto()
|
||||
@@ -116,13 +130,19 @@ class RGResourceType(str, _AutoNameEnum):
|
||||
|
||||
class DiskStatus(str, _AutoNameEnum):
|
||||
ASSIGNED = _enum_auto()
|
||||
BACKUP_RUNNING = _enum_auto()
|
||||
CLONING = _enum_auto()
|
||||
CREATED = _enum_auto()
|
||||
CREATING = _enum_auto()
|
||||
DELETED = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
DESTROYING = _enum_auto()
|
||||
MERGE = _enum_auto()
|
||||
MIGRATING = _enum_auto()
|
||||
MODELED = _enum_auto()
|
||||
PURGED = _enum_auto()
|
||||
REPLICATION = _enum_auto()
|
||||
ROLLBACK = _enum_auto()
|
||||
SNAPCREATE = _enum_auto()
|
||||
|
||||
|
||||
class DiskTechStatus(str, _AutoNameEnum):
|
||||
@@ -145,11 +165,15 @@ class VMStatus(str, _AutoNameEnum):
|
||||
class VMTechStatus(str, _AutoNameEnum):
|
||||
BACKUP_RUNNING = _enum_auto()
|
||||
BACKUP_STOPPED = _enum_auto()
|
||||
CLONING = _enum_auto()
|
||||
DOWN = _enum_auto()
|
||||
MERGE = _enum_auto()
|
||||
MIGRATING = _enum_auto()
|
||||
PAUSED = _enum_auto()
|
||||
PAUSING = _enum_auto()
|
||||
ROLLBACK = _enum_auto()
|
||||
SCHEDULED = _enum_auto()
|
||||
SNAPCREATE = _enum_auto()
|
||||
STARTED = _enum_auto()
|
||||
STARTING = _enum_auto()
|
||||
STOPPED = _enum_auto()
|
||||
@@ -159,3 +183,336 @@ class VMTechStatus(str, _AutoNameEnum):
|
||||
class DiskType(str, _AutoNameEnum):
|
||||
B = _enum_auto()
|
||||
D = _enum_auto()
|
||||
|
||||
|
||||
class AccountStatus(str, _AutoNameEnum):
|
||||
CONFIRMED = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
DELETED = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
DESTROYING = _enum_auto()
|
||||
|
||||
|
||||
class AccountResourceType(str, _AutoNameEnum):
|
||||
vm = 'compute'
|
||||
k8s = _enum_auto()
|
||||
lb = _enum_auto()
|
||||
vins = _enum_auto()
|
||||
flipgroup = _enum_auto()
|
||||
|
||||
|
||||
class ImageTechStatus(str, _AutoNameEnum):
|
||||
ALLOCATED = _enum_auto()
|
||||
UNALLOCATED = _enum_auto()
|
||||
|
||||
|
||||
class ImageStatus(str, _AutoNameEnum):
|
||||
CREATED = _enum_auto()
|
||||
CREATING = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
MODELED = _enum_auto()
|
||||
PURGED = _enum_auto()
|
||||
|
||||
|
||||
class ImageType(str, _AutoNameEnum):
|
||||
cdrom = _enum_auto()
|
||||
linux = _enum_auto()
|
||||
unknown = _enum_auto()
|
||||
virtual = _enum_auto()
|
||||
windows = _enum_auto()
|
||||
|
||||
|
||||
class NetIfaceNamingTemplate(str, _AutoNameEnum):
|
||||
ens = _enum_auto()
|
||||
eth = _enum_auto()
|
||||
|
||||
|
||||
class VINSStatus(str, _AutoNameEnum):
|
||||
MODELED = _enum_auto()
|
||||
CREATED = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
ENABLING = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
DISABLING = _enum_auto()
|
||||
DELETED = _enum_auto()
|
||||
DELETING = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
DESTROYING = _enum_auto()
|
||||
|
||||
|
||||
class VNFType(str, _AutoNameEnum):
|
||||
DHCP = _enum_auto()
|
||||
GW = _enum_auto()
|
||||
NAT = _enum_auto()
|
||||
|
||||
|
||||
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()
|
||||
CREATED = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
DELETED = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
STASHED = _enum_auto()
|
||||
|
||||
|
||||
class VNFTechStatus(str, _AutoNameEnum):
|
||||
STARTING = _enum_auto()
|
||||
STARTED = _enum_auto()
|
||||
STOPPING = _enum_auto()
|
||||
STOPPED = _enum_auto()
|
||||
VIRTUAL = _enum_auto()
|
||||
|
||||
|
||||
class VINSInterfaceType(str, _AutoNameEnum):
|
||||
MGMT = _enum_auto()
|
||||
|
||||
|
||||
class NATRuleProtocol(str, _AutoNameEnum):
|
||||
tcp = _enum_auto()
|
||||
udp = _enum_auto()
|
||||
|
||||
|
||||
class VNFDevType(str, _AutoNameEnum):
|
||||
vyos = _enum_auto()
|
||||
|
||||
|
||||
class BootMode(str, _AutoNameEnum):
|
||||
bios = _enum_auto()
|
||||
uefi = _enum_auto()
|
||||
|
||||
|
||||
class BServiceStatus(str, _AutoNameEnum):
|
||||
CREATED = _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()
|
||||
RECONFIGURING = _enum_auto()
|
||||
RESTORING = _enum_auto()
|
||||
|
||||
|
||||
class BServiceTechStatus(str, _AutoNameEnum):
|
||||
PAUSED = _enum_auto()
|
||||
PAUSING = _enum_auto()
|
||||
STARTED = _enum_auto()
|
||||
STARTING = _enum_auto()
|
||||
STOPPED = _enum_auto()
|
||||
STOPPING = _enum_auto()
|
||||
|
||||
|
||||
class BServiceGroupStatus(str, _AutoNameEnum):
|
||||
CREATED = _enum_auto()
|
||||
CREATING = _enum_auto()
|
||||
CURRUPTED = _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 BServiceGroupTechStatus(str, _AutoNameEnum):
|
||||
STARTED = _enum_auto()
|
||||
STARTING = _enum_auto()
|
||||
STOPPED = _enum_auto()
|
||||
STOPPING = _enum_auto()
|
||||
|
||||
|
||||
class SEPType(str, _AutoNameEnum):
|
||||
HITACHI = _enum_auto()
|
||||
DES = _enum_auto()
|
||||
OVS = _enum_auto()
|
||||
LOCAL = _enum_auto()
|
||||
TATLIN = _enum_auto()
|
||||
DORADO = _enum_auto()
|
||||
SHARED = _enum_auto()
|
||||
|
||||
|
||||
class ExtNetStatus(str, _AutoNameEnum):
|
||||
CREATED = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
DESTROYING = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
DISABLING = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
ENABLING = _enum_auto()
|
||||
MODELED = _enum_auto()
|
||||
|
||||
|
||||
class BootLoaderType(str, _AutoNameEnum):
|
||||
linux = _enum_auto()
|
||||
unknown = _enum_auto()
|
||||
windows = _enum_auto()
|
||||
|
||||
|
||||
class FlipGroupClientType(str, _AutoNameEnum):
|
||||
VM = 'compute'
|
||||
|
||||
|
||||
class FlipGroupStatus(str, _AutoNameEnum):
|
||||
CREATED = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
|
||||
|
||||
class FlipGroupNetType(str, _AutoNameEnum):
|
||||
EXTNET = _enum_auto()
|
||||
VINS = _enum_auto()
|
||||
|
||||
|
||||
class PoolDiskType(str, _AutoNameEnum):
|
||||
B = _enum_auto()
|
||||
D = _enum_auto()
|
||||
ANY = _enum_auto()
|
||||
|
||||
|
||||
class CountChangeMode(str, _AutoNameEnum):
|
||||
ABSOLUTE = _enum_auto()
|
||||
RELATIVE = _enum_auto()
|
||||
|
||||
|
||||
class LBStatus(str, _AutoNameEnum):
|
||||
MODELED = _enum_auto()
|
||||
CREATING = _enum_auto()
|
||||
CREATED = _enum_auto()
|
||||
DELETING = _enum_auto()
|
||||
DELETED = _enum_auto()
|
||||
DESTROYING = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
ENABLING = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
DISABLING = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
RESTORING = _enum_auto()
|
||||
|
||||
|
||||
class LBTechStatus(str, _AutoNameEnum):
|
||||
STARTING = _enum_auto()
|
||||
STARTED = _enum_auto()
|
||||
STOPPING = _enum_auto()
|
||||
STOPPED = _enum_auto()
|
||||
|
||||
|
||||
class LBBackendAlgorithm(str, _AutoNameEnum):
|
||||
ROUNDROBIN = 'roundrobin'
|
||||
STATIC_RR = 'static-rr'
|
||||
LEASTCONN = 'leastconn'
|
||||
|
||||
|
||||
class LBServerCheck(str, _AutoNameEnum):
|
||||
ENABLED = 'enabled'
|
||||
DISABLED = 'disabled'
|
||||
|
||||
|
||||
class AccessTypeForSet(str, _AutoNameEnum):
|
||||
ARCXDU = _enum_auto()
|
||||
RCX = _enum_auto()
|
||||
R = _enum_auto()
|
||||
|
||||
|
||||
class DataDisksChangeMode(str, _AutoNameEnum):
|
||||
DESTROY = _enum_auto()
|
||||
DETACH = _enum_auto()
|
||||
KEEP = _enum_auto()
|
||||
|
||||
|
||||
class PhysicalNodeStatus(str, _AutoNameEnum):
|
||||
DECOMMISSIONED = _enum_auto()
|
||||
DECOMMISSIONING = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
ERROR = _enum_auto()
|
||||
INSTALLING = _enum_auto()
|
||||
MAINTENANCE = _enum_auto()
|
||||
RESTRICTED = _enum_auto()
|
||||
|
||||
|
||||
class AuthBroker(str, _AutoNameEnum):
|
||||
DECS3O = 'decs3o'
|
||||
BVS = 'bvs'
|
||||
|
||||
|
||||
class DHCPReservationType(str, _AutoNameEnum):
|
||||
DHCP = _enum_auto()
|
||||
EXCLUDED = _enum_auto()
|
||||
SERVICE = _enum_auto()
|
||||
VIP = _enum_auto()
|
||||
|
||||
|
||||
class TaskStatus(str, _AutoNameEnum):
|
||||
ABORTED = _enum_auto()
|
||||
CLEANUPED = _enum_auto()
|
||||
ERROR = _enum_auto()
|
||||
OK = _enum_auto()
|
||||
PROCESSING = _enum_auto()
|
||||
SCHEDULED = _enum_auto()
|
||||
|
||||
|
||||
class K8sNetworkPlugin(str, _AutoNameEnum):
|
||||
FLANNEL = 'flannel'
|
||||
CALICO = 'calico'
|
||||
WEAVENET = 'weavenet'
|
||||
|
||||
|
||||
class K8CIStatus(str, _AutoNameEnum):
|
||||
CREATED = _enum_auto()
|
||||
DELETED = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
ENABLED = _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()
|
||||
|
||||
@@ -4,7 +4,7 @@ from . import enums as _enums
|
||||
|
||||
class DiskAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
name: str
|
||||
size: int
|
||||
size_gb: int
|
||||
|
||||
description: None | str = None
|
||||
image_id: None | int = None
|
||||
@@ -15,6 +15,14 @@ class DiskAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
class InterfaceAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
net_id: int
|
||||
net_type: _enums.NetType
|
||||
sdn_logical_port_id: None | str = None
|
||||
|
||||
ip_addr: None | str = None
|
||||
mac: None | str = None
|
||||
mtu: None | int = None
|
||||
|
||||
|
||||
class RouteAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
dst_net_ip: str
|
||||
dst_net_mask: str
|
||||
gateway: str
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,14 +1,42 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .account import *
|
||||
from .audit import *
|
||||
from .bservice import *
|
||||
from .compute import *
|
||||
from .disks import *
|
||||
from .dpdknet import *
|
||||
from .extnet import *
|
||||
from .flipgroup import *
|
||||
from .image import *
|
||||
from .k8ci import *
|
||||
from .k8s import *
|
||||
from .kvmx86 import *
|
||||
from .lb import *
|
||||
from .locations import *
|
||||
from .rg import *
|
||||
from .stack import *
|
||||
from .tasks import *
|
||||
from .user import *
|
||||
from .vins import *
|
||||
|
||||
|
||||
class CloudapiAPI(_base.BaseAPI):
|
||||
account: CloudapiAccountAPI
|
||||
audit: CloudapiAuditAPI
|
||||
bservice: CloudapiBserviceAPI
|
||||
compute: CloudapiComputeAPI
|
||||
disks: CloudapiDisksAPI
|
||||
dpdknet: CloudapiDpdknetAPI
|
||||
extnet: CloudapiExtnetAPI
|
||||
flipgroup: CloudapiFlipgroupAPI
|
||||
image: CloudapiImageAPI
|
||||
k8ci: CloudapiK8ciAPI
|
||||
k8s: CloudapiK8sAPI
|
||||
kvmx86: CloudapiKvmx86API
|
||||
lb: CloudapiLbAPI
|
||||
locations: CloudapiLocationsAPI
|
||||
rg: CloudapiRgAPI
|
||||
stack: CloudapiStackAPI
|
||||
tasks: CloudapiTasksAPI
|
||||
user: CloudapiUserAPI
|
||||
vins: CloudapiVinsAPI
|
||||
|
||||
@@ -1,17 +1,29 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .add_user import *
|
||||
from .delete import *
|
||||
from .delete_user import *
|
||||
from .disable import *
|
||||
from .enable import *
|
||||
from .get import *
|
||||
from .list import *
|
||||
from .list_deleted import *
|
||||
from .restore import *
|
||||
from .update import *
|
||||
from .update_user import *
|
||||
|
||||
|
||||
class CloudapiAccountAPI(
|
||||
_base.BaseAPI,
|
||||
CloudapiAccountAddUserProtocol,
|
||||
CloudapiAccountDeleteProtocol,
|
||||
CloudapiAccountDeleteUserProtocol,
|
||||
CloudapiAccountDisableProtocol,
|
||||
CloudapiAccountEnableProtocol,
|
||||
CloudapiAccountGetProtocol,
|
||||
CloudapiAccountListDeletedProtocol,
|
||||
CloudapiAccountListProtocol,
|
||||
CloudapiAccountRestoreProtocol,
|
||||
CloudapiAccountUpdateProtocol,
|
||||
CloudapiAccountUpdateUserProtocol,
|
||||
):
|
||||
pass
|
||||
|
||||
@@ -11,7 +11,7 @@ class CloudapiAccountAddUserProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
access_type: _nested.AccessType,
|
||||
user_id: str,
|
||||
access_type: _nested.AccessTypeForSet,
|
||||
user_name: str,
|
||||
) -> CloudapiAccountAddUserResultBool:
|
||||
...
|
||||
|
||||
15
src/dynamix_sdk/api/cloudapi/account/delete.py
Normal file
15
src/dynamix_sdk/api/cloudapi/account/delete.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiAccountDeleteResultStr(_base.BaseAPIResultStr):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiAccountDeleteProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def delete(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
permanently: bool = False,
|
||||
) -> CloudapiAccountDeleteResultStr:
|
||||
...
|
||||
@@ -10,6 +10,6 @@ class CloudapiAccountDeleteUserProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
user_id: str,
|
||||
user_name: str,
|
||||
) -> CloudapiAccountDeleteUserResultBool:
|
||||
...
|
||||
|
||||
59
src/dynamix_sdk/api/cloudapi/account/get.py
Normal file
59
src/dynamix_sdk/api/cloudapi/account/get.py
Normal file
@@ -0,0 +1,59 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiAccountGetResultModel(_base.BaseAPIResultModel):
|
||||
acc_lvl_vins_ids: list[int]
|
||||
acl: list[_nested.AccessAPIResultNM]
|
||||
company_url: str
|
||||
company: str
|
||||
cpu_allocation_parameter: str
|
||||
cpu_allocation_ratio: int
|
||||
created_by: str
|
||||
created_timestamp: int
|
||||
dc_location: str
|
||||
deactivation_timestamp: int
|
||||
default_zone_id: int
|
||||
deleted_by: str
|
||||
deleted_timestamp: int
|
||||
description: str
|
||||
display_name: str
|
||||
guid: int
|
||||
id: int
|
||||
name: str
|
||||
quotas: _nested.TenantQuotasAPIResultNM
|
||||
resource_types: list[_nested.AccountResourceType]
|
||||
send_access_emails: bool
|
||||
status: _nested.AccountStatus
|
||||
uniq_pools: list[str]
|
||||
updated_timestamp: int
|
||||
version: int
|
||||
vins_count: int
|
||||
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
|
||||
def deactivation_datetime(self):
|
||||
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):
|
||||
def get(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
) -> CloudapiAccountGetResultModel:
|
||||
...
|
||||
22
src/dynamix_sdk/api/cloudapi/account/list.py
Normal file
22
src/dynamix_sdk/api/cloudapi/account/list.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiAccountListResultModel(_base.BaseAPIResultModel):
|
||||
data: list[_nested.AccountAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiAccountListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def list(
|
||||
self,
|
||||
*,
|
||||
access_type: None | _nested.AccessType = None,
|
||||
id: None | int = None,
|
||||
name: None | str = None,
|
||||
page_number: None | int = None,
|
||||
page_size: None | int = None,
|
||||
sort_by: None | str = None,
|
||||
status: None | _nested.AccountStatus = None,
|
||||
) -> CloudapiAccountListResultModel:
|
||||
...
|
||||
21
src/dynamix_sdk/api/cloudapi/account/list_deleted.py
Normal file
21
src/dynamix_sdk/api/cloudapi/account/list_deleted.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiAccountListDeletedResultModel(_base.BaseAPIResultModel):
|
||||
data: list[_nested.AccountAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiAccountListDeletedProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def list_deleted(
|
||||
self,
|
||||
*,
|
||||
access_type: None | _nested.AccessType = None,
|
||||
id: None | int = None,
|
||||
name: None | str = None,
|
||||
page_number: None | int = None,
|
||||
page_size: None | int = None,
|
||||
sort_by: None | str = None,
|
||||
) -> CloudapiAccountListDeletedResultModel:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/account/restore.py
Normal file
14
src/dynamix_sdk/api/cloudapi/account/restore.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiAccountRestoreResultStr(_base.BaseAPIResultStr):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiAccountRestoreProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def restore(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
) -> CloudapiAccountRestoreResultStr:
|
||||
...
|
||||
25
src/dynamix_sdk/api/cloudapi/account/update.py
Normal file
25
src/dynamix_sdk/api/cloudapi/account/update.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiAccountUpdateResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiAccountUpdateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def update(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
cpu_count_quota: None | int = None,
|
||||
ext_traffic_quota: None | int = None,
|
||||
gpu_count_quota: None | int = None,
|
||||
name: None | str = None,
|
||||
public_ip_count_quota: None | int = None,
|
||||
ram_size_quota_mb: None | int = None,
|
||||
send_access_emails: None | bool = None,
|
||||
storage_size_quota_gb: None | int = None,
|
||||
uniq_pools: None | list[str] = None,
|
||||
description: str | None = None,
|
||||
default_zone_id: int | None = None,
|
||||
) -> CloudapiAccountUpdateResultBool:
|
||||
...
|
||||
@@ -11,7 +11,7 @@ class CloudapiAccountUpdateUserProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
access_type: _nested.AccessType,
|
||||
user_id: str,
|
||||
access_type: _nested.AccessTypeForSet,
|
||||
user_name: str,
|
||||
) -> CloudapiAccountUpdateUserResultBool:
|
||||
...
|
||||
|
||||
1
src/dynamix_sdk/api/cloudapi/audit/__init__.py
Normal file
1
src/dynamix_sdk/api/cloudapi/audit/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from ._api import *
|
||||
9
src/dynamix_sdk/api/cloudapi/audit/_api.py
Normal file
9
src/dynamix_sdk/api/cloudapi/audit/_api.py
Normal file
@@ -0,0 +1,9 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .get import *
|
||||
|
||||
|
||||
class CloudapiAuditAPI(
|
||||
_base.BaseAPI,
|
||||
CloudapiAuditGetProtocol,
|
||||
):
|
||||
pass
|
||||
33
src/dynamix_sdk/api/cloudapi/audit/get.py
Normal file
33
src/dynamix_sdk/api/cloudapi/audit/get.py
Normal file
@@ -0,0 +1,33 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiAuditGetResultModel(_base.BaseAPIResultModel):
|
||||
args: str
|
||||
api_url_path: str
|
||||
guid: str
|
||||
kwargs: str
|
||||
client_ip_addr: str
|
||||
execution_time_sec: float
|
||||
result: str
|
||||
status_code: int
|
||||
request_timestamp: float
|
||||
response_timestamp: float
|
||||
user_name: str
|
||||
request_datetime_iso8601: str
|
||||
|
||||
@property
|
||||
def request_datetime(self):
|
||||
return self._get_datetime_from_timestamp(self.request_timestamp)
|
||||
|
||||
@property
|
||||
def response_datetime(self):
|
||||
return self._get_datetime_from_timestamp(self.response_timestamp)
|
||||
|
||||
|
||||
class CloudapiAuditGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def get(
|
||||
self,
|
||||
*,
|
||||
audit_guid: str,
|
||||
) -> CloudapiAuditGetResultModel:
|
||||
...
|
||||
1
src/dynamix_sdk/api/cloudapi/bservice/__init__.py
Normal file
1
src/dynamix_sdk/api/cloudapi/bservice/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from ._api import *
|
||||
51
src/dynamix_sdk/api/cloudapi/bservice/_api.py
Normal file
51
src/dynamix_sdk/api/cloudapi/bservice/_api.py
Normal file
@@ -0,0 +1,51 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .create import *
|
||||
from .delete import *
|
||||
from .disable import *
|
||||
from .enable import *
|
||||
from .get import *
|
||||
from .group_add import *
|
||||
from .group_compute_remove import *
|
||||
from .group_get import *
|
||||
from .group_parent_add import *
|
||||
from .group_parent_remove import *
|
||||
from .group_remove import *
|
||||
from .group_resize import *
|
||||
from .group_start import *
|
||||
from .group_stop import *
|
||||
from .group_update import *
|
||||
from .group_update_extnet import *
|
||||
from .group_update_vins import *
|
||||
from .list import *
|
||||
from .list_deleted import *
|
||||
from .restore import *
|
||||
from .start import *
|
||||
from .stop import *
|
||||
|
||||
|
||||
class CloudapiBserviceAPI(
|
||||
_base.BaseAPI,
|
||||
CloudapiBserviceCreateProtocol,
|
||||
CloudapiBserviceDeleteProtocol,
|
||||
CloudapiBserviceDisableProtocol,
|
||||
CloudapiBserviceEnableProtocol,
|
||||
CloudapiBserviceGetProtocol,
|
||||
CloudapiBserviceGroupAddProtocol,
|
||||
CloudapiBserviceGroupComputeRemoveProtocol,
|
||||
CloudapiBserviceGroupGetProtocol,
|
||||
CloudapiBserviceGroupParentAddProtocol,
|
||||
CloudapiBserviceGroupParentRemoveProtocol,
|
||||
CloudapiBserviceGroupRemoveProtocol,
|
||||
CloudapiBserviceGroupResizeProtocol,
|
||||
CloudapiBserviceGroupStartProtocol,
|
||||
CloudapiBserviceGroupStopProtocol,
|
||||
CloudapiBserviceGroupUpdateExtnetProtocol,
|
||||
CloudapiBserviceGroupUpdateProtocol,
|
||||
CloudapiBserviceGroupUpdateVinsProtocol,
|
||||
CloudapiBserviceListDeletedProtocol,
|
||||
CloudapiBserviceListProtocol,
|
||||
CloudapiBserviceRestoreProtocol,
|
||||
CloudapiBserviceStartProtocol,
|
||||
CloudapiBserviceStopProtocol,
|
||||
):
|
||||
pass
|
||||
18
src/dynamix_sdk/api/cloudapi/bservice/create.py
Normal file
18
src/dynamix_sdk/api/cloudapi/bservice/create.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceCreateResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def create(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
rg_id: int,
|
||||
ssh_user: str | None = None,
|
||||
ssh_key: str | None = None,
|
||||
zone_id: int | None = None,
|
||||
) -> CloudapiBserviceCreateResultInt:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/bservice/delete.py
Normal file
15
src/dynamix_sdk/api/cloudapi/bservice/delete.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceDeleteResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceDeleteProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def delete(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
permanently: bool = False,
|
||||
) -> CloudapiBserviceDeleteResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/bservice/disable.py
Normal file
14
src/dynamix_sdk/api/cloudapi/bservice/disable.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceDisableResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceDisableProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disable(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
) -> CloudapiBserviceDisableResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/bservice/enable.py
Normal file
14
src/dynamix_sdk/api/cloudapi/bservice/enable.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceEnableResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceEnableProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def enable(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
) -> CloudapiBserviceEnableResultBool:
|
||||
...
|
||||
56
src/dynamix_sdk/api/cloudapi/bservice/get.py
Normal file
56
src/dynamix_sdk/api/cloudapi/bservice/get.py
Normal file
@@ -0,0 +1,56 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiBserviceGetResultModel(_base.BaseAPIResultModel):
|
||||
account_id: int
|
||||
account_name: str
|
||||
base_domain: str
|
||||
cpu_count_total: int
|
||||
created_by: str
|
||||
created_timestamp: int
|
||||
deleted_by: str
|
||||
deleted_timestamp: int
|
||||
disk_size_total_gb: int
|
||||
grid_id: int
|
||||
groups: list[_nested.BServiceGroupAPIResultNM]
|
||||
guid: int
|
||||
id: int
|
||||
milestones: int
|
||||
name: str
|
||||
parent_service_id: int
|
||||
parent_service_type: str
|
||||
ram_size_total_mb: int
|
||||
rg_id: int
|
||||
rg_name: str
|
||||
snapshots: list[_nested.BServiceSnapshotAPIResultNM]
|
||||
ssh_key: str
|
||||
ssh_user: str
|
||||
status: _nested.BServiceStatus
|
||||
tech_status: _nested.BServiceTechStatus
|
||||
updated_by: str
|
||||
updated_timestamp: int
|
||||
user_managed: bool
|
||||
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):
|
||||
def get(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
) -> CloudapiBserviceGetResultModel:
|
||||
...
|
||||
30
src/dynamix_sdk/api/cloudapi/bservice/group_add.py
Normal file
30
src/dynamix_sdk/api/cloudapi/bservice/group_add.py
Normal file
@@ -0,0 +1,30 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiBserviceGroupAddResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupAddProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def group_add(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
vm_count: int,
|
||||
cpu_count: int,
|
||||
boot_disk_size_gb: int,
|
||||
driver: _nested.Driver,
|
||||
image_id: int,
|
||||
name: str,
|
||||
ram_size_mb: int,
|
||||
ci_user_data: str | None = None,
|
||||
extnet_ids: list[int] | None = None,
|
||||
role: str | None = None,
|
||||
sep_id: int | None = None,
|
||||
sep_pool_name: str | None = None,
|
||||
start_timeout: int | None = None,
|
||||
vins_ids: list[int] | None = None,
|
||||
chipset: _nested.Chipset = _nested.Chipset.i440fx,
|
||||
) -> CloudapiBserviceGroupAddResultInt:
|
||||
...
|
||||
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupComputeRemoveResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupComputeRemoveProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def group_compute_remove(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
vm_id: int,
|
||||
) -> CloudapiBserviceGroupComputeRemoveResultBool:
|
||||
...
|
||||
61
src/dynamix_sdk/api/cloudapi/bservice/group_get.py
Normal file
61
src/dynamix_sdk/api/cloudapi/bservice/group_get.py
Normal file
@@ -0,0 +1,61 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiBserviceGroupGetResultModel(
|
||||
_base.BaseAPIResultModel,
|
||||
):
|
||||
account_id: int
|
||||
account_name: str
|
||||
bservice_id: int
|
||||
consistency: bool
|
||||
cpu_count: int
|
||||
created_by: str
|
||||
created_timestamp: int
|
||||
deleted_by: str
|
||||
deleted_timestamp: int
|
||||
boot_disk_size_gb: int
|
||||
driver: _nested.Driver
|
||||
extnet_ids: list[int]
|
||||
grid_id: int
|
||||
guid: int
|
||||
id: int
|
||||
image_id: int
|
||||
milestones: int
|
||||
name: str
|
||||
parent_ids: list[int]
|
||||
ram_size_mb: int
|
||||
rg_id: int
|
||||
rg_name: str
|
||||
role: str
|
||||
sep_id: int
|
||||
sep_pool_name: str
|
||||
seq_no: int
|
||||
status: _nested.BServiceGroupStatus
|
||||
tech_status: _nested.BServiceGroupTechStatus
|
||||
start_timeout: int
|
||||
updated_by: str
|
||||
updated_timestamp: int
|
||||
vins_ids: list[int]
|
||||
vms: list[_nested.BServiceGroupVMAPIResultNM]
|
||||
|
||||
@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 CloudapiBserviceGroupGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def group_get(
|
||||
self, *,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int
|
||||
) -> CloudapiBserviceGroupGetResultModel:
|
||||
...
|
||||
18
src/dynamix_sdk/api/cloudapi/bservice/group_parent_add.py
Normal file
18
src/dynamix_sdk/api/cloudapi/bservice/group_parent_add.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupParentAddResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupParentAddProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def group_parent_add(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
parent_id: int,
|
||||
) -> CloudapiBserviceGroupParentAddResultBool:
|
||||
...
|
||||
18
src/dynamix_sdk/api/cloudapi/bservice/group_parent_remove.py
Normal file
18
src/dynamix_sdk/api/cloudapi/bservice/group_parent_remove.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupParentRemoveResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupParentRemoveProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def group_parent_remove(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
parent_id: int,
|
||||
) -> CloudapiBserviceGroupParentRemoveResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/bservice/group_remove.py
Normal file
14
src/dynamix_sdk/api/cloudapi/bservice/group_remove.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupRemoveResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupRemoveProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def group_remove(
|
||||
self, *,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int
|
||||
) -> CloudapiBserviceGroupRemoveResultBool:
|
||||
...
|
||||
23
src/dynamix_sdk/api/cloudapi/bservice/group_resize.py
Normal file
23
src/dynamix_sdk/api/cloudapi/bservice/group_resize.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiBserviceGroupResizeResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupResizeProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def group_resize(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
chipset: _nested.Chipset = _nested.Chipset.i440fx,
|
||||
count_change_mode: _nested.CountChangeMode = (
|
||||
_nested.CountChangeMode.RELATIVE
|
||||
),
|
||||
vm_count: int,
|
||||
) -> CloudapiBserviceGroupResizeResultInt:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/bservice/group_start.py
Normal file
15
src/dynamix_sdk/api/cloudapi/bservice/group_start.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupStartResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupStartProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def group_start(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
) -> CloudapiBserviceGroupStartResultBool:
|
||||
...
|
||||
16
src/dynamix_sdk/api/cloudapi/bservice/group_stop.py
Normal file
16
src/dynamix_sdk/api/cloudapi/bservice/group_stop.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupStopResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupStopProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def group_stop(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
force: bool = False,
|
||||
) -> CloudapiBserviceGroupStopResultBool:
|
||||
...
|
||||
23
src/dynamix_sdk/api/cloudapi/bservice/group_update.py
Normal file
23
src/dynamix_sdk/api/cloudapi/bservice/group_update.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupUpdateResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupUpdateProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def group_update(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
force: bool = False,
|
||||
cpu_count: int | None = None,
|
||||
boot_disk_size_gb: int | None = None,
|
||||
name: str | None = None,
|
||||
ram_size_mb: int | None = None,
|
||||
role: str | None = None,
|
||||
) -> CloudapiBserviceGroupUpdateResultBool:
|
||||
...
|
||||
18
src/dynamix_sdk/api/cloudapi/bservice/group_update_extnet.py
Normal file
18
src/dynamix_sdk/api/cloudapi/bservice/group_update_extnet.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupUpdateExtnetResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupUpdateExtnetProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def group_update_extnet(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
extnet_ids: list[int] | None = None,
|
||||
) -> CloudapiBserviceGroupUpdateExtnetResultBool:
|
||||
...
|
||||
18
src/dynamix_sdk/api/cloudapi/bservice/group_update_vins.py
Normal file
18
src/dynamix_sdk/api/cloudapi/bservice/group_update_vins.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupUpdateVinsResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupUpdateVinsProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def group_update_vins(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
vins_ids: list[int] | None = None,
|
||||
) -> CloudapiBserviceGroupUpdateVinsResultBool:
|
||||
...
|
||||
26
src/dynamix_sdk/api/cloudapi/bservice/list.py
Normal file
26
src/dynamix_sdk/api/cloudapi/bservice/list.py
Normal file
@@ -0,0 +1,26 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiBserviceListResultModel(_base.BaseAPIResultModel):
|
||||
data: list[_nested.BServiceAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiBserviceListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def list(
|
||||
self,
|
||||
*,
|
||||
account_id: int | None = None,
|
||||
account_name: str | None = None,
|
||||
id: int | None = None,
|
||||
name: str | None = None,
|
||||
page_number: int | None = None,
|
||||
page_size: int | None = None,
|
||||
rg_id: int | None = None,
|
||||
rg_name: str | None = None,
|
||||
sort_by: str | None = None,
|
||||
status: _nested.BServiceStatus | None = None,
|
||||
tech_status: _nested.BServiceTechStatus | None = None,
|
||||
) -> CloudapiBserviceListResultModel:
|
||||
...
|
||||
20
src/dynamix_sdk/api/cloudapi/bservice/list_deleted.py
Normal file
20
src/dynamix_sdk/api/cloudapi/bservice/list_deleted.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiBserviceListDeletedResultModel(_base.BaseAPIResultModel):
|
||||
data: list[_nested.BServiceAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiBserviceListDeletedProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def list_deleted(
|
||||
self,
|
||||
*,
|
||||
account_id: int | None = None,
|
||||
page_number: int | None = None,
|
||||
page_size: int | None = None,
|
||||
rg_id: int | None = None,
|
||||
sort_by: str | None = None,
|
||||
) -> CloudapiBserviceListDeletedResultModel:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/bservice/restore.py
Normal file
14
src/dynamix_sdk/api/cloudapi/bservice/restore.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceRestoreResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceRestoreProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def restore(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
) -> CloudapiBserviceRestoreResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/bservice/start.py
Normal file
14
src/dynamix_sdk/api/cloudapi/bservice/start.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceStartResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceStartProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def start(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
) -> CloudapiBserviceStartResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/bservice/stop.py
Normal file
14
src/dynamix_sdk/api/cloudapi/bservice/stop.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceStopResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceStopProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def stop(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
) -> CloudapiBserviceStopResultBool:
|
||||
...
|
||||
@@ -1,15 +1,101 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .affinity_label_remove import *
|
||||
from .affinity_label_set import *
|
||||
from .affinity_relations import *
|
||||
from .affinity_rule_add import *
|
||||
from .affinity_rule_remove import *
|
||||
from .affinity_rules_clear import *
|
||||
from .anti_affinity_rule_add import *
|
||||
from .anti_affinity_rule_remove import *
|
||||
from .anti_affinity_rules_clear import *
|
||||
from .cd_eject import *
|
||||
from .cd_insert import *
|
||||
from .change_ip import *
|
||||
from .clone import *
|
||||
from .delete import *
|
||||
from .delete_custom_fields import *
|
||||
from .disk_add import *
|
||||
from .disk_attach import *
|
||||
from .disk_del import *
|
||||
from .disk_detach import *
|
||||
from .disk_resize import *
|
||||
from .get import *
|
||||
from .list import *
|
||||
from .net_attach import *
|
||||
from .net_detach import *
|
||||
from .pause import *
|
||||
from .pfw_add import *
|
||||
from .pfw_del import *
|
||||
from .pfw_list import *
|
||||
from .pin_to_stack import *
|
||||
from .reboot import *
|
||||
from .redeploy import *
|
||||
from .resize import *
|
||||
from .resume import *
|
||||
from .set_custom_fields import *
|
||||
from .snapshot_create import *
|
||||
from .snapshot_list import *
|
||||
from .snapshot_rollback import *
|
||||
from .start import *
|
||||
from .stop import *
|
||||
from .tag_add import *
|
||||
from .tag_remove import *
|
||||
from .unpin_from_stack import *
|
||||
from .update import *
|
||||
from .user_grant import *
|
||||
from .user_list import *
|
||||
from .user_revoke import *
|
||||
from .user_update import *
|
||||
|
||||
|
||||
class CloudapiComputeAPI(
|
||||
_base.BaseAPI,
|
||||
CloudapiComputeAffinityLabelRemoveProtocol,
|
||||
CloudapiComputeAffinityLabelSetProtocol,
|
||||
CloudapiComputeAffinityRelationsProtocol,
|
||||
CloudapiComputeAffinityRuleAddProtocol,
|
||||
CloudapiComputeAffinityRuleRemoveProtocol,
|
||||
CloudapiComputeAffinityRulesClearProtocol,
|
||||
CloudapiComputeAntiAffinityRuleAddProtocol,
|
||||
CloudapiComputeAntiAffinityRuleRemoveProtocol,
|
||||
CloudapiComputeAntiAffinityRulesClearProtocol,
|
||||
CloudapiComputeCdEjectProtocol,
|
||||
CloudapiComputeCdInsertProtocol,
|
||||
CloudapiComputeChangeIpProtocol,
|
||||
CloudapiComputeCloneProtocol,
|
||||
CloudapiComputeDeleteCustomFieldsProtocol,
|
||||
CloudapiComputeDeleteProtocol,
|
||||
CloudapiComputeDiskAddProtocol,
|
||||
CloudapiComputeDiskAttachProtocol,
|
||||
CloudapiComputeDiskDelProtocol,
|
||||
CloudapiComputeDiskDetachProtocol,
|
||||
CloudapiComputeDiskResizeProtocol,
|
||||
CloudapiComputeGetProtocol,
|
||||
CloudapiComputeListProtocol,
|
||||
CloudapiComputeNetAttachProtocol,
|
||||
CloudapiComputeNetDetachProtocol,
|
||||
CloudapiComputePauseProtocol,
|
||||
CloudapiComputePfwAddProtocol,
|
||||
CloudapiComputePfwDelProtocol,
|
||||
CloudapiComputePfwListProtocol,
|
||||
CloudapiComputePinToStackProtocol,
|
||||
CloudapiComputeRebootProtocol,
|
||||
CloudapiComputeRedeployProtocol,
|
||||
CloudapiComputeResizeProtocol,
|
||||
CloudapiComputeResumeProtocol,
|
||||
CloudapiComputeSetCustomFieldsProtocol,
|
||||
CloudapiComputeSnapshotCreateProtocol,
|
||||
CloudapiComputeSnapshotListProtocol,
|
||||
CloudapiComputeSnapshotRollbackProtocol,
|
||||
CloudapiComputeStartProtocol,
|
||||
CloudapiComputeStopProtocol,
|
||||
CloudapiComputeTagAddProtocol,
|
||||
CloudapiComputeTagRemoveProtocol,
|
||||
CloudapiComputeUnpinFromStackProtocol,
|
||||
CloudapiComputeUpdateProtocol,
|
||||
CloudapiComputeUserGrantProtocol,
|
||||
CloudapiComputeUserListProtocol,
|
||||
CloudapiComputeUserRevokeProtocol,
|
||||
CloudapiComputeUserUpdateProtocol,
|
||||
):
|
||||
pass
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeAffinityLabelRemoveResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAffinityLabelRemoveProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def affinity_label_remove(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeAffinityLabelRemoveResultBool:
|
||||
...
|
||||
17
src/dynamix_sdk/api/cloudapi/compute/affinity_label_set.py
Normal file
17
src/dynamix_sdk/api/cloudapi/compute/affinity_label_set.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeAffinityLabelSetResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAffinityLabelSetProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def affinity_label_set(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
affinity_label: str,
|
||||
) -> CloudapiComputeAffinityLabelSetResultBool:
|
||||
...
|
||||
20
src/dynamix_sdk/api/cloudapi/compute/affinity_relations.py
Normal file
20
src/dynamix_sdk/api/cloudapi/compute/affinity_relations.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from dynamix_sdk.api import _nested
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRelationsResultModel(
|
||||
_base.BaseAPIResultModel,
|
||||
_nested.AffinityRelationsAPIResultNM,
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRelationsProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def affinity_relations(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeAffinityRelationsResultModel:
|
||||
...
|
||||
22
src/dynamix_sdk/api/cloudapi/compute/affinity_rule_add.py
Normal file
22
src/dynamix_sdk/api/cloudapi/compute/affinity_rule_add.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from dynamix_sdk.api import _nested
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRuleAddResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRuleAddProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def affinity_rule_add(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
topology: _nested.AffinityTopology,
|
||||
policy: _nested.AffinityPolicy,
|
||||
mode: _nested.AffinityMode,
|
||||
key: str,
|
||||
value: str,
|
||||
) -> CloudapiComputeAffinityRuleAddResultBool:
|
||||
...
|
||||
22
src/dynamix_sdk/api/cloudapi/compute/affinity_rule_remove.py
Normal file
22
src/dynamix_sdk/api/cloudapi/compute/affinity_rule_remove.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from dynamix_sdk.api import _nested
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRuleRemoveResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRuleRemoveProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def affinity_rule_remove(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
topology: _nested.AffinityTopology,
|
||||
policy: _nested.AffinityPolicy,
|
||||
mode: _nested.AffinityMode,
|
||||
key: str,
|
||||
value: str,
|
||||
) -> CloudapiComputeAffinityRuleRemoveResultBool:
|
||||
...
|
||||
16
src/dynamix_sdk/api/cloudapi/compute/affinity_rules_clear.py
Normal file
16
src/dynamix_sdk/api/cloudapi/compute/affinity_rules_clear.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRulesClearResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRulesClearProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def affinity_rules_clear(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeAffinityRulesClearResultBool:
|
||||
...
|
||||
@@ -0,0 +1,22 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from dynamix_sdk.api import _nested
|
||||
|
||||
|
||||
class CloudapiComputeAntiAffinityRuleAddResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAntiAffinityRuleAddProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def anti_affinity_rule_add(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
topology: _nested.AffinityTopology,
|
||||
policy: _nested.AffinityPolicy,
|
||||
mode: _nested.AffinityMode,
|
||||
key: str,
|
||||
value: str,
|
||||
) -> CloudapiComputeAntiAffinityRuleAddResultBool:
|
||||
...
|
||||
@@ -0,0 +1,22 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from dynamix_sdk.api import _nested
|
||||
|
||||
|
||||
class CloudapiComputeAntiAffinityRuleRemoveResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAntiAffinityRuleRemoveProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def anti_affinity_rule_remove(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
topology: _nested.AffinityTopology,
|
||||
policy: _nested.AffinityPolicy,
|
||||
mode: _nested.AffinityMode,
|
||||
key: str,
|
||||
value: str,
|
||||
) -> CloudapiComputeAntiAffinityRuleRemoveResultBool:
|
||||
...
|
||||
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeAntiAffinityRulesClearResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAntiAffinityRulesClearProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def anti_affinity_rules_clear(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeAntiAffinityRulesClearResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/compute/cd_eject.py
Normal file
14
src/dynamix_sdk/api/cloudapi/compute/cd_eject.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeCdEjectResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeCdEjectProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def cd_eject(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeCdEjectResultBool:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/compute/cd_insert.py
Normal file
15
src/dynamix_sdk/api/cloudapi/compute/cd_insert.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeCdInsertResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeCdInsertProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def cd_insert(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
cdrom_image_id: int,
|
||||
) -> CloudapiComputeCdInsertResultBool:
|
||||
...
|
||||
18
src/dynamix_sdk/api/cloudapi/compute/change_ip.py
Normal file
18
src/dynamix_sdk/api/cloudapi/compute/change_ip.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeChangeIpResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeChangeIpProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def change_ip(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
net_type: _nested.NetTypeForChangeIP,
|
||||
net_id: int,
|
||||
ip_addr: str,
|
||||
) -> CloudapiComputeChangeIpResultBool:
|
||||
...
|
||||
18
src/dynamix_sdk/api/cloudapi/compute/clone.py
Normal file
18
src/dynamix_sdk/api/cloudapi/compute/clone.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeCloneResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeCloneProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def clone(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
name: str,
|
||||
force: bool = False,
|
||||
snapshot_timestamp: int | None = None,
|
||||
snapshot_name: str | None = None,
|
||||
) -> CloudapiComputeCloneResultInt:
|
||||
...
|
||||
@@ -9,8 +9,7 @@ class CloudapiComputeDeleteProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def delete(
|
||||
self,
|
||||
*,
|
||||
compute_id: int,
|
||||
|
||||
vm_id: int,
|
||||
detach_disks: bool = False,
|
||||
permanently: bool = False,
|
||||
) -> CloudapiComputeDeleteResultBool:
|
||||
|
||||
16
src/dynamix_sdk/api/cloudapi/compute/delete_custom_fields.py
Normal file
16
src/dynamix_sdk/api/cloudapi/compute/delete_custom_fields.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDeleteCustomFieldsResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeDeleteCustomFieldsProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def delete_custom_fields(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeDeleteCustomFieldsResultBool:
|
||||
...
|
||||
23
src/dynamix_sdk/api/cloudapi/compute/disk_add.py
Normal file
23
src/dynamix_sdk/api/cloudapi/compute/disk_add.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeDiskAddResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeDiskAddProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disk_add(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
name: str,
|
||||
disk_size_gb: int,
|
||||
disk_type: _nested.DiskType = _nested.DiskType.D,
|
||||
sep_id: int | None = None,
|
||||
sep_pool_name: str | None = None,
|
||||
description: str | None = None,
|
||||
image_id: int | None = None,
|
||||
|
||||
) -> CloudapiComputeDiskAddResultInt:
|
||||
...
|
||||
17
src/dynamix_sdk/api/cloudapi/compute/disk_attach.py
Normal file
17
src/dynamix_sdk/api/cloudapi/compute/disk_attach.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeDiskAttachResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeDiskAttachProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disk_attach(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
disk_type: _nested.DiskType = _nested.DiskType.D,
|
||||
) -> CloudapiComputeDiskAttachResultBool:
|
||||
...
|
||||
16
src/dynamix_sdk/api/cloudapi/compute/disk_del.py
Normal file
16
src/dynamix_sdk/api/cloudapi/compute/disk_del.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDiskDelResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeDiskDelProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disk_del(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
permanently: bool = True,
|
||||
) -> CloudapiComputeDiskDelResultBool:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/compute/disk_detach.py
Normal file
15
src/dynamix_sdk/api/cloudapi/compute/disk_detach.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDiskDetachResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeDiskDetachProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disk_detach(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
) -> CloudapiComputeDiskDetachResultBool:
|
||||
...
|
||||
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,19 +1,83 @@
|
||||
import typing as _typing
|
||||
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeGetResultModel(
|
||||
_base.BaseAPIResultModel,
|
||||
_nested.BaseVMAPIResultNM,
|
||||
):
|
||||
class CloudapiComputeGetResultModel(_base.BaseAPIResultModel):
|
||||
account_id: int
|
||||
account_name: str
|
||||
acl: _nested.VMACLAPIResultNM
|
||||
affinity_label: str
|
||||
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_loader_type: _nested.BootLoaderType
|
||||
boot_mode: _nested.BootMode
|
||||
boot_order: list[_nested.BootDevice]
|
||||
cdrom_image_id: int
|
||||
chipset: _nested.Chipset
|
||||
ci_user_data: dict
|
||||
disks: list[_nested.DiskAPIResultNM]
|
||||
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]
|
||||
driver: _nested.Driver
|
||||
grid_id: int
|
||||
guid: int
|
||||
hot_resize: bool
|
||||
hp_backed: bool
|
||||
id: int
|
||||
image_id: int
|
||||
image_name: None | str
|
||||
interfaces: list[_nested.InterfaceAPIResultNM]
|
||||
interfaces: list[_nested.InterfaceForComputeGetAPIResultNM]
|
||||
live_migration_job_id: int
|
||||
lock_status: _nested.LockStatus
|
||||
manager_id: int
|
||||
manager_type: str
|
||||
migration_job: 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]
|
||||
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
|
||||
stateless_sep_type: str
|
||||
status: _nested.VMStatus
|
||||
tags: dict
|
||||
tech_status: _nested.VMTechStatus
|
||||
updated_by: str
|
||||
updated_timestamp: int
|
||||
user_managed: bool
|
||||
vgpus: list[dict[str, _typing.Any]]
|
||||
virtual_image_id: int
|
||||
virtual_image_name: None | str
|
||||
vns_password: str
|
||||
vm_ci_id: int
|
||||
vnc_password: str
|
||||
guest_agent: _nested.GuestAgentAPIResultNM
|
||||
zone_id: int
|
||||
|
||||
natable_vins_id: int = 0
|
||||
natable_vins_ip: str = ''
|
||||
@@ -21,11 +85,23 @@ class CloudapiComputeGetResultModel(
|
||||
natable_vins_network: 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):
|
||||
def get(
|
||||
self,
|
||||
*,
|
||||
compute_id: int,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeGetResultModel:
|
||||
...
|
||||
|
||||
24
src/dynamix_sdk/api/cloudapi/compute/net_attach.py
Normal file
24
src/dynamix_sdk/api/cloudapi/compute/net_attach.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeNetAttachResultModel(
|
||||
_base.BaseAPIResultModel,
|
||||
_nested.InterfaceForComputeGetAPIResultNM,
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeNetAttachProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def net_attach(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
net_type: _nested.NetType,
|
||||
net_id: int,
|
||||
ip_addr: None | str = None,
|
||||
mtu: None | int = None,
|
||||
mac: None | str = None,
|
||||
sdn_logical_port_id: None | str = None,
|
||||
) -> CloudapiComputeNetAttachResultModel:
|
||||
...
|
||||
16
src/dynamix_sdk/api/cloudapi/compute/net_detach.py
Normal file
16
src/dynamix_sdk/api/cloudapi/compute/net_detach.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeNetDetachResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeNetDetachProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def net_detach(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
ip_addr: None | str = None,
|
||||
mac: None | str = None,
|
||||
) -> CloudapiComputeNetDetachResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/compute/pause.py
Normal file
14
src/dynamix_sdk/api/cloudapi/compute/pause.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputePauseResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputePauseProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def pause(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputePauseResultBool:
|
||||
...
|
||||
19
src/dynamix_sdk/api/cloudapi/compute/pfw_add.py
Normal file
19
src/dynamix_sdk/api/cloudapi/compute/pfw_add.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from dynamix_sdk.api import _nested
|
||||
|
||||
|
||||
class CloudapiComputePfwAddResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputePfwAddProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def pfw_add(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
public_port_start: int,
|
||||
protocol: _nested.NATRuleProtocol,
|
||||
public_port_end: int | None = None,
|
||||
local_port: int | None = None,
|
||||
) -> CloudapiComputePfwAddResultInt:
|
||||
...
|
||||
20
src/dynamix_sdk/api/cloudapi/compute/pfw_del.py
Normal file
20
src/dynamix_sdk/api/cloudapi/compute/pfw_del.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from dynamix_sdk.api import _nested
|
||||
|
||||
|
||||
class CloudapiComputePfwDelResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputePfwDelProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def pfw_del(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
rule_id: int | None = None,
|
||||
public_port_start: int | None = None,
|
||||
public_port_end: int | None = None,
|
||||
local_port: int | None = None,
|
||||
protocol: _nested.NATRuleProtocol | None = None,
|
||||
) -> CloudapiComputePfwDelResultBool:
|
||||
...
|
||||
16
src/dynamix_sdk/api/cloudapi/compute/pfw_list.py
Normal file
16
src/dynamix_sdk/api/cloudapi/compute/pfw_list.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputePfwListResultModel(_base.BaseAPIResultModel):
|
||||
data: list[_nested.NATRuleAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiComputePfwListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def pfw_list(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputePfwListResultModel:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/compute/pin_to_stack.py
Normal file
15
src/dynamix_sdk/api/cloudapi/compute/pin_to_stack.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputePinToStackResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputePinToStackProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def pin_to_stack(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
auto_start: bool = False,
|
||||
) -> CloudapiComputePinToStackResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/compute/reboot.py
Normal file
14
src/dynamix_sdk/api/cloudapi/compute/reboot.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeRebootResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeRebootProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def reboot(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeRebootResultBool:
|
||||
...
|
||||
22
src/dynamix_sdk/api/cloudapi/compute/redeploy.py
Normal file
22
src/dynamix_sdk/api/cloudapi/compute/redeploy.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeRedeployResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeRedeployProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def redeploy(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
start: bool = False,
|
||||
boot_disk_size_gb: int | None = None,
|
||||
data_disks_change_mode: _nested.DataDisksChangeMode = (
|
||||
_nested.DataDisksChangeMode.DETACH
|
||||
),
|
||||
force_stop: bool = False,
|
||||
image_id: int | None = None,
|
||||
) -> CloudapiComputeRedeployResultBool:
|
||||
...
|
||||
18
src/dynamix_sdk/api/cloudapi/compute/resize.py
Normal file
18
src/dynamix_sdk/api/cloudapi/compute/resize.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeResizeResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeResizeProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def resize(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
cpu_count: None | int = None,
|
||||
force: bool = False,
|
||||
preferred_cpu_cores: None | list[int] = None,
|
||||
ram_size_mb: None | int = None,
|
||||
) -> CloudapiComputeResizeResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/compute/resume.py
Normal file
14
src/dynamix_sdk/api/cloudapi/compute/resume.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeResumeResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeResumeProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def resume(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeResumeResultBool:
|
||||
...
|
||||
17
src/dynamix_sdk/api/cloudapi/compute/set_custom_fields.py
Normal file
17
src/dynamix_sdk/api/cloudapi/compute/set_custom_fields.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeSetCustomFieldsResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeSetCustomFieldsProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def set_custom_fields(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
custom_fields: str,
|
||||
) -> CloudapiComputeSetCustomFieldsResultBool:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/compute/snapshot_create.py
Normal file
15
src/dynamix_sdk/api/cloudapi/compute/snapshot_create.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeSnapshotCreateResultStr(_base.BaseAPIResultStr):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeSnapshotCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def snapshot_create(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
label: str,
|
||||
) -> CloudapiComputeSnapshotCreateResultStr:
|
||||
...
|
||||
16
src/dynamix_sdk/api/cloudapi/compute/snapshot_list.py
Normal file
16
src/dynamix_sdk/api/cloudapi/compute/snapshot_list.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeSnapshotListResultModel(_base.BaseAPIResultModel):
|
||||
data: list[_nested.SnapshotSetAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiComputeSnapshotListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def snapshot_list(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeSnapshotListResultModel:
|
||||
...
|
||||
17
src/dynamix_sdk/api/cloudapi/compute/snapshot_rollback.py
Normal file
17
src/dynamix_sdk/api/cloudapi/compute/snapshot_rollback.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeSnapshotRollbackResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeSnapshotRollbackProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
):
|
||||
def snapshot_rollback(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
label: str,
|
||||
) -> CloudapiComputeSnapshotRollbackResultBool:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/compute/start.py
Normal file
15
src/dynamix_sdk/api/cloudapi/compute/start.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeStartResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeStartProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def start(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
boot_cdrom_image_id: None | int = None,
|
||||
) -> CloudapiComputeStartResultBool:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/compute/stop.py
Normal file
15
src/dynamix_sdk/api/cloudapi/compute/stop.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeStopResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeStopProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def stop(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
force: bool = False,
|
||||
) -> CloudapiComputeStopResultBool:
|
||||
...
|
||||
16
src/dynamix_sdk/api/cloudapi/compute/tag_add.py
Normal file
16
src/dynamix_sdk/api/cloudapi/compute/tag_add.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeTagAddResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeTagAddProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def tag_add(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
key: str,
|
||||
value: str,
|
||||
) -> CloudapiComputeTagAddResultBool:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/compute/tag_remove.py
Normal file
15
src/dynamix_sdk/api/cloudapi/compute/tag_remove.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeTagRemoveResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeTagRemoveProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def tag_remove(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
key: str,
|
||||
) -> CloudapiComputeTagRemoveResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/compute/unpin_from_stack.py
Normal file
14
src/dynamix_sdk/api/cloudapi/compute/unpin_from_stack.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeUnpinFromStackResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeUnpinFromStackProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def unpin_from_stack(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeUnpinFromStackResultBool:
|
||||
...
|
||||
@@ -10,7 +10,7 @@ class CloudapiComputeUpdateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def update(
|
||||
self,
|
||||
*,
|
||||
compute_id: int,
|
||||
vm_id: int,
|
||||
auto_start: None | bool = None,
|
||||
chipset: None | _nested.Chipset = None,
|
||||
cpu_pin: None | bool = None,
|
||||
@@ -19,5 +19,9 @@ class CloudapiComputeUpdateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
name: None | str = None,
|
||||
numa_affinity: None | _nested.NumaAffinity = None,
|
||||
preferred_cpu_cores: None | list[int] = None,
|
||||
boot_loader_type: _nested.BootLoaderType | None = None,
|
||||
boot_mode: _nested.BootMode | None = None,
|
||||
network_interface_naming: _nested.NetIfaceNamingTemplate | None = None,
|
||||
hot_resize: bool | None = None,
|
||||
) -> CloudapiComputeUpdateResultBool:
|
||||
...
|
||||
|
||||
17
src/dynamix_sdk/api/cloudapi/compute/user_grant.py
Normal file
17
src/dynamix_sdk/api/cloudapi/compute/user_grant.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeUserGrantResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeUserGrantProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def user_grant(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
user_name: str,
|
||||
access_type: _nested.AccessTypeForSet,
|
||||
) -> CloudapiComputeUserGrantResultBool:
|
||||
...
|
||||
16
src/dynamix_sdk/api/cloudapi/compute/user_list.py
Normal file
16
src/dynamix_sdk/api/cloudapi/compute/user_list.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeUserListResultModel(_base.BaseAPIResultModel):
|
||||
data: _nested.VMACLAPIResultNM
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiComputeUserListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def user_list(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeUserListResultModel:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/compute/user_revoke.py
Normal file
15
src/dynamix_sdk/api/cloudapi/compute/user_revoke.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeUserRevokeResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeUserRevokeProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def user_revoke(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
user_name: str,
|
||||
) -> CloudapiComputeUserRevokeResultBool:
|
||||
...
|
||||
17
src/dynamix_sdk/api/cloudapi/compute/user_update.py
Normal file
17
src/dynamix_sdk/api/cloudapi/compute/user_update.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeUserUpdateResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeUserUpdateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def user_update(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
user_name: str,
|
||||
access_type: _nested.AccessTypeForSet,
|
||||
) -> CloudapiComputeUserUpdateResultBool:
|
||||
...
|
||||
1
src/dynamix_sdk/api/cloudapi/disks/__init__.py
Normal file
1
src/dynamix_sdk/api/cloudapi/disks/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from ._api import *
|
||||
39
src/dynamix_sdk/api/cloudapi/disks/_api.py
Normal file
39
src/dynamix_sdk/api/cloudapi/disks/_api.py
Normal file
@@ -0,0 +1,39 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .create import *
|
||||
from .delete import *
|
||||
from .delete_disks import *
|
||||
from .get import *
|
||||
from .limit_io import *
|
||||
from .list import *
|
||||
from .list_deleted import *
|
||||
from .list_types import *
|
||||
from .list_unattached import *
|
||||
from .rename import *
|
||||
from .resize2 import *
|
||||
from .restore import *
|
||||
from .share import *
|
||||
from .snapshot_delete import *
|
||||
from .snapshot_rollback import *
|
||||
from .unshare import *
|
||||
|
||||
|
||||
class CloudapiDisksAPI(
|
||||
_base.BaseAPI,
|
||||
CloudapiDisksCreateProtocol,
|
||||
CloudapiDisksDeleteDisksProtocol,
|
||||
CloudapiDisksDeleteProtocol,
|
||||
CloudapiDisksGetProtocol,
|
||||
CloudapiDisksLimitIOProtocol,
|
||||
CloudapiDisksListDeletedProtocol,
|
||||
CloudapiDisksListProtocol,
|
||||
CloudapiDisksListTypesProtocol,
|
||||
CloudapiDisksListUnattachedProtocol,
|
||||
CloudapiDisksRenameProtocol,
|
||||
CloudapiDisksResize2Protocol,
|
||||
CloudapiDisksRestoreProtocol,
|
||||
CloudapiDisksShareProtocol,
|
||||
CloudapiDisksSnapshotDeleteProtocol,
|
||||
CloudapiDisksSnapshotRollbackProtocol,
|
||||
CloudapiDisksUnshareProtocol,
|
||||
):
|
||||
pass
|
||||
20
src/dynamix_sdk/api/cloudapi/disks/create.py
Normal file
20
src/dynamix_sdk/api/cloudapi/disks/create.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiDisksCreateResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiDisksCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def create(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
name: str,
|
||||
size_gb: int,
|
||||
iops: int = 2000,
|
||||
description: str | None = None,
|
||||
sep_id: int | None = None,
|
||||
sep_pool_name: str | None = None,
|
||||
) -> CloudapiDisksCreateResultInt:
|
||||
...
|
||||
16
src/dynamix_sdk/api/cloudapi/disks/delete.py
Normal file
16
src/dynamix_sdk/api/cloudapi/disks/delete.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiDisksDeleteResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiDisksDeleteProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def delete(
|
||||
self,
|
||||
*,
|
||||
disk_id: int,
|
||||
detach: bool = False,
|
||||
permanently: bool = False,
|
||||
) -> CloudapiDisksDeleteResultBool:
|
||||
...
|
||||
15
src/dynamix_sdk/api/cloudapi/disks/delete_disks.py
Normal file
15
src/dynamix_sdk/api/cloudapi/disks/delete_disks.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiDisksDeleteDisksResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiDisksDeleteDisksProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def delete_disks(
|
||||
self,
|
||||
*,
|
||||
disk_ids: list[int],
|
||||
permanently: bool = False,
|
||||
) -> CloudapiDisksDeleteDisksResultBool:
|
||||
...
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user