2.0.0
This commit is contained in:
1 parent
a52ec3f1bb
commit
1ee16914bc
438 files changed
+5153
-3282
No files matched your search
@@ -11,13 +11,12 @@ from .rename import *
|
||||
|
||||
class CloudapiImageAPI(
|
||||
_base.BaseAPI,
|
||||
CloudapiImageChangeStoragePolicyProtocol,
|
||||
CloudapiImageCreateProtocol,
|
||||
CloudapiImageCreateVirtualProtocol,
|
||||
CloudapiImageDeleteProtocol,
|
||||
CloudapiImageGetProtocol,
|
||||
CloudapiImageLinkProtocol,
|
||||
CloudapiImageListProtocol,
|
||||
CloudapiImageRenameProtocol,
|
||||
):
|
||||
pass
|
||||
create_virtual: CloudapiImageCreateVirtualImpl
|
||||
delete: CloudapiImageDeleteImpl
|
||||
create: CloudapiImageCreateImpl
|
||||
list: CloudapiImageListImpl
|
||||
link: CloudapiImageLinkImpl
|
||||
get: CloudapiImageGetImpl
|
||||
rename: CloudapiImageRenameImpl
|
||||
change_storage_policy: CloudapiImageChangeStoragePolicyImpl
|
||||
@@ -1,17 +1,15 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiImageChangeStoragePolicyResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiImageChangeStoragePolicyProtocol(
|
||||
_base.BasePostAPIFunctionProtocol,
|
||||
class CloudapiImageChangeStoragePolicyImpl(
|
||||
_base.APIFunctionImpl,
|
||||
):
|
||||
def change_storage_policy(
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
image_id: int,
|
||||
storage_policy_id: int,
|
||||
) -> CloudapiImageChangeStoragePolicyResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -2,12 +2,10 @@ import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiImageCreateResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
class CloudapiImageCreateImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiImageCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def create(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
account_id: int,
|
||||
@@ -26,5 +24,6 @@ class CloudapiImageCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
sep_pool_name: str | None = None,
|
||||
download_user_name: str | None = None,
|
||||
os_user_name: str | None = None,
|
||||
) -> CloudapiImageCreateResultInt:
|
||||
...
|
||||
async_mode: bool = False,
|
||||
) -> int | str:
|
||||
raise NotImplementedError
|
||||
@@ -1,16 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiImageCreateVirtualResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
class CloudapiImageCreateVirtualImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiImageCreateVirtualProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def create_virtual(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
target_image_id: int,
|
||||
account_id: int | None = None,
|
||||
) -> CloudapiImageCreateVirtualResultInt:
|
||||
...
|
||||
account_id: int,
|
||||
) -> int:
|
||||
raise NotImplementedError
|
||||
@@ -1,14 +1,12 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiImageDeleteResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiImageDeleteImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiImageDeleteProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def delete(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
image_id: int,
|
||||
) -> CloudapiImageDeleteResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -5,7 +5,7 @@ import dynamix_sdk.api._nested as _nested
|
||||
from dynamix_sdk.utils import EmptyStr as _EmptyStr
|
||||
|
||||
|
||||
class CloudapiImageGetResultModel(_base.BaseAPIResultModel):
|
||||
class CloudapiImageGetResultModel(_base.BaseModel):
|
||||
account_id: int
|
||||
acl: list[_typing.Any]
|
||||
arch: str
|
||||
@@ -59,11 +59,13 @@ class CloudapiImageGetResultModel(_base.BaseAPIResultModel):
|
||||
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
||||
|
||||
|
||||
class CloudapiImageGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def get(
|
||||
class CloudapiImageGetImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
image_id: int,
|
||||
show_all: bool = False,
|
||||
) -> CloudapiImageGetResultModel:
|
||||
...
|
||||
raise NotImplementedError
|
||||
@@ -1,15 +1,13 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiImageLinkResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiImageLinkImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiImageLinkProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def link(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
virtual_image_id: int,
|
||||
target_image_id: int,
|
||||
) -> CloudapiImageLinkResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
@@ -2,13 +2,15 @@ import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiImageListResultModel(_base.BaseAPIResultModel):
|
||||
class CloudapiImageListResultModel(_base.BaseModel):
|
||||
data: list[_nested.ImageForListAPIResultNM]
|
||||
entry_count: int
|
||||
|
||||
|
||||
class CloudapiImageListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def list(
|
||||
class CloudapiImageListImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
bootable: bool | None = None,
|
||||
@@ -17,15 +19,15 @@ class CloudapiImageListProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
hot_resize: bool | None = None,
|
||||
size_gb: int | None = None,
|
||||
name: str | None = None,
|
||||
page_number: int | None = None,
|
||||
page_size: int | None = None,
|
||||
page_number: int = 1,
|
||||
page_size: int = 100,
|
||||
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,
|
||||
type: list[_nested.ImageType] | None = None,
|
||||
storage_policy_id: int | None = None,
|
||||
) -> CloudapiImageListResultModel:
|
||||
...
|
||||
raise NotImplementedError
|
||||
@@ -1,15 +1,13 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiImageRenameResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
class CloudapiImageRenameImpl(_base.APIFunctionImpl):
|
||||
http_method = _base.HTTPMethod.POST
|
||||
|
||||
|
||||
class CloudapiImageRenameProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def rename(
|
||||
def __call__(
|
||||
self,
|
||||
*,
|
||||
image_id: int,
|
||||
name: str,
|
||||
) -> CloudapiImageRenameResultBool:
|
||||
...
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
Reference in new issue
Block a user