This commit is contained in:
2025-07-21 20:27:59 +07:00
parent 9f2c3dc81e
commit a63ff017af
66 changed files with 1724 additions and 339 deletions

View File

@@ -1,19 +1,83 @@
import typing as _typing
import dynamix_sdk.base as _base
import dynamix_sdk.api._nested as _nested
class CloudapiComputeGetResultModel(
_base.BaseAPIResultModel,
_nested.BaseVMAPIResultNM,
):
acl: _nested.VMACLForComputeGetAPIResultNM
class CloudapiComputeGetResultModel(_base.BaseAPIResultModel):
account_id: int
account_name: str
acl: _nested.VMACLAPIResultNM
affinity_label: str
affinity_rules: list[_nested.AffinityRuleAPIResultNM]
affinity_weight: int
anti_affinity_rules: list[_nested.AffinityRuleAPIResultNM]
arch: str
auto_start: bool
boot_disk_size_gb: int
boot_loader_type: _nested.BootLoaderType
boot_mode: _nested.BootMode
boot_order: list[_nested.BootDevice]
cdrom_image_id: int
chipset: _nested.Chipset
ci_user_data: dict
clone_ids: list[int]
clone_reference: int
cpu_count: int
cpu_pin: bool
created_by: str
created_timestamp: int
custom_fields: dict
deleted_by: str
deleted_timestamp: int
description: str
devices: dict
disks: list[_nested.DiskForCAComputeGetAPIResultNM]
driver: _nested.Driver
grid_id: int
guid: int
hot_resize: bool
hp_backed: bool
id: int
image_id: int
image_name: None | str
interfaces: list[_nested.InterfaceForComputeGetAPIResultNM]
live_migration_job_id: int
lock_status: _nested.LockStatus
manager_id: int
manager_type: str
migration_job: int
milestones: int
name: str
need_reboot: bool
network_interface_naming: _nested.NetIfaceNamingTemplate
numa_affinity: _nested.NumaAffinity
numa_node_id: int
os_users: list[_nested.OSUserAPIResultNM]
pinned_to_stack: bool
preferred_cpu_cores: list[int]
ram_size_mb: int
reference_id: str
res_name: str
reserved_cpu_cores: list[int]
rg_id: int
rg_name: str
snapshot_sets: list[_nested.SnapshotSetAPIResultNM]
stateless_sep_id: int
stateless_sep_type: str
status: _nested.VMStatus
tags: dict
tech_status: _nested.VMTechStatus
updated_by: str
updated_timestamp: int
user_managed: bool
vgpus: list[dict[str, _typing.Any]]
virtual_image_id: int
virtual_image_name: None | str
vm_ci_id: int
vnc_password: str
guest_agent: _nested.GuestAgentAPIResultNM
zone_id: int
natable_vins_id: int = 0
natable_vins_ip: str = ''
@@ -21,6 +85,18 @@ class CloudapiComputeGetResultModel(
natable_vins_network: str = ''
natable_vins_network_name: str = ''
@property
def created_datetime(self):
return self._get_datetime_from_timestamp(self.created_timestamp)
@property
def deleted_datetime(self):
return self._get_datetime_from_timestamp(self.deleted_timestamp)
@property
def updated_datetime(self):
return self._get_datetime_from_timestamp(self.updated_timestamp)
class CloudapiComputeGetProtocol(_base.BasePostAPIFunctionProtocol):
def get(