1.2.0
This commit is contained in:
@@ -7,6 +7,8 @@ from .backend_server_update import *
|
||||
from .backend_update import *
|
||||
from .create import *
|
||||
from .delete import *
|
||||
from .disable import *
|
||||
from .enable import *
|
||||
from .frontend_bind import *
|
||||
from .frontend_bind_delete import *
|
||||
from .frontend_binding_update import *
|
||||
@@ -15,6 +17,7 @@ from .frontend_delete import *
|
||||
from .get import *
|
||||
from .list import *
|
||||
from .list_deleted import *
|
||||
from .make_highly_available import *
|
||||
|
||||
|
||||
class CloudapiLbAPI(
|
||||
@@ -27,13 +30,16 @@ class CloudapiLbAPI(
|
||||
CloudapiLbBackendUpdateProtocol,
|
||||
CloudapiLbCreateProtocol,
|
||||
CloudapiLbDeleteProtocol,
|
||||
CloudapiLbDisableProtocol,
|
||||
CloudapiLbEnableProtocol,
|
||||
CloudapiLbFrontendBindDeleteProtocol,
|
||||
CloudapiLbFrontendBindingUpdateProtocol,
|
||||
CloudapiLbFrontendBindProtocol,
|
||||
CloudapiLbFrontendBindingUpdateProtocol,
|
||||
CloudapiLbFrontendCreateProtocol,
|
||||
CloudapiLbFrontendDeleteProtocol,
|
||||
CloudapiLbGetProtocol,
|
||||
CloudapiLbListDeletedProtocol,
|
||||
CloudapiLbListProtocol,
|
||||
CloudapiLbMakeHighlyAvailableProtocol,
|
||||
):
|
||||
pass
|
||||
|
||||
@@ -14,8 +14,9 @@ class CloudapiLbCreateProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
rg_id: int,
|
||||
vins_id: int,
|
||||
description: None | str = None,
|
||||
highly_available: bool = False,
|
||||
ha_mode: bool = False,
|
||||
start: bool = True,
|
||||
sysctl_params: None | list[str] = None,
|
||||
zone_id: None | int = None,
|
||||
) -> CloudapiLbCreateResultInt:
|
||||
...
|
||||
|
||||
14
src/dynamix_sdk/api/cloudapi/lb/disable.py
Normal file
14
src/dynamix_sdk/api/cloudapi/lb/disable.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiLbDisableResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiLbDisableProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def disable(
|
||||
self,
|
||||
*,
|
||||
lb_id: int,
|
||||
) -> CloudapiLbDisableResultBool:
|
||||
...
|
||||
14
src/dynamix_sdk/api/cloudapi/lb/enable.py
Normal file
14
src/dynamix_sdk/api/cloudapi/lb/enable.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiLbEnableResultBool(_base.BaseAPIResultBool):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiLbEnableProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def enable(
|
||||
self,
|
||||
*,
|
||||
lb_id: int,
|
||||
) -> CloudapiLbEnableResultBool:
|
||||
...
|
||||
@@ -1,12 +1,56 @@
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
import typing as _typing
|
||||
|
||||
import dynamix_sdk.base as _base
|
||||
import dynamix_sdk.api._nested as _nested
|
||||
|
||||
|
||||
class CloudapiLbGetResultModel(
|
||||
_base.BaseAPIResultModel,
|
||||
_nested.LBAPIResultNM
|
||||
):
|
||||
pass
|
||||
class CloudapiLbGetResultModel(_base.BaseAPIResultModel):
|
||||
account_id: int
|
||||
acl: list[_typing.Any]
|
||||
backend_ha_ip_addr: str
|
||||
backends: list[_nested.LBBackendAPIResultNM]
|
||||
created_by: str
|
||||
created_timestamp: int
|
||||
deleted_by: str
|
||||
deleted_timestamp: int
|
||||
description: str
|
||||
dp_api_user: str
|
||||
ext_net_id: int
|
||||
frontend_ha_ip_addr: str
|
||||
frontends: list[_nested.LBFrontendAPIResultNM]
|
||||
grid_id: int
|
||||
guid: int
|
||||
ha_mode: bool
|
||||
id: int
|
||||
manager_id: int
|
||||
manager_type: str
|
||||
milestones: int
|
||||
name: str
|
||||
part_of_k8s: bool
|
||||
primary_node: _nested.LBNodeAPIResultNM
|
||||
rg_id: int
|
||||
rg_name: str
|
||||
secondary_node: _nested.LBNodeAPIResultNM
|
||||
status: _nested.LBStatus
|
||||
sysctl_params: dict[str, str]
|
||||
tech_status: _nested.LBTechStatus
|
||||
updated_by: str
|
||||
updated_timestamp: int
|
||||
user_managed: bool
|
||||
vins_id: int
|
||||
zone_id: int
|
||||
|
||||
@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 CloudapiLbGetProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
|
||||
14
src/dynamix_sdk/api/cloudapi/lb/make_highly_available.py
Normal file
14
src/dynamix_sdk/api/cloudapi/lb/make_highly_available.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import dynamix_sdk.base as _base
|
||||
|
||||
|
||||
class CloudapiLbMakeHighlyAvailableResultInt(_base.BaseAPIResultInt):
|
||||
pass
|
||||
|
||||
|
||||
class CloudapiLbMakeHighlyAvailableProtocol(_base.BasePostAPIFunctionProtocol):
|
||||
def make_highly_available(
|
||||
self,
|
||||
*,
|
||||
lb_id: int,
|
||||
) -> CloudapiLbMakeHighlyAvailableResultInt:
|
||||
...
|
||||
Reference in New Issue
Block a user