2.1.0
This commit is contained in:
1 parent
1ee16914bc
commit
6ffea46b8a
576 files changed
+12867
-562
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .change_storage_policy import *
|
||||
from .create import *
|
||||
from .create_from_disk import CloudapiImageCreateFromDiskImpl
|
||||
from .create_virtual import *
|
||||
from .delete import *
|
||||
from .get import *
|
||||
@@ -15,6 +16,7 @@ class CloudapiImageAPI(
|
||||
create_virtual: CloudapiImageCreateVirtualImpl
|
||||
delete: CloudapiImageDeleteImpl
|
||||
create: CloudapiImageCreateImpl
|
||||
create_from_disk: CloudapiImageCreateFromDiskImpl
|
||||
list: CloudapiImageListImpl
|
||||
link: CloudapiImageLinkImpl
|
||||
get: CloudapiImageGetImpl
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
from pydantic import Field
|
||||
|
||||
import dynamix_sdk.base as _base
|
||||
from dynamix_sdk.utils import AutoNameEnum as _AutoNameEnum
|
||||
|
||||
|
||||
class BootType(str, _AutoNameEnum):
|
||||
BIOS = 'bios'
|
||||
UEFI = 'uefi'
|
||||
|
||||
|
||||
class ImageType(str, _AutoNameEnum):
|
||||
LINUX = 'linux'
|
||||
WINDOWS = 'windows'
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
|
||||
class NetworkInterfaceNaming(str, _AutoNameEnum):
|
||||
ETH = 'eth'
|
||||
ENS = 'ens'
|
||||
|
||||
|
||||
class CloudapiImageCreateFromDiskImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
disk_id: int = Field(serialization_alias='disk_id'),
|
||||
boot_type: BootType,
|
||||
image_type: ImageType,
|
||||
storage_policy_id: int,
|
||||
account_id: int | None = Field(default=None, serialization_alias='account_id'), # noqa: E501
|
||||
async_mode: bool = True,
|
||||
bootable: bool = True,
|
||||
hot_resize: bool = Field(default=False, serialization_alias='hot_resize'), # noqa: E501
|
||||
network_interface_naming: NetworkInterfaceNaming = Field(default=NetworkInterfaceNaming.ENS, serialization_alias='network_interface_naming'), # noqa: E501
|
||||
password: str | None = None,
|
||||
pool_name: str | None = None,
|
||||
sep_id: int | None = Field(default=None, serialization_alias='sep_id'),
|
||||
user_name: str | None = Field(default=None, serialization_alias='user_name'), # noqa: E501
|
||||
) -> int | str:
|
||||
raise NotImplementedError
|
||||
@@ -5,7 +5,7 @@ import dynamix_sdk.api._nested as _nested
|
||||
from dynamix_sdk.utils import EmptyStr as _EmptyStr
|
||||
|
||||
|
||||
class CloudapiImageGetResultModel(_base.BaseModel):
|
||||
class CloudapiImageGetResultModel(_base.ResultModel):
|
||||
account_id: int
|
||||
acl: list[_typing.Any]
|
||||
arch: str
|
||||
@@ -40,6 +40,7 @@ class CloudapiImageGetResultModel(_base.BaseModel):
|
||||
storage_policy_id: int
|
||||
shared_with: list[int]
|
||||
size_gb: int
|
||||
real_size: int | None = None
|
||||
snapshot_id: str = ''
|
||||
status: _nested.ImageStatus
|
||||
tech_status: _nested.ImageTechStatus
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
from pydantic import Field
|
||||
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiImageListResultModel(_base.BaseModel):
|
||||
class CloudapiImageListResultModel(_base.ResultModel):
|
||||
data: list[_nested.ImageForListAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
@@ -13,6 +15,7 @@ class CloudapiImageListImpl(_base.APIFunctionImpl):
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
account_id: int | None = Field(default=None, serialization_alias='account_id'), # noqa: E501
|
||||
bootable: bool | None = None,
|
||||
id: int | None = None,
|
||||
enabled: bool | None = None,
|
||||
@@ -24,6 +27,7 @@ class CloudapiImageListImpl(_base.APIFunctionImpl):
|
||||
public: bool | None = None,
|
||||
sep_id: int | None = None,
|
||||
sep_name: str | None = None,
|
||||
sep_type: _nested.ImageListSEPType | None = Field(default=None, serialization_alias='sep_type'), # noqa: E501
|
||||
sep_pool_name: str | None = None,
|
||||
sort_by: str | None = None,
|
||||
status: _nested.ImageStatus | None = None,
|
||||
|
||||
Reference in new issue
Block a user