Compare commits
10
Commits
1.2.latest
...
2.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ee16914bc | ||
|
|
a52ec3f1bb | ||
|
|
04f9c28eb0 | ||
|
|
cd6422373e | ||
|
|
69be98db48 | ||
|
|
7df3848866 | ||
|
|
66601495dd | ||
|
|
fac66abef6 | ||
|
|
56db28cb37 | ||
|
|
1703d1ed33 |
No files matched your search
@@ -1,32 +0,0 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: end-of-file-fixer
|
||||
- id: file-contents-sorter
|
||||
files: .*mapping.yml
|
||||
args:
|
||||
- --unique
|
||||
- id: no-commit-to-branch
|
||||
name: no-commit-to-branch (main, master, dev_*)
|
||||
args:
|
||||
- --pattern
|
||||
- dev_.*
|
||||
- repo: https://github.com/pycqa/flake8
|
||||
rev: 7.1.2
|
||||
hooks:
|
||||
- id: flake8
|
||||
name: flake8 (1/2)
|
||||
files: src/dynamix_sdk/types\.py|.*__init__\.py|.*_api\.py
|
||||
args:
|
||||
- --extend-ignore=F401,F403,F405
|
||||
- id: flake8
|
||||
name: flake8 (2/2)
|
||||
exclude: src/dynamix_sdk/types\.py|.*__init__\.py|.*_api\.py
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: pytest-local-tests
|
||||
name: pytest local tests
|
||||
entry: pytest tests/local
|
||||
language: system
|
||||
pass_filenames: false
|
||||
+191
-8
@@ -1,20 +1,203 @@
|
||||
# Список изменений в версии 1.2.2
|
||||
# Список изменений в версии 2.0.0
|
||||
|
||||
## Изменено
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BPYS-717 | • Функции SDK теперь являются функциональными объектами (функторами), которые имеют такие атрибуты как `config`, `func_name`, `api_path`, `http_method`, `last_http_response`, `last_params_model`, полный список и их описание доступны в README. <br>• Функции SDK теперь возвращают `str`, `int`, `bool` вместо `BaseAPIResultStr`, `BaseAPIResultInt`, `BaseAPIResultBool`, а модели результата не содержат атрибутов `_api_params` и `_http_response` и не наследуются от `BaseAPIResultModel`. |
|
||||
| BPYS-1401 | Функция `cloudbroker.account.set_cpu_allocation_ratio`: тип параметра `ratio` изменен с `float` на `int`. |
|
||||
| BPYS-1402 | Функция `cloudbroker.disks.migrate`: параметр `storage_policy_id` стал обязательным. |
|
||||
| BPYS-1399 | Функция `cloudapi.image.create_virtual`: параметр `account_id` стал обязательным. |
|
||||
| BPYS-1400 | Функция `cloudapi.image.list`: тип параметра `type` изменён с `str` на `list[str]`. |
|
||||
| BPYS-1501 | Функция `cloudapi.compute.disk_add`: тип результата изменён с `int` на `int \| str`. |
|
||||
| BPYS-1496 | Функция `cloudapi.compute.disable`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1503 | Функция `cloudapi.compute.disk_del`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1581 | Функция `cloudapi.compute.snapshot_rollback`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1510 | Функция `cloudapi.compute.migrate_to_zone`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1511 | Функция `cloudapi.compute.move_to_rg`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1509 | Функция `cloudapi.compute.net_attach`: тип результата изменён с `CloudapiComputeNetAttachResultModel` на `CloudapiComputeNetAttachResultModel \| str`. |
|
||||
| BPYS-1495 | Функция `cloudapi.compute.delete`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1500 | Функция `cloudapi.compute.change_security_groups`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1499 | Функция `cloudapi.compute.change_mtu`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1498 | Функция `cloudapi.compute.change_link_state`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1497 | Функция `cloudapi.compute.change_ip`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1494 | Функция `cloudapi.compute.cd_insert`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1493 | Функция `cloudapi.compute.cd_eject`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1505 | Функция `cloudapi.compute.guest_agent_execute`: тип результата изменён с `CloudapiComputeGuestAgentExecuteResultModel` на `CloudapiComputeGuestAgentExecuteResultModel \| str`. |
|
||||
| BPYS-1507 | Функция `cloudapi.compute.guest_agent_enable`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1508 | Функция `cloudapi.compute.guest_agent_disable`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1504 | Функция `cloudapi.compute.disk_switch_to_replication`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1502 | Функция `cloudapi.compute.disk_attach`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1506 | Функция `cloudapi.compute.guest_agent_feature_update`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1586 | Функция `cloudapi.compute.create_template`: тип результата изменён с `str` на `str \| int`. |
|
||||
| BPYS-1512 | Функция `cloudapi.compute.net_detach`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1513 | Функция `cloudapi.compute.pause`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1514 | Функция `cloudapi.compute.pfw_add`: тип результата изменён с `int` на `int \| str`. |
|
||||
| BPYS-1515 | Функция `cloudapi.compute.pfw_del`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1516 | Функция `cloudapi.compute.pin_to_node`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1517 | Функция `cloudapi.compute.power_cycle`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1518 | Функция `cloudapi.compute.reboot`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1519 | Функция `cloudapi.compute.redeploy`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1520 | Функция `cloudapi.compute.reset`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1521 | Функция `cloudapi.compute.resize`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1522 | Функция `cloudapi.compute.restore`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1523 | Функция `cloudapi.compute.resume`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1524 | Функция `cloudapi.compute.start`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1525 | Функция `cloudapi.compute.stop`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1526 | Функция `cloudbroker.compute.change_security_groups`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1580 | Функция `cloudapi.compute.disk_detach`: тип результата изменён с `bool` на `bool \| str`. |
|
||||
| BPYS-1610 | Функция `cloudapi.compute.clone`: тип результата изменён с `str` на `str \| int`. |
|
||||
| BPYS-1611 | Функция `cloudbroker.compute.clone`: тип результата изменён с `str` на `str \| int`. |
|
||||
| BPYS-1461 | Функция `cloudapi.image.create`: тип результата изменён с `int` на `int \| str`. |
|
||||
|
||||
## Добавлено
|
||||
|
||||
### Функциональный интерфейс
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BPYS-1389 | Функция `cloudapi.zone.list`: в модель результата добавлено поле `data.cpu_alignment_profiles`. |
|
||||
| BPYS-1390 | Функция `cloudapi.zone.get`: в модель результата добавлено поле `cpu_alignment_profiles`. |
|
||||
| BPYS-1392 | Функция `cloudapi.disks.get`: в модель результата добавлено поле `discard`. |
|
||||
| BPYS-1393 | Функции `cloudapi.disks.list`, `cloudapi.disks.list_deleted`: в модели результата добавлено поле `data.discard`. |
|
||||
| BPYS-1391 | Функция `cloudapi.extnet.list`: в модель результата добавлено поле `data.free_ip_count`. |
|
||||
| BPYS-1396 | Функции `cloudapi.compute.list`, `cloudapi.compute.list_deleted`: в модели результата добавлено поле `data.cpu_alignment_profile`. |
|
||||
| BPYS-1397 | Функции `cloudapi.compute.list`, `cloudapi.compute.list_deleted`: в модели результата добавлено поле `data.clock_sync_mode`. |
|
||||
| BPYS-1394 | Функция `cloudapi.compute.get`: в модель результата добавлено поле `cpu_alignment_profile`. |
|
||||
| BPYS-1395 | Функция `cloudapi.compute.get`: в модель результата добавлено поле `clock_sync_mode`. |
|
||||
| BPYS-1552 | Функции `cloudapi.compute.list`, `cloudapi.compute.list_deleted`: в модели результата добавлено поле `disks.read_only_mode`. |
|
||||
| BPYS-1536 | Функция `cloudapi.disks.list_unattached`: в модель результата добавлено поле `data.discard`. |
|
||||
| BPYS-1550 | Функция `cloudapi.disks.get`: в модель результата добавлено поле `vms_with_read_only`. |
|
||||
| BPYS-1547 | Функции `cloudapi.disks.list`, `cloudapi.disks.list_deleted`: в модели результата добавлено поле `data.vms_with_read_only`. |
|
||||
| BPYS-1559 | Функции `cloudapi.compute.list`, `cloudapi.compute.list_deleted`: в модель результата добавлено поле `snapshot_sets.memory_dump_image_id`. |
|
||||
| BPYS-1559 | Функции `cloudapi.compute.snapshot_list`: в модель результата добавлено поле `data.memory_dump_image_id`. |
|
||||
| BPYS-1558 | Функции `cloudapi.compute.list`, `cloudapi.compute.list_deleted`: в модель результата добавлено поле `snapshot_sets.vm`. |
|
||||
| BPYS-1558 | Функции `cloudapi.compute.snapshot_list`: в модель результата добавлено поле `data.vm`. |
|
||||
| BPYS-1551 | Функция `cloudapi.compute.get`: в модель результата добавлено поле `disks.read_only_mode`. |
|
||||
| BPYS-1575 | Функция `cloudapi.compute.get`: в модель результата добавлено поле `disks.discard`. |
|
||||
| BPYS-1404 | Функция `cloudapi.compute.snapshot_rollback`: добавлен параметр `with_memory`. |
|
||||
| BPYS-1465 | Функция `cloudapi.compute.snapshot_rollback`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1403 | Функция `cloudapi.compute.snapshot_create`: добавлен параметр `with_memory`. |
|
||||
| BPYS-1464 | Функция `cloudapi.compute.snapshot_create`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1383 | Добавлена функция `cloudapi.compute.get_cpu_alignment_profile`. |
|
||||
| BPYS-1405 | Функция `cloudapi.compute.update`: добавлен параметр `clock_sync_mode`. |
|
||||
| BPYS-1384 | Добавлена функция `cloudapi.compute.set_cpu_alignment_profile`. |
|
||||
| BPYS-1385 | Добавлена функция `cloudapi.compute.delete_cpu_alignment_profile`. |
|
||||
| BPYS-1415 | Функция `cloudapi.compute.abort_shared_snapshot_merge`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1417 | Функция `cloudapi.compute.cd_eject`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1419 | Функция `cloudapi.compute.cd_insert`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1421 | Функция `cloudapi.compute.change_ip`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1423 | Функция `cloudapi.compute.change_link_state`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1425 | Функция `cloudapi.compute.change_mtu`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1427 | Функция `cloudapi.compute.change_security_groups`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1429 | Функция `cloudapi.compute.clone`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1431 | Функция `cloudapi.compute.create_template`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1463 | Функция `cloudapi.compute.delete`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1467 | Функция `cloudapi.compute.disk_add`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1539 | Функция `cloudapi.compute.disk_add`: добавлен параметр `read_only_mode`. |
|
||||
| BPYS-1466 | Функция `cloudapi.compute.disable`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1469 | Функция `cloudapi.compute.disk_del`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1475 | Функция `cloudapi.compute.migrate_to_zone`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1476 | Функция `cloudapi.compute.move_to_rg`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1477 | Функция `cloudapi.compute.net_attach`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1543 | Функция `cloudapi.compute.net_attach`: добавлен параметр `sdn_object_group_ids`. |
|
||||
| BPYS-1407 | Функция `cloudapi.kvmx86.create_blank`: добавлен параметр `clock_sync_mode`. |
|
||||
| BPYS-1408 | Функция `cloudapi.kvmx86.create_blank`: добавлен параметр `cpu_alignment_profile_name`. |
|
||||
| BPYS-1406 | Функция `cloudapi.kvmx86.create`: добавлен параметр `clock_sync_mode`. |
|
||||
| BPYS-1409 | Функция `cloudapi.kvmx86.create`: добавлен параметр `cpu_alignment_profile_name`. |
|
||||
| BPYS-1473 | Функция `cloudapi.compute.guest_agent_execute`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1472 | Функция `cloudapi.compute.guest_agent_enable`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1471 | Функция `cloudapi.compute.guest_agent_disable`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1470 | Функция `cloudapi.compute.disk_switch_to_replication`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1468 | Функция `cloudapi.compute.disk_attach`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1541 | Функция `cloudapi.compute.disk_attach`: добавлен параметр `read_only_mode`. |
|
||||
| BPYS-1474 | Функция `cloudapi.compute.guest_agent_feature_update`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1571 | Функции `cloudapi.image.get`, `cloudapi.image.list`: в перечисляемый тип `type` добавлен атрибут `MEMORY_DUMP`. |
|
||||
| BPYS-1546 | Функции `cloudapi.account.list`, `cloudapi.account.list_deleted`, `cloudapi.bservice.list`, `cloudapi.bservice.list_deleted`, `cloudapi.compute.list`, `cloudapi.compute.list_deleted`, `cloudapi.disks.list`, `cloudapi.disks.list_deleted`, `cloudapi.disks.list_unattached`, `cloudapi.dpdknet.list`, `cloudapi.extnet.list`, `cloudapi.flipgroup.list`, `cloudapi.image.list`, `cloudapi.k8ci.list`, `cloudapi.k8ci.list_deleted`, `cloudapi.k8s.list`, `cloudapi.k8s.list_deleted`, `cloudapi.lb.list`, `cloudapi.lb.list_deleted`, `cloudapi.locations.list`, `cloudapi.pcidevice.list`, `cloudapi.rg.list`, `cloudapi.rg.list_deleted`, `cloudapi.storage_policy.list`, `cloudapi.trunk.list`, `cloudapi.vfpool.list`, `cloudapi.vgpu.list`, `cloudapi.vins.list`, `cloudapi.vins.list_deleted`, `cloudapi.zone.list`, `cloudbroker.account.list`, `cloudbroker.account.list_deleted`, `cloudbroker.compute.migrate_storage_list`, `cloudbroker.security_group.list`, `cloudbroker.storage_policy.list`: для параметра `page_size` добавлено значение по умолчанию `100`. |
|
||||
| BPYS-1546 | Функция `cloudapi.trunk.list`: тип параметра `page_size` изменён с `int \| None` на `int`. |
|
||||
| BPYS-1589 | Функция `cloudapi.security_group.list`: для параметра `page_number` добавлено значение по умолчанию `1`. |
|
||||
| BPYS-1588 | Функция `cloudapi.security_group.list`: для параметра `page_size` добавлено значение по умолчанию `100`. |
|
||||
| BPYS-1591 | Функции `cloudapi.locations.list`: для параметра `page_number` добавлено значение по умолчанию `1`. |
|
||||
| BPYS-1478 | Функция `cloudapi.compute.net_detach`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1479 | Функция `cloudapi.compute.pause`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1480 | Функция `cloudapi.compute.pfw_add`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1481 | Функция `cloudapi.compute.pfw_del`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1482 | Функция `cloudapi.compute.pin_to_node`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1483 | Функция `cloudapi.compute.power_cycle`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1484 | Функция `cloudapi.compute.reboot`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1485 | Функция `cloudapi.compute.redeploy`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1486 | Функция `cloudapi.compute.reset`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1487 | Функция `cloudapi.compute.resize`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1587 | Функции `cloudapi.compute.net_attach`, `cloudapi.vins.create_in_account`, `cloudapi.vins.create_in_rg`, `cloudbroker.vins.update`: добавлен параметр `enable_default_gateway`. |
|
||||
| BPYS-1592 | Функция `cloudapi.compute.get`: в модель результата добавлено поле `interfaces.enable_default_gateway`. |
|
||||
| BPYS-1594 | Функции `cloudapi.compute.list`, `cloudapi.compute.list_deleted`: в модель результата добавлено поле `interfaces.enable_default_gateway`. |
|
||||
| BPYS-1595 | Функция `cloudapi.vins.get`: в модель результата добавлено поле `vnfdev.interfaces.enable_default_gateway`. |
|
||||
| BPYS-1596 | Функция `cloudapi.vins.get`: в модель результата добавлено поле `enable_default_gateway`. |
|
||||
| BPYS-1597 | Функция `cloudapi.zone.list`: в модель результата добавлено поле `data.reserved_cpu`. |
|
||||
| BPYS-1598 | Функция `cloudapi.zone.list`: в модель результата добавлено поле `data.reserved_ram`. |
|
||||
| BPYS-1599 | Функция `cloudapi.zone.get`: в модель результата добавлено поле `reserved_cpu`. |
|
||||
| BPYS-1600 | Функция `cloudapi.zone.get`: в модель результата добавлено поле `reserved_ram`. |
|
||||
| BPYS-1488 | Функция `cloudapi.compute.restore`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1489 | Функция `cloudapi.compute.resume`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1490 | Функция `cloudapi.compute.start`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1491 | Функция `cloudapi.compute.stop`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1492 | Функция `cloudbroker.compute.change_security_groups`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1462 | Функция `cloudbroker.compute.clone`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1579 | Функция `cloudapi.compute.disk_detach`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1604 | Функция `cloudapi.vins.get`: в модель результата добавлено поле `vnfs.dhcp.config.enable_default_gateway`. |
|
||||
| BPYS-1545 | Функции `cloudapi.account.list`, `cloudapi.account.list_deleted`, `cloudapi.bservice.list`, `cloudapi.bservice.list_deleted`, `cloudapi.compute.list`, `cloudapi.compute.list_deleted`, `cloudapi.disks.list`, `cloudapi.disks.list_deleted`, `cloudapi.disks.list_unattached`, `cloudapi.dpdknet.list`, `cloudapi.extnet.list`, `cloudapi.flipgroup.list`, `cloudapi.image.list`, `cloudapi.k8ci.list`, `cloudapi.k8ci.list_deleted`, `cloudapi.k8s.list`, `cloudapi.k8s.list_deleted`, `cloudapi.lb.list`, `cloudapi.lb.list_deleted`, `cloudapi.pcidevice.list`, `cloudapi.rg.list`, `cloudapi.rg.list_deleted`, `cloudapi.storage_policy.list`, `cloudapi.trunk.list`, `cloudapi.vfpool.list`, `cloudapi.vgpu.list`, `cloudapi.vins.list`, `cloudapi.vins.list_deleted`, `cloudapi.zone.list`, `cloudbroker.account.list`, `cloudbroker.account.list_deleted`, `cloudbroker.compute.migrate_storage_list`, `cloudbroker.security_group.list`, `cloudbroker.storage_policy.list`: для параметра `page_number` добавлено значение по умолчанию `1`. |
|
||||
| BPYS-1545 | Функция `cloudapi.trunk.list`: тип параметра `page_number` изменён с `int \| None` на `int`. |
|
||||
| BPYS-1607 | Функция `cloudapi.disks.get`: в модель результата добавлено поле `snapshots.pool_name`. |
|
||||
| BPYS-1606 | Функция `cloudapi.compute.get`: в модель результата добавлено поле `disks.snapshots.pool_name`. |
|
||||
| BPYS-1461 | Функция `cloudapi.image.create`: добавлен параметр `async_mode`. |
|
||||
| BPYS-1615 | Функция `cloudapi.rg.create`: добавлен параметр `enable_default_gateway`. |
|
||||
| BPYS-1626 | Функция `cloudapi.compute.get`: в модель результата добавлено поле `resized_online`. |
|
||||
| BPYS-1627 | Функции `cloudapi.compute.list`, `cloudapi.compute.list_deleted`: в модель результата добавлено поле `data.resized_online`. |
|
||||
| BPYS-1629 | Функция `cloudapi.compute.snapshot_list`: в модель результата добавлено поле `data.vm.resized_online`. |
|
||||
| BPYS-801 | Добавлена функция `cloudbroker.compute.affinity_label_remove`. |
|
||||
| BPYS-1642 | Добавлена функция `cloudbroker.compute.affinity_label_set`. |
|
||||
| BPYS-1643 | Добавлена функция `cloudbroker.bservice.create`. |
|
||||
| BPYS-1644 | Добавлена функция `cloudbroker.bservice.delete`. |
|
||||
| BPYS-1645 | Добавлена функция `cloudbroker.bservice.disable`. |
|
||||
| BPYS-1647 | Добавлена функция `cloudbroker.bservice.enable`. |
|
||||
| BPYS-1646 | Добавлена функция `cloudbroker.disks.change_disk_storage_policy`. |
|
||||
| BPYS-1649 | Добавлена функция `cloudbroker.disks.delete`. |
|
||||
| BPYS-1650 | Добавлена функция `cloudbroker.disks.delete_disks`. |
|
||||
| BPYS-1651 | Добавлена функция `cloudbroker.disks.depresent`. |
|
||||
| BPYS-1648 | Добавлена функция `cloudbroker.disks.create`. |
|
||||
| BPYS-1655 | Добавлена функция `cloudbroker.disks.limit_io`. |
|
||||
| BPYS-1656 | Добавлена функция `cloudbroker.disks.list`. |
|
||||
| BPYS-1660 | Добавлена функция `cloudbroker.disks.list_deleted`. |
|
||||
| BPYS-1662 | Добавлена функция `cloudbroker.disks.list_unattached`. |
|
||||
| BPYS-1669 | Добавлена функция `cloudbroker.image.get`. |
|
||||
| BPYS-1654 | Добавлена функция `cloudbroker.bservice.get`. |
|
||||
| BPYS-1658 | Добавлена функция `cloudbroker.bservice.group_add`. |
|
||||
| BPYS-1661 | Добавлена функция `cloudbroker.bservice.group_compute_remove`. |
|
||||
| BPYS-1666 | Добавлена функция `cloudbroker.kvmx86.create`. |
|
||||
| BPYS-1667 | Добавлена функция `cloudbroker.kvmx86.create_blank`. |
|
||||
| BPYS-1670 | Добавлена функция `cloudbroker.image.list`. |
|
||||
| BPYS-1668 | Добавлена функция `cloudbroker.image.create_image`. |
|
||||
| BPYS-1665 | Добавлена функция `cloudbroker.rg.list`. |
|
||||
| BPYS-1663 | Добавлена функция `cloudbroker.rg.create`. |
|
||||
| BPYS-1652 | Добавлена функция `cloudbroker.disks.from_platform_disk`. |
|
||||
| BPYS-1653 | Добавлена функция `cloudbroker.disks.get`. |
|
||||
| BPYS-1664 | Добавлена функция `cloudbroker.rg.get`. |
|
||||
| BPYS-1671 | Добавлена функция `cloudbroker.vins.create_in_account`. |
|
||||
| BPYS-1672 | Добавлена функция `cloudbroker.vins.create_in_rg`. |
|
||||
| BPYS-1673 | Добавлена функция `cloudbroker.vins.get`. |
|
||||
| BPYS-1674 | Добавлена функция `cloudbroker.vins.list`. |
|
||||
| BPYS-1675 | Добавлена функция `cloudbroker.extnet.create`. |
|
||||
| BPYS-1682 | Добавлена функция `cloudbroker.compute.delete`. |
|
||||
|
||||
## Удалено
|
||||
|
||||
### Функциональный интерфейс
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BPYS-1386 | Функция `cloudbroker.user.get`: из модели результата удалено поле `password`. |
|
||||
| BPYS-1387 | Функция `cloudbroker.user.list`: из модели результата удалено поле `data.password`. |
|
||||
| BPYS-1412 | Функция `cloudapi.disks.get`: из модели результата удалено поле `blkdiscard`. |
|
||||
| BPYS-1413 | Функции `cloudapi.disks.list`, `cloudapi.disks.list_deleted`: из моделей результата удалено поле `data.blkdiscard`. |
|
||||
| BPYS-1410 | Функция `cloudapi.compute.get`: из модели результата удалено поле `blkdiscard`. |
|
||||
| BPYS-1537 | Функция `cloudapi.disks.list_unattached`: из модели результата удалено поле `data.blkdiscard`. |
|
||||
| BPYS-1542 | Функция `cloudapi.compute.net_attach`: удалён параметр `sdn_object_group_id`. |
|
||||
|
||||
## Исправлено
|
||||
|
||||
### Функциональный интерфейс
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BPYS-670 | Функция `cloudapi.bservice.group_get`: вызов функции завершался ошибкой валидации поля `computes.0.chipset`. |
|
||||
| BPYS-1613 | Функции `cloudapi.zone.get`, `cloudapi.zone.list`: вызов функций завершался ошибкой валидации поля `sso_type`. В перечисляемый тип `DRSDXSSOType` добавлен атрибут `NONE` с пустой строкой в значении. |
|
||||
| BPYS-1639 | Функция `cloudapi.bservice.group_get`: вызов функции завершался ошибкой валидации поля `sep_pool_name`. В модели результата тип поля `sep_pool_name` изменён с `str` на `str \| None`. |
|
||||
@@ -1,4 +0,0 @@
|
||||
dev:
|
||||
pip install -e .
|
||||
pip install -r requirements-dev.txt
|
||||
pre-commit install
|
||||
@@ -15,7 +15,8 @@
|
||||
- [Ошибки и исключения (exceptions)](#ошибки-и-исключения-exceptions)
|
||||
- [Ошибки валидации данных](#ошибки-валидации-данных)
|
||||
- [Ошибки HTTP](#ошибки-http)
|
||||
- [Доступный функционал](#доступный-функционал)
|
||||
- [Ошибка несовместимости c API](#ошибка-несовместимости-с-api)
|
||||
- [Доступная функциональность](#доступная-функциональность)
|
||||
- [Способы авторизации](#способы-авторизации)
|
||||
- [Функции API](#функции-api)
|
||||
- [Cloudapi](#cloudapi)
|
||||
@@ -26,7 +27,7 @@
|
||||
|
||||
**Dynamix Python SDK** предоставляет удобный интерфейс для интеграции взаимодействия с API **Dynamix Enterprise** в программный код на языке Python.
|
||||
|
||||
**Примечание:** проект находится в стадии активной разработки, [доступный функционал](#доступный-функционал) будет расширяться с каждой новой версией.
|
||||
**Примечание:** проект находится в стадии активной разработки, [доступная функциональность](#доступная-функциональность) будет расширяться с каждой новой версией.
|
||||
|
||||
## Системные требования
|
||||
|
||||
@@ -34,6 +35,10 @@
|
||||
|
||||
| Версия платформы | Версия SDK |
|
||||
| --- | --- |
|
||||
| 4.7.0 | 2.0.x |
|
||||
| 4.6.0 | 1.5.x |
|
||||
| 4.5.0 | 1.4.x |
|
||||
| 4.4.0 | 1.3.x |
|
||||
| 4.4.0 build 963 | 1.2.x |
|
||||
| 4.3.0 | 1.1.x |
|
||||
| 4.2.0 | 1.0.x |
|
||||
@@ -119,6 +124,24 @@ dx = Dynamix(
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Задание декораторов для всех вызываемых функций</summary>
|
||||
|
||||
```python
|
||||
from dynamix_sdk import Dynamix
|
||||
|
||||
|
||||
Dynamix(
|
||||
...,
|
||||
f_decorators=[decorator_1, decorator_2],
|
||||
)
|
||||
```
|
||||
|
||||
Декораторы будут применяться к вызываемым функциям SDK в обратном порядке, то есть сначала будет применяться декоратор <code>decorator_2</code>, а потом <code>decorator_1</code>.
|
||||
|
||||
**Важно:** декораторы должны соответствовать аннотации параметра, то есть оставлять без изменений параметры и тип возвращаемого значения функции, иначе применение декораторов приведёт к некорректной работе SDK.
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Настройка повторных попыток при 503</summary>
|
||||
|
||||
По умолчанию SDK при получении кода ответа 503 производит 10 повторных попыток с интервалом 5 секунд. Данное поведение можно скорректировать:
|
||||
@@ -186,9 +209,27 @@ BVSAuth(
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Игнорирование проверки совместимости с API</summary>
|
||||
|
||||
**Важно:** игнорирование проверки совместимости с API может вызвать непредвиденные ошибки в работе SDK, поэтому использование данной возможности допустимо только принимая на себя всю ответственность за возможные последствия.
|
||||
|
||||
При игнорирование выводится только сообщение с предупреждением о несовместимости.
|
||||
|
||||
```python
|
||||
from dynamix_sdk import Dynamix
|
||||
|
||||
|
||||
Dynamix(
|
||||
...,
|
||||
ignore_api_compatibility=True,
|
||||
)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Функциональный интерфейс
|
||||
|
||||
Функциональный интерфейс предоставляет функции, соответствующие функциям API платформы.
|
||||
Функциональный интерфейс предоставляет функциональные объекты, каждый из которых является реализацией соответствующей функции API платформы. Для упрощения изложения в данном руководстве вместо термина **функциональный объект** будет использоваться термин **функция**, если это позволяет контекст.
|
||||
|
||||
#### Вызов функции
|
||||
|
||||
@@ -196,17 +237,35 @@ BVSAuth(
|
||||
|
||||

|
||||
|
||||
Предусмотрена возможность использования сокращённого названия для некоторых часто используемых атрибутов:
|
||||
|
||||
```python
|
||||
from dynamix_sdk import Dynamix
|
||||
|
||||
|
||||
dx = Dynamix(...)
|
||||
|
||||
# /cloudapi/kvmx86/create
|
||||
dx.api.ca.kvmx86.create(...) # ca = cloudapi
|
||||
|
||||
# /cloudbroker/account/create
|
||||
dx.api.cb.account.create(...) # cb = cloudbroker
|
||||
|
||||
# /system/usermanager/whoami
|
||||
dx.api.sys.usermanager.whoami(...) # sys = system
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Передача вложенных параметров </summary>
|
||||
|
||||
```python
|
||||
from dynamix_sdk import Dynamix, types
|
||||
from dynamix_sdk import Dynamix, types as sdk_types
|
||||
|
||||
|
||||
dx = Dynamix(...)
|
||||
|
||||
data_disk_1 = types.DiskAPIParamsNM(name='data_disk_1', size_gb=10)
|
||||
data_disk_1 = sdk_types.DiskAPIParamsNM(name='data_disk_1', size_gb=10)
|
||||
|
||||
# /cloudapi/kvmx86/create
|
||||
new_vm_id = dx.api.cloudapi.kvmx86.create(
|
||||
@@ -224,7 +283,7 @@ new_vm_id = dx.api.cloudapi.kvmx86.create(
|
||||
<details><summary>Передача параметров перечисляемого типа (enum) </summary>
|
||||
|
||||
```python
|
||||
from dynamix_sdk import Dynamix, types
|
||||
from dynamix_sdk import Dynamix, types as sdk_types
|
||||
|
||||
|
||||
dx = Dynamix(...)
|
||||
@@ -236,8 +295,8 @@ new_vm_id = dx.api.cloudapi.kvmx86.create(
|
||||
cpu_count=1,
|
||||
ram_size_mb=1024,
|
||||
image_id=456,
|
||||
chipset=types.Chipset.Q35, # enum
|
||||
numa_affinity=types.NumaAffinity.none, # enum
|
||||
chipset=sdk_types.Chipset.Q35, # enum
|
||||
numa_affinity=sdk_types.NumaAffinity.NONE, # enum
|
||||
)
|
||||
|
||||
```
|
||||
@@ -248,7 +307,7 @@ new_vm_id = dx.api.cloudapi.kvmx86.create(
|
||||
|
||||
Тип данных, возвращаемый функцией API SDK зависит от типа данных, возвращаемого соответствующей функцией API платформы.
|
||||
|
||||
Если функция API платформы возвращает структуру данных в виде набора пар ключ/значение (с заранее известными ключами), то функция API SDK возвращает модель Pydantic, которая описывает эту структуру.
|
||||
Если в результате функции API платформы присутствует структура данных в виде набора пар ключ/значение с заранее известными ключами, то в результате функции API SDK эта структура будет представлена в виде модели Pydantic. Остальные типы данных будут представлены соответствующими встроенными типами данных Python.
|
||||
|
||||
<details><summary>Модель</summary>
|
||||
|
||||
@@ -346,67 +405,22 @@ print(type(get_result.created_datetime)) # <class 'datetime.datetime'>
|
||||
|
||||
</details>
|
||||
|
||||
Если функция API платформы возвращает примитивный тип данных (строка, число), то функция API SDK возвращает экземпляр класса, наследуемый от класса этого типа данных.
|
||||
|
||||
<details><summary>Класс, наследуемый от примитивного типа данных</summary>
|
||||
|
||||
```python
|
||||
from dynamix_sdk import Dynamix
|
||||
|
||||
|
||||
dx = Dynamix(...)
|
||||
|
||||
# /cloudapi/kvmx86/create
|
||||
new_vm_id = dx.api.cloudapi.kvmx86.create(...)
|
||||
|
||||
print(type(new_vm_id)) # <class '....CloudapiKvmx86CreateResultInt'>
|
||||
|
||||
print(isinstance(new_vm_id, int)) # True
|
||||
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Исключением является булев тип данных. Так как наследование от класса `bool` в Python недопустимо, функция API SDK возвращает экземпляр класса, который обладает функциональностью для использования в булевых выражениях (реализован метод `__bool__`), но само булево значение хранится в атрибуте `value`:
|
||||
|
||||
<details><summary>Класс с булевым значением</summary>
|
||||
|
||||
```python
|
||||
from dynamix_sdk import Dynamix
|
||||
|
||||
|
||||
dx = Dynamix(...)
|
||||
|
||||
# /cloudapi/compute/delete
|
||||
delete_result = dx.api.cloudapi.compute.delete(vm_id=1)
|
||||
|
||||
print(type(delete_result)) # <class '....CloudapiComputeDeleteResultBool'>
|
||||
print(type(delete_result.value)) # <class 'bool'>
|
||||
|
||||
```
|
||||
|
||||
Использование в булевом выражении:
|
||||
|
||||
```python
|
||||
from dynamix_sdk import Dynamix
|
||||
|
||||
|
||||
dx = Dynamix(...)
|
||||
|
||||
# /cloudapi/compute/delete
|
||||
if dx.api.cloudapi.compute.delete(vm_id=1):
|
||||
print('The VM has been deleted.')
|
||||
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Все объекты, возвращаемые функциями API SDK, обладают общими специальными атрибутами:
|
||||
<br>Все функциональные объекты, реализующие функции API платформы, обладают общими атрибутами:
|
||||
|
||||
| Атрибут | Описание |
|
||||
| --- | --- |
|
||||
| `_api_params` | Модель Pydantic, описывающая параметры, переданные в функцию. |
|
||||
| `_http_response` | HTTP-ответ API платформы в виде экземпляра класса `requests.Response`. |
|
||||
| `api_path` | API URL path. |
|
||||
| `config` | Конфигурации SDK. |
|
||||
| `func_name` | Название функции API SDK в формате <code>cloudapi.compute.get</code> |
|
||||
| `http_method` | HTTP-метод. |
|
||||
| `last_http_resp` | Экзепляр класса <code>requests.Response</code>, полученный при последнем вызове ФО. |
|
||||
| `last_params_model` | Модель Pydantic, содержащая параметры, переданные в последний вызов ФО. |
|
||||
| `name_mapping_dict` | Таблица соответствия названий параметров функций и полей возвращаемых данных. |
|
||||
| `params_model_type` | Класс модели Pydantic для параметров вызова ФО. |
|
||||
| `path_mapping_dict` | Таблица соответствия названий частей API URL path. |
|
||||
| `post_json` | Используется ли JSON в POST-запросах. |
|
||||
| `result_type` | Аннотация типа результата вызова ФО. |
|
||||
| `signature` | Сигнатура вызова ФО. |
|
||||
|
||||
#### Соответствие названий
|
||||
|
||||
@@ -455,8 +469,13 @@ SDK для выполнения HTTP-запросов использует би
|
||||
from requests.exceptions import RequestException, HTTPError
|
||||
from dynamix_sdk import Dynamix
|
||||
|
||||
|
||||
dx = Dynamix(...)
|
||||
try:
|
||||
dx = Dynamix(...) # происходит HTTP-запрос для проверки совместимости с API
|
||||
except HTTPError as e:
|
||||
resp = e.response
|
||||
print(f'{e}: {resp.text}')
|
||||
except RequestException as e:
|
||||
print(e)
|
||||
|
||||
vm_id = 1
|
||||
|
||||
@@ -477,7 +496,26 @@ except RequestException as e:
|
||||
|
||||
Подробную информацию об исключениях библиотеки **Requests** можно получить в [соответствующем разделе официальной документации Requests](https://requests.readthedocs.io/en/latest/user/quickstart/#errors-and-exceptions).
|
||||
|
||||
## Доступный функционал
|
||||
<details><summary>Использование исключения SDK</summary>
|
||||
|
||||
Для возможности получать дополнительную информацию о функциях SDK при ошибках HTTP-запросов, в SDK есть возможность оборачивать все исключения <code>requests.exceptions.RequestException</code> в исключение <code>dynamix_sdk.exceptions.RequestException</code>:
|
||||
|
||||
```python
|
||||
class RequestException(Exception):
|
||||
orig_exception: requests.exceptions.RequestException
|
||||
func_name: str
|
||||
func_kwargs: None | dict = None
|
||||
status_code: None | int = None
|
||||
```
|
||||
|
||||
Чтобы включить использование исключения <code>dynamix_sdk.exceptions.RequestException</code>, необходимо передать в конструкторы классов <code>Dynamix</code>, <code>DECS3OAuth</code>, <code>BVSAuth</code> параметр <code>wrap_request_exceptions=True</code>
|
||||
</details>
|
||||
|
||||
#### Ошибка несовместимости с API
|
||||
При создании экземпляра класса `Dynamix`, SDK производит проверку совместимости с API.
|
||||
При несовместимости будет вызвано исключение `exceptions.IncompatibleAPIError`.
|
||||
|
||||
## Доступная функциональность
|
||||
|
||||
### Способы авторизации
|
||||
|
||||
@@ -499,6 +537,7 @@ except RequestException as e:
|
||||
- /cloudapi/account/disable
|
||||
- /cloudapi/account/enable
|
||||
- /cloudapi/account/get
|
||||
- /cloudapi/account/getResourceConsumption
|
||||
- /cloudapi/account/list
|
||||
- /cloudapi/account/listDeleted
|
||||
- /cloudapi/account/restore
|
||||
@@ -510,6 +549,7 @@ except RequestException as e:
|
||||
<details><summary>audit</summary>
|
||||
|
||||
- /cloudapi/audit/get
|
||||
- /cloudapi/audit/list
|
||||
|
||||
</details>
|
||||
|
||||
@@ -526,7 +566,6 @@ except RequestException as e:
|
||||
- /cloudapi/bservice/groupParentAdd
|
||||
- /cloudapi/bservice/groupParentRemove
|
||||
- /cloudapi/bservice/groupRemove
|
||||
- /cloudapi/bservice/groupResize
|
||||
- /cloudapi/bservice/groupStart
|
||||
- /cloudapi/bservice/groupStop
|
||||
- /cloudapi/bservice/groupUpdate
|
||||
@@ -534,7 +573,12 @@ except RequestException as e:
|
||||
- /cloudapi/bservice/groupUpdateVins
|
||||
- /cloudapi/bservice/list
|
||||
- /cloudapi/bservice/listDeleted
|
||||
- /cloudapi/bservice/migrateToZone
|
||||
- /cloudapi/bservice/restore
|
||||
- /cloudapi/bservice/snapshotCreate
|
||||
- /cloudapi/bservice/snapshotDelete
|
||||
- /cloudapi/bservice/snapshotList
|
||||
- /cloudapi/bservice/snapshotRollback
|
||||
- /cloudapi/bservice/start
|
||||
- /cloudapi/bservice/stop
|
||||
|
||||
@@ -542,6 +586,7 @@ except RequestException as e:
|
||||
|
||||
<details><summary>compute</summary>
|
||||
|
||||
- /cloudapi/compute/abort_shared_snapshot_merge
|
||||
- /cloudapi/compute/affinityLabelRemove
|
||||
- /cloudapi/compute/affinityLabelSet
|
||||
- /cloudapi/compute/affinityRelations
|
||||
@@ -551,31 +596,58 @@ except RequestException as e:
|
||||
- /cloudapi/compute/antiAffinityRuleAdd
|
||||
- /cloudapi/compute/antiAffinityRuleRemove
|
||||
- /cloudapi/compute/antiAffinityRulesClear
|
||||
- /cloudapi/compute/attachGpu
|
||||
- /cloudapi/compute/attachPciDevice
|
||||
- /cloudapi/compute/bootDiskSet
|
||||
- /cloudapi/compute/cdEject
|
||||
- /cloudapi/compute/cdInsert
|
||||
- /cloudapi/compute/changeMac
|
||||
- /cloudapi/compute/change_mtu
|
||||
- /cloudapi/compute/change_security_groups
|
||||
- /cloudapi/compute/changeIp
|
||||
- /cloudapi/compute/changeLinkState
|
||||
- /cloudapi/compute/clone
|
||||
- /cloudapi/compute/createTemplate
|
||||
- /cloudapi/compute/delete
|
||||
- /cloudapi/compute/deleteCustomFields
|
||||
- /cloudapi/compute/delete_cpu_alignment_profile
|
||||
- /cloudapi/compute/detachGpu
|
||||
- /cloudapi/compute/detachPciDevice
|
||||
- /cloudapi/compute/disable
|
||||
- /cloudapi/compute/diskAdd
|
||||
- /cloudapi/compute/diskAttach
|
||||
- /cloudapi/compute/diskDel
|
||||
- /cloudapi/compute/diskDetach
|
||||
- /cloudapi/compute/diskResize
|
||||
- /cloudapi/compute/diskMigrate
|
||||
- /cloudapi/compute/diskSwitchToReplication
|
||||
- /cloudapi/compute/enable
|
||||
- /cloudapi/compute/get
|
||||
- /cloudapi/compute/getConsoleUrl
|
||||
- /cloudapi/compute/get_cpu_alignment_profile
|
||||
- /cloudapi/compute/guest_agent_disable
|
||||
- /cloudapi/compute/guest_agent_enable
|
||||
- /cloudapi/compute/guest_agent_execute
|
||||
- /cloudapi/compute/guest_agent_feature_update
|
||||
- /cloudapi/compute/list
|
||||
- /cloudapi/compute/listDeleted
|
||||
- /cloudapi/compute/migrateToZone
|
||||
- /cloudapi/compute/moveToRg
|
||||
- /cloudapi/compute/netAttach
|
||||
- /cloudapi/compute/netDetach
|
||||
- /cloudapi/compute/pause
|
||||
- /cloudapi/compute/pfwAdd
|
||||
- /cloudapi/compute/pfwDel
|
||||
- /cloudapi/compute/pfwList
|
||||
- /cloudapi/compute/pinToStack
|
||||
- /cloudapi/compute/pin_to_node
|
||||
- /cloudapi/compute/powerCycle
|
||||
- /cloudapi/compute/reboot
|
||||
- /cloudapi/compute/redeploy
|
||||
- /cloudapi/compute/reset
|
||||
- /cloudapi/compute/resize
|
||||
- /cloudapi/compute/restore
|
||||
- /cloudapi/compute/resume
|
||||
- /cloudapi/compute/setCustomFields
|
||||
- /cloudapi/compute/set_cpu_alignment_profile
|
||||
- /cloudapi/compute/snapshotCreate
|
||||
- /cloudapi/compute/snapshotList
|
||||
- /cloudapi/compute/snapshotRollback
|
||||
@@ -583,7 +655,7 @@ except RequestException as e:
|
||||
- /cloudapi/compute/stop
|
||||
- /cloudapi/compute/tagAdd
|
||||
- /cloudapi/compute/tagRemove
|
||||
- /cloudapi/compute/unpinFromStack
|
||||
- /cloudapi/compute/unpin_from_node
|
||||
- /cloudapi/compute/update
|
||||
- /cloudapi/compute/userGrant
|
||||
- /cloudapi/compute/userList
|
||||
@@ -594,6 +666,7 @@ except RequestException as e:
|
||||
|
||||
<details><summary>disks</summary>
|
||||
|
||||
- /cloudapi/disks/change_disk_storage_policy
|
||||
- /cloudapi/disks/create
|
||||
- /cloudapi/disks/delete
|
||||
- /cloudapi/disks/deleteDisks
|
||||
@@ -601,7 +674,6 @@ except RequestException as e:
|
||||
- /cloudapi/disks/limitIO
|
||||
- /cloudapi/disks/list
|
||||
- /cloudapi/disks/listDeleted
|
||||
- /cloudapi/disks/listTypes
|
||||
- /cloudapi/disks/listUnattached
|
||||
- /cloudapi/disks/rename
|
||||
- /cloudapi/disks/resize2
|
||||
@@ -642,6 +714,7 @@ except RequestException as e:
|
||||
|
||||
<details><summary>image</summary>
|
||||
|
||||
- /cloudapi/image/change_storage_policy
|
||||
- /cloudapi/image/create
|
||||
- /cloudapi/image/createVirtual
|
||||
- /cloudapi/image/delete
|
||||
@@ -664,11 +737,23 @@ except RequestException as e:
|
||||
|
||||
- /cloudapi/k8s/create
|
||||
- /cloudapi/k8s/delete
|
||||
- /cloudapi/k8s/deleteMasterFromGroup
|
||||
- /cloudapi/k8s/deleteWorkerFromGroup
|
||||
- /cloudapi/k8s/disable
|
||||
- /cloudapi/k8s/enable
|
||||
- /cloudapi/k8s/get
|
||||
- /cloudapi/k8s/getConfig
|
||||
- /cloudapi/k8s/getNodeAnnotations
|
||||
- /cloudapi/k8s/getNodeLabels
|
||||
- /cloudapi/k8s/getNodeTaints
|
||||
- /cloudapi/k8s/list
|
||||
- /cloudapi/k8s/listDeleted
|
||||
- /cloudapi/k8s/migrateToZone
|
||||
- /cloudapi/k8s/restore
|
||||
- /cloudapi/k8s/start
|
||||
- /cloudapi/k8s/stop
|
||||
- /cloudapi/k8s/update
|
||||
- /cloudapi/k8s/updateWorkerNodesMetaData
|
||||
- /cloudapi/k8s/workerReset
|
||||
- /cloudapi/k8s/workerRestart
|
||||
- /cloudapi/k8s/workersGroupAdd
|
||||
@@ -692,6 +777,7 @@ except RequestException as e:
|
||||
- /cloudapi/lb/backendServerDelete
|
||||
- /cloudapi/lb/backendServerUpdate
|
||||
- /cloudapi/lb/backendUpdate
|
||||
- /cloudapi/lb/configReset
|
||||
- /cloudapi/lb/create
|
||||
- /cloudapi/lb/delete
|
||||
- /cloudapi/lb/disable
|
||||
@@ -705,6 +791,13 @@ except RequestException as e:
|
||||
- /cloudapi/lb/list
|
||||
- /cloudapi/lb/listDeleted
|
||||
- /cloudapi/lb/makeHighlyAvailable
|
||||
- /cloudapi/lb/migrateToZone
|
||||
- /cloudapi/lb/restart
|
||||
- /cloudapi/lb/restore
|
||||
- /cloudapi/lb/start
|
||||
- /cloudapi/lb/stop
|
||||
- /cloudapi/lb/update
|
||||
- /cloudapi/lb/updateSysctlParams
|
||||
|
||||
</details>
|
||||
|
||||
@@ -715,16 +808,26 @@ except RequestException as e:
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>pcidevice</summary>
|
||||
|
||||
- /cloudapi/pcidevice/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>rg</summary>
|
||||
|
||||
- /cloudapi/rg/accessGrant
|
||||
- /cloudapi/rg/accessRevoke
|
||||
- /cloudapi/rg/add_storage_policy
|
||||
- /cloudapi/rg/create
|
||||
- /cloudapi/rg/del_storage_policy
|
||||
- /cloudapi/rg/delete
|
||||
- /cloudapi/rg/disable
|
||||
- /cloudapi/rg/enable
|
||||
- /cloudapi/rg/get
|
||||
- /cloudapi/rg/getResourceConsumption
|
||||
- /cloudapi/rg/list
|
||||
- /cloudapi/rg/listDeleted
|
||||
- /cloudapi/rg/removeDefNet
|
||||
- /cloudapi/rg/restore
|
||||
- /cloudapi/rg/setDefNet
|
||||
@@ -732,10 +835,28 @@ except RequestException as e:
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>stack</summary>
|
||||
<details><summary>security_group</summary>
|
||||
|
||||
- /cloudapi/stack/get
|
||||
- /cloudapi/stack/list
|
||||
- /cloudapi/security_group/get
|
||||
- /cloudapi/security_group/create
|
||||
- /cloudapi/security_group/create_rule
|
||||
- /cloudapi/security_group/delete
|
||||
- /cloudapi/security_group/delete_rule
|
||||
- /cloudapi/security_group/list
|
||||
- /cloudapi/security_group/update
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>sep</summary>
|
||||
|
||||
- /cloudapi/sep/listAvailableSepAndPools
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>storage_policy</summary>
|
||||
|
||||
- /cloudapi/storage_policy/get
|
||||
- /cloudapi/storage_policy/list
|
||||
|
||||
</details>
|
||||
|
||||
@@ -746,11 +867,33 @@ except RequestException as e:
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>trunk</summary>
|
||||
|
||||
- /cloudapi/trunk/get
|
||||
- /cloudapi/trunk/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>user</summary>
|
||||
|
||||
- /cloudapi/user/apiList
|
||||
- /cloudapi/user/brief
|
||||
- /cloudapi/user/get
|
||||
- /cloudapi/user/getAudit
|
||||
- /cloudapi/user/getResourceConsumption
|
||||
- /cloudapi/user/setData
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>vfpool</summary>
|
||||
|
||||
- /cloudapi/vfpool/get
|
||||
- /cloudapi/vfpool/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>vgpu</summary>
|
||||
|
||||
- /cloudapi/vgpu/list
|
||||
|
||||
</details>
|
||||
|
||||
@@ -760,13 +903,21 @@ except RequestException as e:
|
||||
- /cloudapi/vins/createInRG
|
||||
- /cloudapi/vins/delete
|
||||
- /cloudapi/vins/disable
|
||||
- /cloudapi/vins/dnsApply
|
||||
- /cloudapi/vins/enable
|
||||
- /cloudapi/vins/extNetConnect
|
||||
- /cloudapi/vins/extNetDisconnect
|
||||
- /cloudapi/vins/extNetList
|
||||
- /cloudapi/vins/get
|
||||
- /cloudapi/vins/ipList
|
||||
- /cloudapi/vins/ipRelease
|
||||
- /cloudapi/vins/ipReserve
|
||||
- /cloudapi/vins/list
|
||||
- /cloudapi/vins/listDeleted
|
||||
- /cloudapi/vins/migrateToZone
|
||||
- /cloudapi/vins/natRuleAdd
|
||||
- /cloudapi/vins/natRuleDel
|
||||
- /cloudapi/vins/natRuleList
|
||||
- /cloudapi/vins/restore
|
||||
- /cloudapi/vins/staticRouteAdd
|
||||
- /cloudapi/vins/staticRouteDel
|
||||
@@ -776,16 +927,202 @@ except RequestException as e:
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>zone</summary>
|
||||
|
||||
- /cloudapi/zone/get
|
||||
- /cloudapi/zone/list
|
||||
|
||||
</details>
|
||||
|
||||
#### Cloudbroker
|
||||
|
||||
<details><summary>account</summary>
|
||||
|
||||
- /cloudbroker/account/add_storage_policy
|
||||
- /cloudbroker/account/addUser
|
||||
- /cloudbroker/account/addZone
|
||||
- /cloudbroker/account/create
|
||||
- /cloudbroker/account/del_storage_policy
|
||||
- /cloudbroker/account/delete
|
||||
- /cloudbroker/account/deleteAccounts
|
||||
- /cloudbroker/account/deleteUser
|
||||
- /cloudbroker/account/disable
|
||||
- /cloudbroker/account/disableAccounts
|
||||
- /cloudbroker/account/enable
|
||||
- /cloudbroker/account/enableAccounts
|
||||
- /cloudbroker/account/get
|
||||
- /cloudbroker/account/getResourceConsumption
|
||||
- /cloudbroker/account/list
|
||||
- /cloudbroker/account/listDeleted
|
||||
- /cloudbroker/account/removeZone
|
||||
- /cloudbroker/account/restore
|
||||
- /cloudbroker/account/setCpuAllocationParameter
|
||||
- /cloudbroker/account/setCpuAllocationRatio
|
||||
- /cloudbroker/account/update
|
||||
- /cloudbroker/account/updateComputeFeatures
|
||||
- /cloudbroker/account/updateResourceTypes
|
||||
- /cloudbroker/account/updateUser
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>audit</summary>
|
||||
|
||||
- /cloudbroker/audit/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>bservice</summary>
|
||||
|
||||
- /cloudbroker/bservice/create
|
||||
- /cloudbroker/bservice/delete
|
||||
- /cloudbroker/bservice/disable
|
||||
- /cloudbroker/bservice/enable
|
||||
- /cloudbroker/bservice/get
|
||||
- /cloudbroker/bservice/groupAdd
|
||||
- /cloudbroker/bservice/groupComputeRemove
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>compute</summary>
|
||||
|
||||
- /cloudbroker/compute/affinityLabelRemove
|
||||
- /cloudbroker/compute/affinityLabelSet
|
||||
- /cloudbroker/compute/change_read_only
|
||||
- /cloudbroker/compute/change_security_groups
|
||||
- /cloudbroker/compute/clone
|
||||
- /cloudbroker/compute/delete
|
||||
- /cloudbroker/compute/migrate_storage_list
|
||||
- /cloudbroker/compute/start_migration_in
|
||||
- /cloudbroker/compute/start_migration_out
|
||||
- /cloudbroker/compute/stop_migration_in
|
||||
- /cloudbroker/compute/stop_migration_out
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>disks</summary>
|
||||
|
||||
- /cloudbroker/disks/change_disk_storage_policy
|
||||
- /cloudbroker/disks/create
|
||||
- /cloudbroker/disks/delete
|
||||
- /cloudbroker/disks/deleteDisks
|
||||
- /cloudbroker/disks/depresent
|
||||
- /cloudbroker/disks/fromPlatformDisk
|
||||
- /cloudbroker/disks/get
|
||||
- /cloudbroker/disks/limitIO
|
||||
- /cloudbroker/disks/list
|
||||
- /cloudbroker/disks/listDeleted
|
||||
- /cloudbroker/disks/listUnattached
|
||||
- /cloudbroker/disks/migrate
|
||||
- /cloudbroker/disks/migrate_abort
|
||||
- /cloudbroker/disks/migrate_status
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>extnet</summary>
|
||||
|
||||
- /cloudbroker/extnet/create
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>image</summary>
|
||||
|
||||
- /cloudbroker/image/change_storage_policy
|
||||
- /cloudbroker/image/createImage
|
||||
- /cloudbroker/image/get
|
||||
- /cloudbroker/image/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>kvmx86</summary>
|
||||
|
||||
- /cloudbroker/kvmx86/create
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>kvmx86</summary>
|
||||
|
||||
- /cloudbroker/kvmx86/createBlank
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>node</summary>
|
||||
|
||||
- /cloudbroker/node/add_ssh_identity
|
||||
- /cloudbroker/node/get_ssh_identity
|
||||
- /cloudbroker/node/update_description
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>rg</summary>
|
||||
|
||||
- /cloudbroker/rg/add_storage_policy
|
||||
- /cloudbroker/rg/create
|
||||
- /cloudbroker/rg/del_storage_policy
|
||||
- /cloudbroker/rg/get
|
||||
- /cloudbroker/rg/list
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>security_group</summary>
|
||||
|
||||
- /cloudbroker/security_group/create
|
||||
- /cloudbroker/security_group/create_rule
|
||||
- /cloudbroker/security_group/delete
|
||||
- /cloudbroker/security_group/delete_rule
|
||||
- /cloudbroker/security_group/get
|
||||
- /cloudbroker/security_group/list
|
||||
- /cloudbroker/security_group/update
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>storage_policy</summary>
|
||||
|
||||
- /cloudbroker/storage_policy/add_pool
|
||||
- /cloudbroker/storage_policy/create
|
||||
- /cloudbroker/storage_policy/delete
|
||||
- /cloudbroker/storage_policy/delete_pool
|
||||
- /cloudbroker/storage_policy/disable
|
||||
- /cloudbroker/storage_policy/enable
|
||||
- /cloudbroker/storage_policy/get
|
||||
- /cloudbroker/storage_policy/list
|
||||
- /cloudbroker/storage_policy/update
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>user</summary>
|
||||
|
||||
- /cloudbroker/user/block
|
||||
- /cloudbroker/user/create
|
||||
- /cloudbroker/user/get
|
||||
- /cloudbroker/user/list
|
||||
- /cloudbroker/user/unblock
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>vins</summary>
|
||||
|
||||
- /cloudbroker/vins/createInAccount
|
||||
- /cloudbroker/vins/createInRG
|
||||
- /cloudbroker/vins/get
|
||||
- /cloudbroker/vins/list
|
||||
- /cloudbroker/vins/update
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>vnfdev</summary>
|
||||
|
||||
- /cloudbroker/vnfdev/migrate_abort
|
||||
|
||||
</details>
|
||||
|
||||
#### System
|
||||
|
||||
<details><summary>info</summary>
|
||||
|
||||
- /system/info/version
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>usermanager</summary>
|
||||
|
||||
- /system/usermanager/whoami
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ authors = [
|
||||
{name = "Vladislav Nesterov"},
|
||||
{name = "Stanislav Karimov"},
|
||||
]
|
||||
version = "1.2.2"
|
||||
version = "2.0.0"
|
||||
|
||||
readme = "README.md"
|
||||
|
||||
@@ -13,7 +13,7 @@ requires-python = ">=3.12"
|
||||
|
||||
dependencies = [
|
||||
"requests>=2.32.3",
|
||||
"pydantic>=2.10.5",
|
||||
"pydantic==2.10.5",
|
||||
"pyyaml>=6.0.2",
|
||||
]
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
pre-commit==4.1.0
|
||||
pytest==8.3.5
|
||||
@@ -8,3 +8,15 @@ class API(_base.BaseAPI):
|
||||
cloudapi: CloudapiAPI
|
||||
cloudbroker: CloudbrokerAPI
|
||||
system: SystemAPI
|
||||
|
||||
@property
|
||||
def ca(self):
|
||||
return self.cloudapi
|
||||
|
||||
@property
|
||||
def cb(self):
|
||||
return self.cloudbroker
|
||||
|
||||
@property
|
||||
def sys(self):
|
||||
return self.system
|
||||
@@ -1,3 +1,5 @@
|
||||
from enum import Enum
|
||||
|
||||
from dynamix_sdk.utils import (
|
||||
AutoNameEnum as _AutoNameEnum,
|
||||
enum_auto as _enum_auto,
|
||||
@@ -23,19 +25,19 @@ class AffinityPolicy(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class AffinityTopology(str, _AutoNameEnum):
|
||||
vm = 'compute'
|
||||
node = _enum_auto()
|
||||
VM = 'compute'
|
||||
NODE = 'node'
|
||||
|
||||
|
||||
class BootDevice(str, _AutoNameEnum):
|
||||
cdrom = _enum_auto()
|
||||
hd = _enum_auto()
|
||||
network = _enum_auto()
|
||||
CDROM = 'cdrom'
|
||||
HD = 'hd'
|
||||
NETWORK = 'network'
|
||||
|
||||
|
||||
class Chipset(str, _AutoNameEnum):
|
||||
Q35 = _enum_auto()
|
||||
i440fx = _enum_auto()
|
||||
I440FX = 'i440fx'
|
||||
|
||||
|
||||
class Driver(str, _AutoNameEnum):
|
||||
@@ -59,27 +61,27 @@ class NetTypeForChangeIP(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class NumaAffinity(str, _AutoNameEnum):
|
||||
none = _enum_auto()
|
||||
strict = _enum_auto()
|
||||
loose = _enum_auto()
|
||||
NONE = 'none'
|
||||
STRICT = 'strict'
|
||||
LOOSE = 'loose'
|
||||
|
||||
|
||||
class TXMode(str, _AutoNameEnum):
|
||||
iothread = _enum_auto()
|
||||
selected_by_hypervisor = 'selected by hypervisor'
|
||||
timer = _enum_auto()
|
||||
IOTHREAD = 'iothread'
|
||||
SELECTED_BY_HYPERVISOR = 'selected by hypervisor'
|
||||
TIMER = 'timer'
|
||||
|
||||
|
||||
class Ioeventfd(str, _AutoNameEnum):
|
||||
off = _enum_auto()
|
||||
on = _enum_auto()
|
||||
selected_by_hypervisor = 'selected by hypervisor'
|
||||
OFF = 'off'
|
||||
ON = 'on'
|
||||
SELECTED_BY_HYPERVISOR = 'selected by hypervisor'
|
||||
|
||||
|
||||
class EventIdx(str, _AutoNameEnum):
|
||||
off = _enum_auto()
|
||||
on = _enum_auto()
|
||||
selected_by_hypervisor = 'selected by hypervisor'
|
||||
OFF = 'off'
|
||||
ON = 'on'
|
||||
SELECTED_BY_HYPERVISOR = 'selected by hypervisor'
|
||||
|
||||
|
||||
class ResourceGroupStatus(str, _AutoNameEnum):
|
||||
@@ -101,13 +103,13 @@ class LockStatus(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class VMFeature(str, _AutoNameEnum):
|
||||
changemac = _enum_auto()
|
||||
cpupin = _enum_auto()
|
||||
dpdk = _enum_auto()
|
||||
hugepages = _enum_auto()
|
||||
numa = _enum_auto()
|
||||
trunk = _enum_auto()
|
||||
vfnic = _enum_auto()
|
||||
CHANGEMAC = 'changemac'
|
||||
CPUPIN = 'cpupin'
|
||||
DPDK = 'dpdk'
|
||||
HUGEPAGES = 'hugepages'
|
||||
NUMA = 'numa'
|
||||
TRUNK = 'trunk'
|
||||
VFNIC = 'vfnic'
|
||||
|
||||
|
||||
class RGDefaultNetTypeForSet(str, _AutoNameEnum):
|
||||
@@ -122,10 +124,10 @@ class RGDefaultNetType(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class RGResourceType(str, _AutoNameEnum):
|
||||
vm = 'compute'
|
||||
k8s = _enum_auto()
|
||||
lb = _enum_auto()
|
||||
vins = _enum_auto()
|
||||
VM = 'compute'
|
||||
K8S = 'k8s'
|
||||
LB = 'lb'
|
||||
VINS = 'vins'
|
||||
|
||||
|
||||
class DiskStatus(str, _AutoNameEnum):
|
||||
@@ -169,6 +171,8 @@ class VMTechStatus(str, _AutoNameEnum):
|
||||
DOWN = _enum_auto()
|
||||
MERGE = _enum_auto()
|
||||
MIGRATING = _enum_auto()
|
||||
MIGRATING_IN = _enum_auto()
|
||||
MIGRATING_OUT = _enum_auto()
|
||||
PAUSED = _enum_auto()
|
||||
PAUSING = _enum_auto()
|
||||
ROLLBACK = _enum_auto()
|
||||
@@ -180,11 +184,6 @@ class VMTechStatus(str, _AutoNameEnum):
|
||||
STOPPING = _enum_auto()
|
||||
|
||||
|
||||
class DiskType(str, _AutoNameEnum):
|
||||
B = _enum_auto()
|
||||
D = _enum_auto()
|
||||
|
||||
|
||||
class AccountStatus(str, _AutoNameEnum):
|
||||
CONFIRMED = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
@@ -194,11 +193,11 @@ class AccountStatus(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class AccountResourceType(str, _AutoNameEnum):
|
||||
vm = 'compute'
|
||||
k8s = _enum_auto()
|
||||
lb = _enum_auto()
|
||||
vins = _enum_auto()
|
||||
flipgroup = _enum_auto()
|
||||
VM = 'compute'
|
||||
K8S = 'k8s'
|
||||
LB = 'lb'
|
||||
VINS = 'vins'
|
||||
FLIPGROUP = 'flipgroup'
|
||||
|
||||
|
||||
class ImageTechStatus(str, _AutoNameEnum):
|
||||
@@ -215,16 +214,18 @@ class ImageStatus(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class ImageType(str, _AutoNameEnum):
|
||||
cdrom = _enum_auto()
|
||||
linux = _enum_auto()
|
||||
unknown = _enum_auto()
|
||||
virtual = _enum_auto()
|
||||
windows = _enum_auto()
|
||||
CDROM = 'cdrom'
|
||||
LINUX = 'linux'
|
||||
MULTI = 'multi'
|
||||
UNKNOWN = 'unknown'
|
||||
VIRTUAL = 'virtual'
|
||||
WINDOWS = 'windows'
|
||||
MEMORY_DUMP = 'memorydump'
|
||||
|
||||
|
||||
class NetIfaceNamingTemplate(str, _AutoNameEnum):
|
||||
ens = _enum_auto()
|
||||
eth = _enum_auto()
|
||||
ENS = 'ens'
|
||||
ETH = 'eth'
|
||||
|
||||
|
||||
class VINSStatus(str, _AutoNameEnum):
|
||||
@@ -286,17 +287,17 @@ class VINSInterfaceType(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class NATRuleProtocol(str, _AutoNameEnum):
|
||||
tcp = _enum_auto()
|
||||
udp = _enum_auto()
|
||||
TCP = 'tcp'
|
||||
UDP = 'udp'
|
||||
|
||||
|
||||
class VNFDevType(str, _AutoNameEnum):
|
||||
vyos = _enum_auto()
|
||||
VYOS = 'vyos'
|
||||
|
||||
|
||||
class BootMode(str, _AutoNameEnum):
|
||||
bios = _enum_auto()
|
||||
uefi = _enum_auto()
|
||||
BIOS = 'bios'
|
||||
UEFI = 'uefi'
|
||||
|
||||
|
||||
class BServiceStatus(str, _AutoNameEnum):
|
||||
@@ -354,6 +355,7 @@ class SEPType(str, _AutoNameEnum):
|
||||
TATLIN = _enum_auto()
|
||||
DORADO = _enum_auto()
|
||||
SHARED = _enum_auto()
|
||||
USTOR = _enum_auto()
|
||||
|
||||
|
||||
class ExtNetStatus(str, _AutoNameEnum):
|
||||
@@ -368,9 +370,9 @@ class ExtNetStatus(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class BootLoaderType(str, _AutoNameEnum):
|
||||
linux = _enum_auto()
|
||||
unknown = _enum_auto()
|
||||
windows = _enum_auto()
|
||||
LINUX = 'linux'
|
||||
UNKNOWN = 'unknown'
|
||||
WINDOWS = 'windows'
|
||||
|
||||
|
||||
class FlipGroupClientType(str, _AutoNameEnum):
|
||||
@@ -388,8 +390,8 @@ class FlipGroupNetType(str, _AutoNameEnum):
|
||||
|
||||
|
||||
class PoolDiskType(str, _AutoNameEnum):
|
||||
B = _enum_auto()
|
||||
D = _enum_auto()
|
||||
BOOT = 'B'
|
||||
DATA = 'D'
|
||||
ANY = _enum_auto()
|
||||
|
||||
|
||||
@@ -443,16 +445,6 @@ class DataDisksChangeMode(str, _AutoNameEnum):
|
||||
KEEP = _enum_auto()
|
||||
|
||||
|
||||
class PhysicalNodeStatus(str, _AutoNameEnum):
|
||||
DECOMMISSIONED = _enum_auto()
|
||||
DECOMMISSIONING = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
ERROR = _enum_auto()
|
||||
INSTALLING = _enum_auto()
|
||||
MAINTENANCE = _enum_auto()
|
||||
RESTRICTED = _enum_auto()
|
||||
|
||||
|
||||
class AuthBroker(str, _AutoNameEnum):
|
||||
DECS3O = 'decs3o'
|
||||
BVS = 'bvs'
|
||||
@@ -516,3 +508,152 @@ class DPDKNetStatus(str, _AutoNameEnum):
|
||||
DESTROYED = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
|
||||
|
||||
class VFPoolStatus(str, _AutoNameEnum):
|
||||
CREATED = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
|
||||
|
||||
class LinkState(str, _AutoNameEnum):
|
||||
ON = 'on'
|
||||
OFF = 'off'
|
||||
|
||||
|
||||
class ZoneStatus(str, _AutoNameEnum):
|
||||
CREATED = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
|
||||
|
||||
class TrafficDirection(str, _AutoNameEnum):
|
||||
INBOUND = 'inbound'
|
||||
OUTBOUND = 'outbound'
|
||||
|
||||
|
||||
class SGRuleEthertype(str, _AutoNameEnum):
|
||||
IPV4 = 'IPv4'
|
||||
IPV6 = 'IPv6'
|
||||
|
||||
|
||||
class SGRuleProtocol(str, _AutoNameEnum):
|
||||
ICMP = 'icmp'
|
||||
TCP = 'tcp'
|
||||
UDP = 'udp'
|
||||
|
||||
|
||||
class TrunkStatus(str, _AutoNameEnum):
|
||||
CREATED = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
DESTROYING = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
ENABLING = _enum_auto()
|
||||
MODELED = _enum_auto()
|
||||
|
||||
|
||||
class StoragePolicyStatus(str, _AutoNameEnum):
|
||||
DESTROYED = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
|
||||
|
||||
class JobStatus(str, _AutoNameEnum):
|
||||
ABORTED = _enum_auto()
|
||||
CLEANUPED = _enum_auto()
|
||||
ERROR = _enum_auto()
|
||||
OK = _enum_auto()
|
||||
PROCESSING = _enum_auto()
|
||||
SCHEDULED = _enum_auto()
|
||||
|
||||
|
||||
class PGPUProcessorType(str, _AutoNameEnum):
|
||||
NVIDIA = _enum_auto()
|
||||
DUMMY = _enum_auto()
|
||||
|
||||
|
||||
class PGPUMode(str, _AutoNameEnum):
|
||||
PASSTHROUGH = _enum_auto()
|
||||
|
||||
|
||||
class VGPUStatus(str, _AutoNameEnum):
|
||||
ALLOCATED = _enum_auto()
|
||||
ALLOCATING = _enum_auto()
|
||||
CLAIMED = _enum_auto()
|
||||
CLAIMING = _enum_auto()
|
||||
CREATED = _enum_auto()
|
||||
DEALLOCATED = _enum_auto()
|
||||
DEALLOCATING = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
ERROR = _enum_auto()
|
||||
|
||||
|
||||
class NetMapSourceType(str, _AutoNameEnum):
|
||||
NETWORK = 'network'
|
||||
BRIDGE = 'bridge'
|
||||
|
||||
|
||||
class DiskMigrateJobType(int, Enum):
|
||||
PULL = 1
|
||||
COPY = 2
|
||||
COMMIT = 3
|
||||
|
||||
|
||||
class PCIDeviceStatus(str, _AutoNameEnum):
|
||||
CLAIMED = _enum_auto()
|
||||
CLAIMING = _enum_auto()
|
||||
DESTROYED = _enum_auto()
|
||||
DISABLED = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
ERROR = _enum_auto()
|
||||
|
||||
|
||||
class CPUAllocationMode(str, _AutoNameEnum):
|
||||
STRICT = 'strict'
|
||||
LOOSE = 'loose'
|
||||
|
||||
|
||||
class SEPTechStatus(str, _AutoNameEnum):
|
||||
DISABLED = _enum_auto()
|
||||
ENABLED = _enum_auto()
|
||||
|
||||
|
||||
class DiskCacheMode(str, _AutoNameEnum):
|
||||
NONE = 'none'
|
||||
WRITETHROUGH = 'writethrough'
|
||||
|
||||
|
||||
class DiskBlockSize(str, _AutoNameEnum):
|
||||
VAL_512 = '512'
|
||||
VAL_512E = '512e'
|
||||
VAL_4K = '4k'
|
||||
|
||||
|
||||
class CPUAllocationParam(str, _AutoNameEnum):
|
||||
STRICT = 'strict'
|
||||
LOOSE = 'loose'
|
||||
NONE = ''
|
||||
|
||||
|
||||
class DiskProvisionType(str, _AutoNameEnum):
|
||||
THICK = 'thick'
|
||||
THIN = 'thin'
|
||||
|
||||
|
||||
class DRSDXSSOType(str, _AutoNameEnum):
|
||||
BVS = 'bvs'
|
||||
DECS3O = 'decs3o'
|
||||
NONE = ''
|
||||
|
||||
|
||||
class ClockSyncMode(str, _AutoNameEnum):
|
||||
DEFAULT = 'default'
|
||||
LINUX = 'linux'
|
||||
WINDOWS = 'windows'
|
||||
NONE = 'none'
|
||||
|
||||
|
||||
class DiskDiscard(str, _AutoNameEnum):
|
||||
UNMAP = 'unmap'
|
||||
IGNORE = 'ignore'
|
||||
@@ -5,6 +5,7 @@ from . import enums as _enums
|
||||
class DiskAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
name: str
|
||||
size_gb: int
|
||||
storage_policy_id: int
|
||||
|
||||
description: None | str = None
|
||||
image_id: None | int = None
|
||||
@@ -13,16 +14,89 @@ class DiskAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
|
||||
|
||||
class InterfaceAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
enabled: bool = True
|
||||
net_id: int
|
||||
net_prefix: None | int = None
|
||||
net_type: _enums.NetType
|
||||
sdn_logical_port_id: str
|
||||
sdn_logical_port_id: None | str = None
|
||||
security_group_ids: None | list[int] = None
|
||||
security_group_mode: bool = False
|
||||
sdn_segment_id: None | str = None
|
||||
sdn_object_group_id: None | str = None
|
||||
sdn_logical_port_display_name: None | str = None
|
||||
sdn_logical_port_description: None | str = None
|
||||
|
||||
ip_addr: None | str = None
|
||||
mac: None | str = None
|
||||
mtu: None | int = None
|
||||
|
||||
|
||||
class CloudbrokerKvmx86CreateDataDiskAPIParamsNM(
|
||||
_base.BaseAPIParamsNestedModel,
|
||||
):
|
||||
disk_name: str
|
||||
size: int
|
||||
storage_policy_id: int
|
||||
sep_id: int | None = None
|
||||
pool: str | None = None
|
||||
desc: str | None = None
|
||||
image_id: int | None = None
|
||||
cache: _enums.DiskCacheMode | None = None
|
||||
discard: _enums.DiskDiscard | None = None
|
||||
|
||||
|
||||
class CloudbrokerKvmx86CreateInterfaceAPIParamsNM(
|
||||
_base.BaseAPIParamsNestedModel,
|
||||
):
|
||||
net_type: _enums.NetType
|
||||
net_id: int
|
||||
ip_addr: str | None = None
|
||||
net_mask: int | None = None
|
||||
mtu: int | None = None
|
||||
mac: str | None = None
|
||||
sdn_interface_id: str | None = None
|
||||
sdn_segment_id: str | None = None
|
||||
sdn_object_group_ids: list[str] | None = None
|
||||
sdn_logical_port_display_name: str | None = None
|
||||
sdn_logical_port_description: str | None = None
|
||||
enable_default_gateway: bool = True
|
||||
security_groups: list[int] | None = None
|
||||
enable_secgroups: bool = False
|
||||
enabled: bool = True
|
||||
|
||||
|
||||
class RouteAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
dst_net_ip: str
|
||||
dst_net_mask: str
|
||||
gateway: str
|
||||
|
||||
|
||||
class CloudbrokerVinsCreateRouteAPIParamsNM(
|
||||
_base.BaseAPIParamsNestedModel,
|
||||
):
|
||||
destination: str
|
||||
netmask: str
|
||||
gateway: str
|
||||
|
||||
|
||||
class StoragePolicyQuotasAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
id: int
|
||||
storage_size_gb: int
|
||||
|
||||
|
||||
class SEPPoolsAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
pool_names: list[str]
|
||||
sep_id: int
|
||||
|
||||
|
||||
class OSUserAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
guid: str
|
||||
login: str
|
||||
password: str
|
||||
ssh_public_key: str
|
||||
|
||||
|
||||
class NetMapConfigAPIParamsNM(_base.BaseAPIParamsNestedModel):
|
||||
target_dev: str
|
||||
source_type: _enums.NetMapSourceType
|
||||
source_value: str
|
||||
File diff suppressed because it is too large.
Load diff
@@ -13,11 +13,18 @@ from .k8s import *
|
||||
from .kvmx86 import *
|
||||
from .lb import *
|
||||
from .locations import *
|
||||
from .pcidevice import *
|
||||
from .rg import *
|
||||
from .stack import *
|
||||
from .security_group import *
|
||||
from .sep import *
|
||||
from .storage_policy import *
|
||||
from .tasks import *
|
||||
from .trunk import *
|
||||
from .user import *
|
||||
from .vfpool import *
|
||||
from .vgpu import *
|
||||
from .vins import *
|
||||
from .zone import *
|
||||
|
||||
|
||||
class CloudapiAPI(_base.BaseAPI):
|
||||
@@ -35,8 +42,15 @@ class CloudapiAPI(_base.BaseAPI):
|
||||
kvmx86: CloudapiKvmx86API
|
||||
lb: CloudapiLbAPI
|
||||
locations: CloudapiLocationsAPI
|
||||
pcidevice: CloudapiPcideviceAPI
|
||||
rg: CloudapiRgAPI
|
||||
stack: CloudapiStackAPI
|
||||
security_group: CloudapiSecurityGroupAPI
|
||||
sep: CloudapiSepAPI
|
||||
storage_policy: CloudapiStoragePolicyAPI
|
||||
tasks: CloudapiTasksAPI
|
||||
trunk: CloudapiTrunkAPI
|
||||
user: CloudapiUserAPI
|
||||
vfpool: CloudapiVfpoolAPI
|
||||
vgpu: CloudapiVgpuAPI
|
||||
vins: CloudapiVinsAPI
|
||||
zone: CloudapiZoneAPI
|
||||
@@ -5,6 +5,7 @@ from .delete_user import *
|
||||
from .disable import *
|
||||
from .enable import *
|
||||
from .get import *
|
||||
from .get_resource_consumption import *
|
||||
from .list import *
|
||||
from .list_deleted import *
|
||||
from .restore import *
|
||||
@@ -14,16 +15,16 @@ from .update_user import *
|
||||
|
||||
class CloudapiAccountAPI(
|
||||
_base.BaseAPI,
|
||||
CloudapiAccountAddUserProtocol,
|
||||
CloudapiAccountDeleteProtocol,
|
||||
CloudapiAccountDeleteUserProtocol,
|
||||
CloudapiAccountDisableProtocol,
|
||||
CloudapiAccountEnableProtocol,
|
||||
CloudapiAccountGetProtocol,
|
||||
CloudapiAccountListDeletedProtocol,
|
||||
CloudapiAccountListProtocol,
|
||||
CloudapiAccountRestoreProtocol,
|
||||
CloudapiAccountUpdateProtocol,
|
||||
CloudapiAccountUpdateUserProtocol,
|
||||
):
|
||||
pass
|
||||
add_user: CloudapiAccountAddUserImpl
|
||||
restore: CloudapiAccountRestoreImpl
|
||||
delete: CloudapiAccountDeleteImpl
|
||||
disable: CloudapiAccountDisableImpl
|
||||
delete_user: CloudapiAccountDeleteUserImpl
|
||||
list: CloudapiAccountListImpl
|
||||
update_user: CloudapiAccountUpdateUserImpl
|
||||
get: CloudapiAccountGetImpl
|
||||
get_resource_consumption: CloudapiAccountGetResourceConsumptionImpl
|
||||
update: CloudapiAccountUpdateImpl
|
||||
list_deleted: CloudapiAccountListDeletedImpl
|
||||
enable: CloudapiAccountEnableImpl
|
||||
@@ -2,16 +2,14 @@ import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiAccountAddUserResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiAccountAddUserImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiAccountAddUserProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def add_user(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
access_type: _nested.AccessTypeForSet,
|
||||
user_name: str,
|
||||
) -> CloudapiAccountAddUserResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,15 +1,13 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiAccountDeleteResultStr(_base.BaseAPIResultStr):
|
||||
pass
|
||||
class CloudapiAccountDeleteImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiAccountDeleteProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def delete(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
permanently: bool = False,
|
||||
) -> CloudapiAccountDeleteResultStr:
|
||||
...
|
||||
) -> str:
|
||||
raise NotImplementedError
|
||||
@@ -1,15 +1,13 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiAccountDeleteUserResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiAccountDeleteUserImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiAccountDeleteUserProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def delete_user(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
user_name: str,
|
||||
) -> CloudapiAccountDeleteUserResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,14 +1,12 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiAccountDisableResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiAccountDisableImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiAccountDisableProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disable(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
) -> CloudapiAccountDisableResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,14 +1,12 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiAccountEnableResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiAccountEnableImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiAccountEnableProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def enable(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
) -> CloudapiAccountEnableResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -2,7 +2,7 @@ import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiAccountGetResultModel(_base.BaseAPIResultModel):
|
||||
class CloudapiAccountGetResultModel(_base.BaseModel):
|
||||
acc_lvl_vins_ids: list[int]
|
||||
acl: list[_nested.AccessAPIResultNM]
|
||||
company_url: str
|
||||
@@ -25,7 +25,9 @@ class CloudapiAccountGetResultModel(_base.BaseAPIResultModel):
|
||||
resource_types: list[_nested.AccountResourceType]
|
||||
send_access_emails: bool
|
||||
status: _nested.AccountStatus
|
||||
uniq_pools: list[str]
|
||||
storage_policy_ids: list[int]
|
||||
sep_pools: list[str]
|
||||
updated_by: str
|
||||
updated_timestamp: int
|
||||
version: int
|
||||
vins_count: int
|
||||
@@ -33,27 +35,29 @@ class CloudapiAccountGetResultModel(_base.BaseAPIResultModel):
|
||||
vm_features: list[_nested.VMFeature]
|
||||
zones: list[_nested.ZoneAPIResultNM]
|
||||
|
||||
@property
|
||||
def created_datetime(self):
|
||||
@_base.computed_field
|
||||
def created_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.created_timestamp)
|
||||
|
||||
@property
|
||||
def deactivation_datetime(self):
|
||||
@_base.computed_field
|
||||
def deactivation_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.deactivation_timestamp)
|
||||
|
||||
@property
|
||||
def deleted_datetime(self):
|
||||
@_base.computed_field
|
||||
def deleted_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
||||
|
||||
@property
|
||||
def updated_datetime(self):
|
||||
@_base.computed_field
|
||||
def updated_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
||||
|
||||
|
||||
class CloudapiAccountGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def get(
|
||||
class CloudapiAccountGetImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
) -> CloudapiAccountGetResultModel:
|
||||
...
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,24 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiAccountGetResourceConsumptionResultModel(
|
||||
_base.BaseModel,
|
||||
):
|
||||
id: int
|
||||
consumed: _nested.ResourceCountersAPIResultNM
|
||||
reserved: _nested.ResourceCountersAPIResultNM
|
||||
quotas: _nested.TenantQuotasForResourceConsumptionAPIResultNM
|
||||
|
||||
|
||||
class CloudapiAccountGetResourceConsumptionImpl(
|
||||
_base.APIFunctionImpl,
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
) -> CloudapiAccountGetResourceConsumptionResultModel:
|
||||
raise NotImplementedError
|
||||
@@ -2,21 +2,24 @@ import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiAccountListResultModel(_base.BaseAPIResultModel):
|
||||
data: list[_nested.AccountAPIResultNM]
|
||||
class CloudapiAccountListResultModel(_base.BaseModel):
|
||||
data: list[_nested.AccountForCAAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiAccountListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def list(
|
||||
class CloudapiAccountListImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
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,
|
||||
zone_id: None | int = None,
|
||||
page_number: int = 1,
|
||||
page_size: int = 100,
|
||||
sort_by: None | str = None,
|
||||
status: None | _nested.AccountStatus = None,
|
||||
) -> CloudapiAccountListResultModel:
|
||||
...
|
||||
raise NotImplementedError
|
||||
@@ -2,20 +2,22 @@ import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiAccountListDeletedResultModel(_base.BaseAPIResultModel):
|
||||
data: list[_nested.AccountAPIResultNM]
|
||||
class CloudapiAccountListDeletedResultModel(_base.BaseModel):
|
||||
data: list[_nested.AccountForCAAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiAccountListDeletedProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def list_deleted(
|
||||
class CloudapiAccountListDeletedImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
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,
|
||||
page_number: int = 1,
|
||||
page_size: int = 100,
|
||||
sort_by: None | str = None,
|
||||
) -> CloudapiAccountListDeletedResultModel:
|
||||
...
|
||||
raise NotImplementedError
|
||||
@@ -1,14 +1,12 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiAccountRestoreResultStr(_base.BaseAPIResultStr):
|
||||
pass
|
||||
class CloudapiAccountRestoreImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiAccountRestoreProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def restore(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
) -> CloudapiAccountRestoreResultStr:
|
||||
...
|
||||
) -> str:
|
||||
raise NotImplementedError
|
||||
@@ -1,25 +1,22 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiAccountUpdateResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiAccountUpdateImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiAccountUpdateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def update(
|
||||
def __call__(
|
||||
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,
|
||||
ext_ip_count_quota: None | int = None,
|
||||
ram_size_quota_mb: None | int = None,
|
||||
send_access_emails: None | bool = None,
|
||||
send_access_emails: bool | None = None,
|
||||
storage_size_quota_gb: None | int = None,
|
||||
uniq_pools: None | list[str] = None,
|
||||
sep_pools: None | list[str] = None,
|
||||
description: str | None = None,
|
||||
default_zone_id: int | None = None,
|
||||
) -> CloudapiAccountUpdateResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -2,16 +2,14 @@ import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiAccountUpdateUserResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiAccountUpdateUserImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiAccountUpdateUserProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def update_user(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
access_type: _nested.AccessTypeForSet,
|
||||
user_name: str,
|
||||
) -> CloudapiAccountUpdateUserResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,9 +1,10 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .get import *
|
||||
from .list import *
|
||||
|
||||
|
||||
class CloudapiAuditAPI(
|
||||
_base.BaseAPI,
|
||||
CloudapiAuditGetProtocol,
|
||||
):
|
||||
pass
|
||||
list: CloudapiAuditListImpl
|
||||
get: CloudapiAuditGetImpl
|
||||
@@ -1,33 +1,19 @@
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiAuditGetResultModel(_base.BaseAPIResultModel):
|
||||
args: str
|
||||
api_url_path: str
|
||||
guid: str
|
||||
kwargs: str
|
||||
client_ip_addr: str
|
||||
execution_time_sec: float
|
||||
result: str
|
||||
status_code: int
|
||||
request_timestamp: float
|
||||
response_timestamp: float
|
||||
user_name: str
|
||||
request_datetime_iso8601: str
|
||||
|
||||
@property
|
||||
def request_datetime(self):
|
||||
return self._get_datetime_from_timestamp(self.request_timestamp)
|
||||
|
||||
@property
|
||||
def response_datetime(self):
|
||||
return self._get_datetime_from_timestamp(self.response_timestamp)
|
||||
class CloudapiAuditGetResultModel(
|
||||
_nested.AuditAPIResultNM,
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiAuditGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def get(
|
||||
class CloudapiAuditGetImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
audit_guid: str,
|
||||
) -> CloudapiAuditGetResultModel:
|
||||
...
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,37 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiAuditListResultModel(_base.BaseModel):
|
||||
data: list[_nested.AuditAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiAuditListImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
account_id: int | None = None,
|
||||
api_url_path: str | None = None,
|
||||
bservice_id: int | None = None,
|
||||
exclude_audit_lines: bool = False,
|
||||
flip_group_id: int | None = None,
|
||||
request_id: str | None = None,
|
||||
k8s_id: int | None = None,
|
||||
lb_id: int | None = None,
|
||||
max_status_code: int | None = None,
|
||||
min_status_code: int | None = None,
|
||||
page_number: int = 1,
|
||||
page_size: int = 100,
|
||||
request_timestamp_end: int | None = None,
|
||||
request_timestamp_start: int | None = None,
|
||||
rg_id: int | None = None,
|
||||
sep_id: int | None = None,
|
||||
sort_by: str | None = None,
|
||||
user_name: str | None = None,
|
||||
vins_id: int | None = None,
|
||||
vm_id: int | None = None,
|
||||
) -> CloudapiAuditListResultModel:
|
||||
raise NotImplementedError
|
||||
@@ -10,7 +10,6 @@ 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 *
|
||||
@@ -18,34 +17,42 @@ from .group_update_extnet import *
|
||||
from .group_update_vins import *
|
||||
from .list import *
|
||||
from .list_deleted import *
|
||||
from .migrate_to_zone import *
|
||||
from .restore import *
|
||||
from .snapshot_create import *
|
||||
from .snapshot_delete import *
|
||||
from .snapshot_list import *
|
||||
from .snapshot_rollback import *
|
||||
from .start import *
|
||||
from .stop import *
|
||||
|
||||
|
||||
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
|
||||
group_start: CloudapiBserviceGroupStartImpl
|
||||
restore: CloudapiBserviceRestoreImpl
|
||||
delete: CloudapiBserviceDeleteImpl
|
||||
disable: CloudapiBserviceDisableImpl
|
||||
group_update: CloudapiBserviceGroupUpdateImpl
|
||||
snapshot_delete: CloudapiBserviceSnapshotDeleteImpl
|
||||
create: CloudapiBserviceCreateImpl
|
||||
stop: CloudapiBserviceStopImpl
|
||||
group_update_vins: CloudapiBserviceGroupUpdateVinsImpl
|
||||
list: CloudapiBserviceListImpl
|
||||
group_get: CloudapiBserviceGroupGetImpl
|
||||
snapshot_rollback: CloudapiBserviceSnapshotRollbackImpl
|
||||
start: CloudapiBserviceStartImpl
|
||||
snapshot_create: CloudapiBserviceSnapshotCreateImpl
|
||||
get: CloudapiBserviceGetImpl
|
||||
group_remove: CloudapiBserviceGroupRemoveImpl
|
||||
snapshot_list: CloudapiBserviceSnapshotListImpl
|
||||
group_add: CloudapiBserviceGroupAddImpl
|
||||
migrate_to_zone: CloudapiBserviceMigrateToZoneImpl
|
||||
group_parent_remove: CloudapiBserviceGroupParentRemoveImpl
|
||||
list_deleted: CloudapiBserviceListDeletedImpl
|
||||
group_stop: CloudapiBserviceGroupStopImpl
|
||||
group_update_extnet: CloudapiBserviceGroupUpdateExtnetImpl
|
||||
group_compute_remove: CloudapiBserviceGroupComputeRemoveImpl
|
||||
group_parent_add: CloudapiBserviceGroupParentAddImpl
|
||||
enable: CloudapiBserviceEnableImpl
|
||||
@@ -1,18 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceCreateResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
class CloudapiBserviceCreateImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiBserviceCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def create(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
rg_id: int,
|
||||
ssh_user: str | None = None,
|
||||
ssh_key: str | None = None,
|
||||
ssh_user_name: str | None = None,
|
||||
ssh_public_key: str | None = None,
|
||||
zone_id: int | None = None,
|
||||
) -> CloudapiBserviceCreateResultInt:
|
||||
...
|
||||
) -> int:
|
||||
raise NotImplementedError
|
||||
@@ -1,15 +1,13 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceDeleteResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiBserviceDeleteImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiBserviceDeleteProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def delete(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
permanently: bool = False,
|
||||
) -> CloudapiBserviceDeleteResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,14 +1,12 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceDisableResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiBserviceDisableImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiBserviceDisableProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disable(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
) -> CloudapiBserviceDisableResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,14 +1,12 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceEnableResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiBserviceEnableImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiBserviceEnableProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def enable(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
) -> CloudapiBserviceEnableResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -2,7 +2,7 @@ import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiBserviceGetResultModel(_base.BaseAPIResultModel):
|
||||
class CloudapiBserviceGetResultModel(_base.BaseModel):
|
||||
account_id: int
|
||||
account_name: str
|
||||
base_domain: str
|
||||
@@ -24,8 +24,8 @@ class CloudapiBserviceGetResultModel(_base.BaseAPIResultModel):
|
||||
rg_id: int
|
||||
rg_name: str
|
||||
snapshots: list[_nested.BServiceSnapshotAPIResultNM]
|
||||
ssh_key: str
|
||||
ssh_user: str
|
||||
ssh_public_key: str
|
||||
ssh_user_name: str
|
||||
status: _nested.BServiceStatus
|
||||
tech_status: _nested.BServiceTechStatus
|
||||
updated_by: str
|
||||
@@ -34,23 +34,25 @@ class CloudapiBserviceGetResultModel(_base.BaseAPIResultModel):
|
||||
vms: list[_nested.BServiceVMAPIResultNM]
|
||||
zone_id: int
|
||||
|
||||
@property
|
||||
def created_datetime(self):
|
||||
@_base.computed_field
|
||||
def created_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.created_timestamp)
|
||||
|
||||
@property
|
||||
def deleted_datetime(self):
|
||||
@_base.computed_field
|
||||
def deleted_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
||||
|
||||
@property
|
||||
def updated_datetime(self):
|
||||
@_base.computed_field
|
||||
def updated_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
||||
|
||||
|
||||
class CloudapiBserviceGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def get(
|
||||
class CloudapiBserviceGetImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
) -> CloudapiBserviceGetResultModel:
|
||||
...
|
||||
raise NotImplementedError
|
||||
@@ -2,22 +2,20 @@ import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiBserviceGroupAddResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
class CloudapiBserviceGroupAddImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiBserviceGroupAddProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def group_add(
|
||||
def __call__(
|
||||
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,
|
||||
storage_policy_id: int | None = None,
|
||||
ci_user_data: str | None = None,
|
||||
extnet_ids: list[int] | None = None,
|
||||
role: str | None = None,
|
||||
@@ -25,6 +23,6 @@ class CloudapiBserviceGroupAddProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
sep_pool_name: str | None = None,
|
||||
start_timeout: int | None = None,
|
||||
vins_ids: list[int] | None = None,
|
||||
chipset: _nested.Chipset = _nested.Chipset.i440fx,
|
||||
) -> CloudapiBserviceGroupAddResultInt:
|
||||
...
|
||||
chipset: _nested.Chipset = _nested.Chipset.Q35,
|
||||
) -> int:
|
||||
raise NotImplementedError
|
||||
@@ -1,18 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupComputeRemoveResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupComputeRemoveProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiBserviceGroupComputeRemoveImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def group_compute_remove(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
vm_id: int,
|
||||
) -> CloudapiBserviceGroupComputeRemoveResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -3,7 +3,7 @@ import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiBserviceGroupGetResultModel(
|
||||
_base.BaseAPIResultModel,
|
||||
_base.BaseModel,
|
||||
):
|
||||
account_id: int
|
||||
account_name: str
|
||||
@@ -29,7 +29,7 @@ class CloudapiBserviceGroupGetResultModel(
|
||||
rg_name: str
|
||||
role: str
|
||||
sep_id: int
|
||||
sep_pool_name: str
|
||||
sep_pool_name: str | None
|
||||
seq_no: int
|
||||
status: _nested.BServiceGroupStatus
|
||||
tech_status: _nested.BServiceGroupTechStatus
|
||||
@@ -39,23 +39,25 @@ class CloudapiBserviceGroupGetResultModel(
|
||||
vins_ids: list[int]
|
||||
vms: list[_nested.BServiceGroupVMAPIResultNM]
|
||||
|
||||
@property
|
||||
def created_datetime(self):
|
||||
@_base.computed_field
|
||||
def created_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.created_timestamp)
|
||||
|
||||
@property
|
||||
def deleted_datetime(self):
|
||||
@_base.computed_field
|
||||
def deleted_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
||||
|
||||
@property
|
||||
def updated_datetime(self):
|
||||
@_base.computed_field
|
||||
def updated_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
||||
|
||||
|
||||
class CloudapiBserviceGroupGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def group_get(
|
||||
class CloudapiBserviceGroupGetImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self, *,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int
|
||||
) -> CloudapiBserviceGroupGetResultModel:
|
||||
...
|
||||
raise NotImplementedError
|
||||
@@ -1,18 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupParentAddResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupParentAddProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiBserviceGroupParentAddImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def group_parent_add(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
child_id: int,
|
||||
parent_id: int,
|
||||
) -> CloudapiBserviceGroupParentAddResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,18 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupParentRemoveResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupParentRemoveProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiBserviceGroupParentRemoveImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def group_parent_remove(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
child_id: int,
|
||||
parent_id: int,
|
||||
) -> CloudapiBserviceGroupParentRemoveResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,14 +1,12 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupRemoveResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiBserviceGroupRemoveImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiBserviceGroupRemoveProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def group_remove(
|
||||
def __call__(
|
||||
self, *,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int
|
||||
) -> CloudapiBserviceGroupRemoveResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,23 +0,0 @@
|
||||
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:
|
||||
...
|
||||
@@ -1,15 +1,13 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupStartResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiBserviceGroupStartImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiBserviceGroupStartProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def group_start(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
) -> CloudapiBserviceGroupStartResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,16 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupStopResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiBserviceGroupStopImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiBserviceGroupStopProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def group_stop(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
force: bool = False,
|
||||
) -> CloudapiBserviceGroupStopResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,14 +1,12 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupUpdateResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupUpdateProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiBserviceGroupUpdateImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def group_update(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
@@ -19,5 +17,5 @@ class CloudapiBserviceGroupUpdateProtocol(
|
||||
name: str | None = None,
|
||||
ram_size_mb: int | None = None,
|
||||
role: str | None = None,
|
||||
) -> CloudapiBserviceGroupUpdateResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,18 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupUpdateExtnetResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupUpdateExtnetProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiBserviceGroupUpdateExtnetImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def group_update_extnet(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
extnet_ids: list[int] | None = None,
|
||||
) -> CloudapiBserviceGroupUpdateExtnetResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,18 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceGroupUpdateVinsResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiBserviceGroupUpdateVinsProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiBserviceGroupUpdateVinsImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def group_update_vins(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
bsgroup_id: int,
|
||||
vins_ids: list[int] | None = None,
|
||||
) -> CloudapiBserviceGroupUpdateVinsResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -2,25 +2,28 @@ import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiBserviceListResultModel(_base.BaseAPIResultModel):
|
||||
class CloudapiBserviceListResultModel(_base.BaseModel):
|
||||
data: list[_nested.BServiceAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiBserviceListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def list(
|
||||
class CloudapiBserviceListImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
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,
|
||||
zone_id: int | None = None,
|
||||
page_number: int = 1,
|
||||
page_size: int = 100,
|
||||
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:
|
||||
...
|
||||
raise NotImplementedError
|
||||
@@ -2,19 +2,21 @@ import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiBserviceListDeletedResultModel(_base.BaseAPIResultModel):
|
||||
class CloudapiBserviceListDeletedResultModel(_base.BaseModel):
|
||||
data: list[_nested.BServiceAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiBserviceListDeletedProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def list_deleted(
|
||||
class CloudapiBserviceListDeletedImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
account_id: int | None = None,
|
||||
page_number: int | None = None,
|
||||
page_size: int | None = None,
|
||||
page_number: int = 1,
|
||||
page_size: int = 100,
|
||||
rg_id: int | None = None,
|
||||
sort_by: str | None = None,
|
||||
) -> CloudapiBserviceListDeletedResultModel:
|
||||
...
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,13 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceMigrateToZoneImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
zone_id: int,
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,14 +1,12 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceRestoreResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiBserviceRestoreImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiBserviceRestoreProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def restore(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
) -> CloudapiBserviceRestoreResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceSnapshotCreateImpl(
|
||||
_base.APIFunctionImpl,
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
label: str,
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceSnapshotDeleteImpl(
|
||||
_base.APIFunctionImpl,
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
label: str,
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiBserviceSnapshotListResultModel(_base.BaseModel):
|
||||
data: list[_nested.BServiceSnapshotAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiBserviceSnapshotListImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
) -> CloudapiBserviceSnapshotListResultModel:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceSnapshotRollbackImpl(
|
||||
_base.APIFunctionImpl,
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
label: str,
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,14 +1,12 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceStartResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiBserviceStartImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiBserviceStartProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def start(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
) -> CloudapiBserviceStartResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,14 +1,12 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiBserviceStopResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiBserviceStopImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiBserviceStopProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def stop(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bservice_id: int,
|
||||
) -> CloudapiBserviceStopResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,4 +1,5 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .abort_shared_snapshot_merge import *
|
||||
from .affinity_label_remove import *
|
||||
from .affinity_label_set import *
|
||||
from .affinity_relations import *
|
||||
@@ -8,30 +9,57 @@ from .affinity_rules_clear import *
|
||||
from .anti_affinity_rule_add import *
|
||||
from .anti_affinity_rule_remove import *
|
||||
from .anti_affinity_rules_clear import *
|
||||
from .attach_gpu import *
|
||||
from .attach_pci_device import *
|
||||
from .boot_disk_set import *
|
||||
from .cd_eject import *
|
||||
from .cd_insert import *
|
||||
from .change_ip import *
|
||||
from .change_link_state import *
|
||||
from .change_mac import *
|
||||
from .change_mtu import *
|
||||
from .change_security_groups import *
|
||||
from .clone import *
|
||||
from .create_template import *
|
||||
from .delete import *
|
||||
from .delete_custom_fields import *
|
||||
from .delete_cpu_alignment_profile import *
|
||||
from .detach_gpu import *
|
||||
from .detach_pci_device import *
|
||||
from .disable import *
|
||||
from .disk_add import *
|
||||
from .disk_attach import *
|
||||
from .disk_migrate import *
|
||||
from .disk_del import *
|
||||
from .disk_detach import *
|
||||
from .disk_resize import *
|
||||
from .disk_switch_to_replication import *
|
||||
from .enable import *
|
||||
from .get import *
|
||||
from .get_console_url import *
|
||||
from .get_cpu_alignment_profile import *
|
||||
from .guest_agent_disable import *
|
||||
from .guest_agent_enable import *
|
||||
from .guest_agent_execute import *
|
||||
from .guest_agent_feature_update import *
|
||||
from .list import *
|
||||
from .list_deleted import *
|
||||
from .migrate_to_zone import *
|
||||
from .move_to_rg import *
|
||||
from .net_attach import *
|
||||
from .net_detach import *
|
||||
from .pause import *
|
||||
from .pfw_add import *
|
||||
from .pfw_del import *
|
||||
from .pfw_list import *
|
||||
from .pin_to_stack import *
|
||||
from .pin_to_node import *
|
||||
from .power_cycle import *
|
||||
from .reboot import *
|
||||
from .redeploy import *
|
||||
from .reset import *
|
||||
from .resize import *
|
||||
from .restore import *
|
||||
from .resume import *
|
||||
from .set_cpu_alignment_profile import *
|
||||
from .set_custom_fields import *
|
||||
from .snapshot_create import *
|
||||
from .snapshot_list import *
|
||||
@@ -40,7 +68,7 @@ from .start import *
|
||||
from .stop import *
|
||||
from .tag_add import *
|
||||
from .tag_remove import *
|
||||
from .unpin_from_stack import *
|
||||
from .unpin_from_node import *
|
||||
from .update import *
|
||||
from .user_grant import *
|
||||
from .user_list import *
|
||||
@@ -50,52 +78,79 @@ 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
|
||||
get: CloudapiComputeGetImpl
|
||||
redeploy: CloudapiComputeRedeployImpl
|
||||
disk_switch_to_replication: CloudapiComputeDiskSwitchToReplicationImpl
|
||||
pin_to_node: CloudapiComputePinToNodeImpl
|
||||
change_ip: CloudapiComputeChangeIpImpl
|
||||
anti_affinity_rules_clear: CloudapiComputeAntiAffinityRulesClearImpl
|
||||
power_cycle: CloudapiComputePowerCycleImpl
|
||||
pfw_del: CloudapiComputePfwDelImpl
|
||||
restore: CloudapiComputeRestoreImpl
|
||||
change_mtu: CloudapiComputeChangeMtuImpl
|
||||
delete: CloudapiComputeDeleteImpl
|
||||
pfw_add: CloudapiComputePfwAddImpl
|
||||
affinity_label_set: CloudapiComputeAffinityLabelSetImpl
|
||||
disable: CloudapiComputeDisableImpl
|
||||
pfw_list: CloudapiComputePfwListImpl
|
||||
net_attach: CloudapiComputeNetAttachImpl
|
||||
user_revoke: CloudapiComputeUserRevokeImpl
|
||||
reset: CloudapiComputeResetImpl
|
||||
user_grant: CloudapiComputeUserGrantImpl
|
||||
anti_affinity_rule_add: CloudapiComputeAntiAffinityRuleAddImpl
|
||||
disk_del: CloudapiComputeDiskDelImpl
|
||||
change_link_state: CloudapiComputeChangeLinkStateImpl
|
||||
clone: CloudapiComputeCloneImpl
|
||||
guest_agent_feature_update: CloudapiComputeGuestAgentFeatureUpdateImpl
|
||||
pause: CloudapiComputePauseImpl
|
||||
change_mac: CloudapiComputeChangeMacImpl
|
||||
detach_pci_device: CloudapiComputeDetachPciDeviceImpl
|
||||
attach_pci_device: CloudapiComputeAttachPciDeviceImpl
|
||||
user_update: CloudapiComputeUserUpdateImpl
|
||||
abort_shared_snapshot_merge: CloudapiComputeAbortSharedSnapshotMergeImpl
|
||||
cd_insert: CloudapiComputeCdInsertImpl
|
||||
user_list: CloudapiComputeUserListImpl
|
||||
guest_agent_disable: CloudapiComputeGuestAgentDisableImpl
|
||||
unpin_from_node: CloudapiComputeUnpinFromNodeImpl
|
||||
cd_eject: CloudapiComputeCdEjectImpl
|
||||
detach_gpu: CloudapiComputeDetachGpuImpl
|
||||
move_to_rg: CloudapiComputeMoveToRgImpl
|
||||
stop: CloudapiComputeStopImpl
|
||||
affinity_relations: CloudapiComputeAffinityRelationsImpl
|
||||
boot_disk_set: CloudapiComputeBootDiskSetImpl
|
||||
disk_migrate: CloudapiComputeDiskMigrateImpl
|
||||
disk_detach: CloudapiComputeDiskDetachImpl
|
||||
affinity_label_remove: CloudapiComputeAffinityLabelRemoveImpl
|
||||
list: CloudapiComputeListImpl
|
||||
resume: CloudapiComputeResumeImpl
|
||||
resize: CloudapiComputeResizeImpl
|
||||
affinity_rule_add: CloudapiComputeAffinityRuleAddImpl
|
||||
snapshot_rollback: CloudapiComputeSnapshotRollbackImpl
|
||||
guest_agent_execute: CloudapiComputeGuestAgentExecuteImpl
|
||||
start: CloudapiComputeStartImpl
|
||||
snapshot_create: CloudapiComputeSnapshotCreateImpl
|
||||
tag_add: CloudapiComputeTagAddImpl
|
||||
net_detach: CloudapiComputeNetDetachImpl
|
||||
anti_affinity_rule_remove: CloudapiComputeAntiAffinityRuleRemoveImpl
|
||||
change_security_groups: CloudapiComputeChangeSecurityGroupsImpl
|
||||
snapshot_list: CloudapiComputeSnapshotListImpl
|
||||
update: CloudapiComputeUpdateImpl
|
||||
get_console_url: CloudapiComputeGetConsoleUrlImpl
|
||||
disk_attach: CloudapiComputeDiskAttachImpl
|
||||
tag_remove: CloudapiComputeTagRemoveImpl
|
||||
disk_add: CloudapiComputeDiskAddImpl
|
||||
attach_gpu: CloudapiComputeAttachGpuImpl
|
||||
affinity_rule_remove: CloudapiComputeAffinityRuleRemoveImpl
|
||||
migrate_to_zone: CloudapiComputeMigrateToZoneImpl
|
||||
affinity_rules_clear: CloudapiComputeAffinityRulesClearImpl
|
||||
reboot: CloudapiComputeRebootImpl
|
||||
delete_custom_fields: CloudapiComputeDeleteCustomFieldsImpl
|
||||
set_custom_fields: CloudapiComputeSetCustomFieldsImpl
|
||||
list_deleted: CloudapiComputeListDeletedImpl
|
||||
create_template: CloudapiComputeCreateTemplateImpl
|
||||
guest_agent_enable: CloudapiComputeGuestAgentEnableImpl
|
||||
enable: CloudapiComputeEnableImpl
|
||||
get_cpu_alignment_profile: CloudapiComputeGetCpuAlignmentProfileImpl
|
||||
set_cpu_alignment_profile: CloudapiComputeSetCpuAlignmentProfileImpl
|
||||
delete_cpu_alignment_profile: CloudapiComputeDeleteCpuAlignmentProfileImpl
|
||||
@@ -0,0 +1,16 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeAbortSharedSnapshotMergeImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
label: str,
|
||||
async_mode: bool = False,
|
||||
) -> str:
|
||||
raise NotImplementedError
|
||||
@@ -1,16 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeAffinityLabelRemoveResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAffinityLabelRemoveProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiComputeAffinityLabelRemoveImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def affinity_label_remove(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeAffinityLabelRemoveResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,17 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeAffinityLabelSetResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAffinityLabelSetProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiComputeAffinityLabelSetImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def affinity_label_set(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
affinity_label: str,
|
||||
) -> CloudapiComputeAffinityLabelSetResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -3,18 +3,19 @@ from dynamix_sdk.api import _nested
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRelationsResultModel(
|
||||
_base.BaseAPIResultModel,
|
||||
_nested.AffinityRelationsAPIResultNM,
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRelationsProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiComputeAffinityRelationsImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def affinity_relations(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeAffinityRelationsResultModel:
|
||||
...
|
||||
raise NotImplementedError
|
||||
@@ -2,14 +2,12 @@ import dynamix_sdk.base as _base
|
||||
from dynamix_sdk.api import _nested
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRuleAddResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRuleAddProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiComputeAffinityRuleAddImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def affinity_rule_add(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
@@ -18,5 +16,5 @@ class CloudapiComputeAffinityRuleAddProtocol(
|
||||
mode: _nested.AffinityMode,
|
||||
key: str,
|
||||
value: str,
|
||||
) -> CloudapiComputeAffinityRuleAddResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -2,14 +2,12 @@ import dynamix_sdk.base as _base
|
||||
from dynamix_sdk.api import _nested
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRuleRemoveResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRuleRemoveProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiComputeAffinityRuleRemoveImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def affinity_rule_remove(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
@@ -18,5 +16,5 @@ class CloudapiComputeAffinityRuleRemoveProtocol(
|
||||
mode: _nested.AffinityMode,
|
||||
key: str,
|
||||
value: str,
|
||||
) -> CloudapiComputeAffinityRuleRemoveResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,16 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRulesClearResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAffinityRulesClearProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiComputeAffinityRulesClearImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def affinity_rules_clear(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeAffinityRulesClearResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -2,14 +2,12 @@ import dynamix_sdk.base as _base
|
||||
from dynamix_sdk.api import _nested
|
||||
|
||||
|
||||
class CloudapiComputeAntiAffinityRuleAddResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAntiAffinityRuleAddProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiComputeAntiAffinityRuleAddImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def anti_affinity_rule_add(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
@@ -18,5 +16,5 @@ class CloudapiComputeAntiAffinityRuleAddProtocol(
|
||||
mode: _nested.AffinityMode,
|
||||
key: str,
|
||||
value: str,
|
||||
) -> CloudapiComputeAntiAffinityRuleAddResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -2,14 +2,12 @@ import dynamix_sdk.base as _base
|
||||
from dynamix_sdk.api import _nested
|
||||
|
||||
|
||||
class CloudapiComputeAntiAffinityRuleRemoveResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAntiAffinityRuleRemoveProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiComputeAntiAffinityRuleRemoveImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def anti_affinity_rule_remove(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
@@ -18,5 +16,5 @@ class CloudapiComputeAntiAffinityRuleRemoveProtocol(
|
||||
mode: _nested.AffinityMode,
|
||||
key: str,
|
||||
value: str,
|
||||
) -> CloudapiComputeAntiAffinityRuleRemoveResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,16 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeAntiAffinityRulesClearResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeAntiAffinityRulesClearProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiComputeAntiAffinityRulesClearImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def anti_affinity_rules_clear(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeAntiAffinityRulesClearResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,13 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeAttachGpuImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
vgpu_id: int,
|
||||
) -> int:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeAttachPciDeviceImpl(
|
||||
_base.APIFunctionImpl,
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
pci_device_id: int,
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,13 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeBootDiskSetImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,14 +1,13 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeCdEjectResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiComputeCdEjectImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiComputeCdEjectProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def cd_eject(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeCdEjectResultBool:
|
||||
...
|
||||
async_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -1,15 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeCdInsertResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiComputeCdInsertImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiComputeCdInsertProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def cd_insert(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
cdrom_image_id: int,
|
||||
) -> CloudapiComputeCdInsertResultBool:
|
||||
...
|
||||
async_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -2,17 +2,16 @@ import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeChangeIpResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiComputeChangeIpImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiComputeChangeIpProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def change_ip(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
net_type: _nested.NetTypeForChangeIP,
|
||||
net_id: int,
|
||||
ip_addr: str,
|
||||
) -> CloudapiComputeChangeIpResultBool:
|
||||
...
|
||||
async_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeChangeLinkStateImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
interface: str,
|
||||
state: _nested.LinkState,
|
||||
vm_id: int,
|
||||
async_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeChangeMacImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
current_mac: str,
|
||||
new_mac: str,
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeChangeMtuImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
interface: str,
|
||||
mtu: int,
|
||||
async_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeChangeSecurityGroupsImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
interface: str,
|
||||
security_group_ids: list[int] | None = None,
|
||||
security_group_mode: bool | None = None,
|
||||
async_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -1,18 +1,20 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeCloneResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
class CloudapiComputeCloneImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiComputeCloneProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def clone(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
name: str,
|
||||
force: bool = False,
|
||||
storage_policy_id: int,
|
||||
snapshot_timestamp: int | None = None,
|
||||
snapshot_name: str | None = None,
|
||||
) -> CloudapiComputeCloneResultInt:
|
||||
...
|
||||
sep_pool_name: str | None = None,
|
||||
sep_id: int | None = None,
|
||||
async_mode: bool = True,
|
||||
) -> str | int:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeCreateTemplateImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
name: str,
|
||||
async_mode: bool = True,
|
||||
) -> str | int:
|
||||
raise NotImplementedError
|
||||
@@ -1,16 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDeleteResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiComputeDeleteImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiComputeDeleteProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def delete(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
detach_disks: bool = False,
|
||||
permanently: bool = False,
|
||||
) -> CloudapiComputeDeleteResultBool:
|
||||
...
|
||||
async_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,12 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDeleteCpuAlignmentProfileImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_ids: list[int],
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,16 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDeleteCustomFieldsResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeDeleteCustomFieldsProtocol(
|
||||
_base.BasePostAPIFunctionProtocol
|
||||
class CloudapiComputeDeleteCustomFieldsImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
def delete_custom_fields(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeDeleteCustomFieldsResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,13 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDetachGpuImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
vgpu_id: int | None = None,
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDetachPciDeviceImpl(
|
||||
_base.APIFunctionImpl,
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
pci_device_id: int,
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDisableImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
async_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -1,23 +1,23 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeDiskAddResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
class CloudapiComputeDiskAddImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiComputeDiskAddProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disk_add(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
name: str,
|
||||
disk_size_gb: int,
|
||||
disk_type: _nested.DiskType = _nested.DiskType.D,
|
||||
storage_policy_id: int,
|
||||
sep_id: int | None = None,
|
||||
sep_pool_name: str | None = None,
|
||||
description: str | None = None,
|
||||
image_id: int | None = None,
|
||||
|
||||
) -> CloudapiComputeDiskAddResultInt:
|
||||
...
|
||||
pci_slot_num_hex: str | None = None,
|
||||
bus_num_hex: str | None = None,
|
||||
async_mode: bool = False,
|
||||
read_only_mode: bool = False,
|
||||
) -> int | str:
|
||||
raise NotImplementedError
|
||||
@@ -1,17 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeDiskAttachResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiComputeDiskAttachImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiComputeDiskAttachProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disk_attach(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
disk_type: _nested.DiskType = _nested.DiskType.D,
|
||||
) -> CloudapiComputeDiskAttachResultBool:
|
||||
...
|
||||
pci_slot_num_hex: str | None = None,
|
||||
bus_num_hex: str | None = None,
|
||||
async_mode: bool = False,
|
||||
read_only_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -1,16 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDiskDelResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiComputeDiskDelImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiComputeDiskDelProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disk_del(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
permanently: bool = True,
|
||||
) -> CloudapiComputeDiskDelResultBool:
|
||||
...
|
||||
async_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -1,15 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDiskDetachResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiComputeDiskDetachImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiComputeDiskDetachProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disk_detach(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
) -> CloudapiComputeDiskDetachResultBool:
|
||||
...
|
||||
async_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDiskMigrateImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
target_disk_id: int,
|
||||
mode: int = 1,
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,16 +0,0 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDiskResizeResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiComputeDiskResizeProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disk_resize(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
disk_size_gb: int,
|
||||
) -> CloudapiComputeDiskResizeResultBool:
|
||||
...
|
||||
@@ -0,0 +1,17 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeDiskSwitchToReplicationImpl(
|
||||
_base.APIFunctionImpl,
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
disk_id: int,
|
||||
stop_replication: bool = False,
|
||||
async_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,12 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeEnableImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -1,10 +1,8 @@
|
||||
import typing as _typing
|
||||
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeGetResultModel(_base.BaseAPIResultModel):
|
||||
class CloudapiComputeGetResultModel(_base.BaseModel):
|
||||
account_id: int
|
||||
account_name: str
|
||||
acl: _nested.VMACLAPIResultNM
|
||||
@@ -15,14 +13,18 @@ class CloudapiComputeGetResultModel(_base.BaseAPIResultModel):
|
||||
arch: str
|
||||
auto_start: bool
|
||||
boot_disk_size_gb: int
|
||||
boot_image_id: int
|
||||
boot_loader_metaiso: _nested.BootLoaderMetaisoAPIResultNM | None
|
||||
boot_loader_type: _nested.BootLoaderType
|
||||
boot_mode: _nested.BootMode
|
||||
boot_order: list[_nested.BootDevice]
|
||||
cdrom_image_id: int
|
||||
chipset: _nested.Chipset
|
||||
ci_user_data: dict
|
||||
clock_sync_mode: _nested.ClockSyncMode
|
||||
clone_ids: list[int]
|
||||
clone_reference: int
|
||||
cpu_alignment_profile: _nested.CPUAlignmentProfileAPIResultNM | dict
|
||||
cpu_count: int
|
||||
cpu_pin: bool
|
||||
created_by: str
|
||||
@@ -31,7 +33,7 @@ class CloudapiComputeGetResultModel(_base.BaseAPIResultModel):
|
||||
deleted_by: str
|
||||
deleted_timestamp: int
|
||||
description: str
|
||||
devices: dict
|
||||
pci_devices: dict[str, int]
|
||||
disks: list[_nested.DiskForCAComputeGetAPIResultNM]
|
||||
driver: _nested.Driver
|
||||
grid_id: int
|
||||
@@ -39,14 +41,14 @@ class CloudapiComputeGetResultModel(_base.BaseAPIResultModel):
|
||||
hot_resize: bool
|
||||
hp_backed: bool
|
||||
id: int
|
||||
image_id: int
|
||||
image_id: None | int
|
||||
image_name: None | str
|
||||
interfaces: list[_nested.InterfaceForComputeGetAPIResultNM]
|
||||
live_migration_job_id: int
|
||||
lock_status: _nested.LockStatus
|
||||
manager_id: int
|
||||
manager_type: str
|
||||
migration_job: int
|
||||
migration_job_id: int
|
||||
milestones: int
|
||||
name: str
|
||||
need_reboot: bool
|
||||
@@ -54,29 +56,31 @@ class CloudapiComputeGetResultModel(_base.BaseAPIResultModel):
|
||||
numa_affinity: _nested.NumaAffinity
|
||||
numa_node_id: int
|
||||
os_users: list[_nested.OSUserAPIResultNM]
|
||||
pinned_to_stack: bool
|
||||
os_version: str
|
||||
pinned_to_node: bool
|
||||
preferred_cpu_cores: list[int]
|
||||
ram_size_mb: int
|
||||
read_only: bool
|
||||
reference_id: str
|
||||
res_name: str
|
||||
reserved_cpu_cores: list[int]
|
||||
resized_online: bool
|
||||
rg_id: int
|
||||
rg_name: str
|
||||
snapshot_sets: list[_nested.SnapshotSetAPIResultNM]
|
||||
stateless_sep_id: int
|
||||
stateless_sep_type: str
|
||||
stateless_sep_id: int | None = None
|
||||
stateless_sep_type: str | None = None
|
||||
status: _nested.VMStatus
|
||||
tags: dict
|
||||
tech_status: _nested.VMTechStatus
|
||||
updated_by: str
|
||||
updated_timestamp: int
|
||||
user_managed: bool
|
||||
vgpus: list[dict[str, _typing.Any]]
|
||||
virtual_image_id: int
|
||||
virtual_image_name: None | str
|
||||
vgpus: list[_nested.VGPUAPIResultNM]
|
||||
vm_ci_id: int
|
||||
vnc_password: str
|
||||
guest_agent: _nested.GuestAgentAPIResultNM
|
||||
weight: int
|
||||
zone_id: int
|
||||
|
||||
natable_vins_id: int = 0
|
||||
@@ -85,23 +89,25 @@ class CloudapiComputeGetResultModel(_base.BaseAPIResultModel):
|
||||
natable_vins_network: str = ''
|
||||
natable_vins_network_name: str = ''
|
||||
|
||||
@property
|
||||
def created_datetime(self):
|
||||
@_base.computed_field
|
||||
def created_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.created_timestamp)
|
||||
|
||||
@property
|
||||
def deleted_datetime(self):
|
||||
@_base.computed_field
|
||||
def deleted_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
||||
|
||||
@property
|
||||
def updated_datetime(self):
|
||||
@_base.computed_field
|
||||
def updated_datetime(self) -> _base.datetime | None:
|
||||
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
||||
|
||||
|
||||
class CloudapiComputeGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def get(
|
||||
class CloudapiComputeGetImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeGetResultModel:
|
||||
...
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,12 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeGetConsoleUrlImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> str:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,18 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeGetCpuAlignmentProfileResultModel(_base.BaseModel):
|
||||
name: str | None = None
|
||||
vendor: str | None = None
|
||||
model: str | None = None
|
||||
|
||||
|
||||
class CloudapiComputeGetCpuAlignmentProfileImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.GET
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
) -> CloudapiComputeGetCpuAlignmentProfileResultModel:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeGuestAgentDisableImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
async_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeGuestAgentEnableImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
async_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,24 @@
|
||||
import typing as _typing
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeGuestAgentExecuteResultModel(
|
||||
_base.BaseModel,
|
||||
):
|
||||
exec_result: dict
|
||||
|
||||
|
||||
class CloudapiComputeGuestAgentExecuteImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
cmd: str,
|
||||
args: dict[str, _typing.Any],
|
||||
async_mode: bool = False,
|
||||
) -> CloudapiComputeGuestAgentExecuteResultModel | str:
|
||||
raise NotImplementedError
|
||||
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiComputeGuestAgentFeatureUpdateImpl(
|
||||
_base.APIFunctionImpl
|
||||
):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
vm_id: int,
|
||||
async_mode: bool = False,
|
||||
) -> bool | str:
|
||||
raise NotImplementedError
|
||||
@@ -2,13 +2,15 @@ import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiComputeListResultModel(_base.BaseAPIResultModel):
|
||||
class CloudapiComputeListResultModel(_base.BaseModel):
|
||||
data: list[_nested.VMAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiComputeListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def list(
|
||||
class CloudapiComputeListImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
account_id: int | None = None,
|
||||
@@ -18,12 +20,13 @@ class CloudapiComputeListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
include_deleted: bool = False,
|
||||
ip_addr: str | None = None,
|
||||
name: str | None = None,
|
||||
page_number: int | None = None,
|
||||
page_size: int | None = None,
|
||||
zone_id: int | None = None,
|
||||
page_number: int = 1,
|
||||
page_size: int = 100,
|
||||
rg_id: int | None = None,
|
||||
rg_name: str | None = None,
|
||||
sort_by: str | None = None,
|
||||
status: _nested.VMStatus | None = None,
|
||||
tech_status: _nested.VMTechStatus | None = None,
|
||||
) -> CloudapiComputeListResultModel:
|
||||
...
|
||||
raise NotImplementedError
|
||||
Loaded 100 of 480 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user