1.0.1
This commit is contained in:
1 parent
346ffd4255
commit
caf367262c
205 files changed
+6115
-200
No files matched your search
@@ -0,0 +1 @@
|
||||
from ._api import *
|
||||
@@ -0,0 +1,21 @@
|
||||
import dynamix_sdk.base as _base
|
||||
from .create import *
|
||||
from .create_virtual import *
|
||||
from .delete import *
|
||||
from .get import *
|
||||
from .link import *
|
||||
from .list import *
|
||||
from .rename import *
|
||||
|
||||
|
||||
class CloudapiImageAPI(
|
||||
_base.BaseAPI,
|
||||
CloudapiImageCreateProtocol,
|
||||
CloudapiImageCreateVirtualProtocol,
|
||||
CloudapiImageDeleteProtocol,
|
||||
CloudapiImageGetProtocol,
|
||||
CloudapiImageLinkProtocol,
|
||||
CloudapiImageListProtocol,
|
||||
CloudapiImageRenameProtocol,
|
||||
):
|
||||
pass
|
||||
@@ -0,0 +1,30 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiImageCreateResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiImageCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def create(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
boot_mode: _nested.BootMode,
|
||||
drivers: list[_nested.Driver],
|
||||
boot_loader_type: _nested.BootLoaderType,
|
||||
name: str,
|
||||
download_url: str,
|
||||
hot_resize: bool = False,
|
||||
network_interface_naming: _nested.NetIfaceNamingTemplate = (
|
||||
_nested.NetIfaceNamingTemplate.ens
|
||||
),
|
||||
download_password: str | None = None,
|
||||
os_password: str | None = None,
|
||||
sep_id: int | None = None,
|
||||
sep_pool_name: str | None = None,
|
||||
download_user_name: str | None = None,
|
||||
os_user_name: str | None = None,
|
||||
) -> CloudapiImageCreateResultInt:
|
||||
...
|
||||
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiImageCreateVirtualResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiImageCreateVirtualProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def create_virtual(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
target_image_id: int,
|
||||
) -> CloudapiImageCreateVirtualResultInt:
|
||||
...
|
||||
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiImageDeleteResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiImageDeleteProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def delete(
|
||||
self,
|
||||
*,
|
||||
image_id: int,
|
||||
) -> CloudapiImageDeleteResultBool:
|
||||
...
|
||||
@@ -0,0 +1,46 @@
|
||||
import typing as _typing
|
||||
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiImageGetResultModel(
|
||||
_base.BaseAPIResultModel,
|
||||
_nested.BaseImageAPIResultNM,
|
||||
):
|
||||
acl: list[_typing.Any]
|
||||
cd_presented_to: dict[str, list[int]]
|
||||
ckey: str
|
||||
deleted_timestamp: int
|
||||
enabled: bool
|
||||
grid_id: int
|
||||
guid: int
|
||||
history: list[_nested.ImageHistoryRecordAPIResultNM]
|
||||
last_modified: int
|
||||
milestones: int
|
||||
os_password: str | None
|
||||
present_to: list[int]
|
||||
provider_name: str
|
||||
purge_attempt_count: int
|
||||
res_id: str
|
||||
rescue_cd: bool
|
||||
shared_with: list[int]
|
||||
snapshot_id: str = ''
|
||||
tech_status: _nested.ImageTechStatus
|
||||
unc_path: str
|
||||
version: str
|
||||
vm_ci_id: int
|
||||
|
||||
@property
|
||||
def deleted_datetime(self):
|
||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
||||
|
||||
|
||||
class CloudapiImageGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def get(
|
||||
self,
|
||||
*,
|
||||
image_id: int,
|
||||
show_all: bool = False,
|
||||
) -> CloudapiImageGetResultModel:
|
||||
...
|
||||
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiImageLinkResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiImageLinkProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def link(
|
||||
self,
|
||||
*,
|
||||
virtual_image_id: int,
|
||||
target_image_id: int,
|
||||
) -> CloudapiImageLinkResultBool:
|
||||
...
|
||||
@@ -0,0 +1,30 @@
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiImageListResultModel(_base.BaseAPIResultModel):
|
||||
data: list[_nested.ImageForListAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiImageListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def list(
|
||||
self,
|
||||
*,
|
||||
bootable: bool | None = None,
|
||||
id: int | None = None,
|
||||
enabled: bool | None = None,
|
||||
hot_resize: bool | None = None,
|
||||
size_gb: int | None = None,
|
||||
name: str | None = None,
|
||||
page_number: int | None = None,
|
||||
page_size: int | None = None,
|
||||
public: bool | None = None,
|
||||
sep_id: int | None = None,
|
||||
sep_name: str | None = None,
|
||||
sep_pool_name: str | None = None,
|
||||
sort_by: str | None = None,
|
||||
status: _nested.ImageStatus | None = None,
|
||||
type: _nested.ImageType | None = None,
|
||||
) -> CloudapiImageListResultModel:
|
||||
...
|
||||
@@ -0,0 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiImageRenameResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiImageRenameProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def rename(
|
||||
self,
|
||||
*,
|
||||
image_id: int,
|
||||
name: str,
|
||||
) -> CloudapiImageRenameResultBool:
|
||||
...
|
||||
Reference in new issue
Block a user