baiducloud-python-sdk-cce 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- baiducloud_python_sdk_cce/__init__.py +5 -0
- baiducloud_python_sdk_cce/api/__init__.py +0 -0
- baiducloud_python_sdk_cce/api/cce_client.py +931 -0
- baiducloud_python_sdk_cce/models/__init__.py +77 -0
- baiducloud_python_sdk_cce/models/autoscaler.py +76 -0
- baiducloud_python_sdk_cce/models/ca_config.py +151 -0
- baiducloud_python_sdk_cce/models/cluster_autoscaler_spec.py +82 -0
- baiducloud_python_sdk_cce/models/create_a_shrinking_node_group_task_v2_request.py +105 -0
- baiducloud_python_sdk_cce/models/create_a_shrinking_node_group_task_v2_response.py +70 -0
- baiducloud_python_sdk_cce/models/create_an_autoscaler_v2_request.py +58 -0
- baiducloud_python_sdk_cce/models/create_an_autoscaler_v2_response.py +62 -0
- baiducloud_python_sdk_cce/models/create_expansion_node_group_task_v2_request.py +76 -0
- baiducloud_python_sdk_cce/models/create_expansion_node_group_task_v2_response.py +69 -0
- baiducloud_python_sdk_cce/models/create_node_group_v2_request.py +135 -0
- baiducloud_python_sdk_cce/models/create_node_group_v2_response.py +69 -0
- baiducloud_python_sdk_cce/models/create_nodes_cluster_expansion_v2_request.py +67 -0
- baiducloud_python_sdk_cce/models/create_nodes_cluster_expansion_v2_response.py +69 -0
- baiducloud_python_sdk_cce/models/delete_node_group_v2_request.py +76 -0
- baiducloud_python_sdk_cce/models/delete_node_group_v2_response.py +62 -0
- baiducloud_python_sdk_cce/models/delete_nodes_cluster_scaling_v2_request.py +83 -0
- baiducloud_python_sdk_cce/models/delete_nodes_cluster_scaling_v2_response.py +61 -0
- baiducloud_python_sdk_cce/models/delete_option.py +74 -0
- baiducloud_python_sdk_cce/models/existed_instance_in_cluster.py +58 -0
- baiducloud_python_sdk_cce/models/get_node_details_v2_request.py +64 -0
- baiducloud_python_sdk_cce/models/get_node_details_v2_response.py +70 -0
- baiducloud_python_sdk_cce/models/get_node_group_details_v2_request.py +64 -0
- baiducloud_python_sdk_cce/models/get_node_group_details_v2_response.py +70 -0
- baiducloud_python_sdk_cce/models/get_package_list_v2_request.py +66 -0
- baiducloud_python_sdk_cce/models/get_package_list_v2_response.py +62 -0
- baiducloud_python_sdk_cce/models/get_task_list_v2_request.py +110 -0
- baiducloud_python_sdk_cce/models/get_task_list_v2_response.py +70 -0
- baiducloud_python_sdk_cce/models/get_the_list_of_cluster_node_groups_v2_request.py +103 -0
- baiducloud_python_sdk_cce/models/get_the_list_of_cluster_node_groups_v2_response.py +70 -0
- baiducloud_python_sdk_cce/models/get_the_list_of_cluster_nodes_v2_request.py +96 -0
- baiducloud_python_sdk_cce/models/get_the_list_of_cluster_nodes_v2_response.py +70 -0
- baiducloud_python_sdk_cce/models/instance.py +82 -0
- baiducloud_python_sdk_cce/models/instance_group.py +74 -0
- baiducloud_python_sdk_cce/models/instance_page.py +133 -0
- baiducloud_python_sdk_cce/models/instance_set.py +66 -0
- baiducloud_python_sdk_cce/models/instance_template.py +268 -0
- baiducloud_python_sdk_cce/models/list_instance_group_page.py +82 -0
- baiducloud_python_sdk_cce/models/list_instances_by_instance_group_id_page.py +82 -0
- baiducloud_python_sdk_cce/models/list_task_page.py +82 -0
- baiducloud_python_sdk_cce/models/machine_spec_status.py +66 -0
- baiducloud_python_sdk_cce/models/modify_ig_auto_scaler_request.py +98 -0
- baiducloud_python_sdk_cce/models/modify_ig_auto_scaler_response.py +61 -0
- baiducloud_python_sdk_cce/models/modify_node_group_node_shrink_protection_status_v2_request.py +74 -0
- baiducloud_python_sdk_cce/models/modify_node_group_node_shrink_protection_status_v2_response.py +69 -0
- baiducloud_python_sdk_cce/models/modify_the_number_of_node_replicas_in_a_node_group_v2_request.py +99 -0
- baiducloud_python_sdk_cce/models/modify_the_number_of_node_replicas_in_a_node_group_v2_response.py +62 -0
- baiducloud_python_sdk_cce/models/move_into_an_existing_node_v2_request.py +126 -0
- baiducloud_python_sdk_cce/models/move_into_an_existing_node_v2_response.py +69 -0
- baiducloud_python_sdk_cce/models/query_the_configuration_of_autoscaler_v2_request.py +58 -0
- baiducloud_python_sdk_cce/models/query_the_configuration_of_autoscaler_v2_response.py +70 -0
- baiducloud_python_sdk_cce/models/retrieve_the_node_group_node_list_v2_request.py +76 -0
- baiducloud_python_sdk_cce/models/retrieve_the_node_group_node_list_v2_response.py +72 -0
- baiducloud_python_sdk_cce/models/step.py +124 -0
- baiducloud_python_sdk_cce/models/steps_to_obtain_node_events_v2_request.py +58 -0
- baiducloud_python_sdk_cce/models/steps_to_obtain_node_events_v2_response.py +78 -0
- baiducloud_python_sdk_cce/models/synchronize_node_metadata_v2_request.py +58 -0
- baiducloud_python_sdk_cce/models/synchronize_node_metadata_v2_response.py +69 -0
- baiducloud_python_sdk_cce/models/taint.py +74 -0
- baiducloud_python_sdk_cce/models/task.py +108 -0
- baiducloud_python_sdk_cce/models/update_autoscaler_configuration_v2_request.py +169 -0
- baiducloud_python_sdk_cce/models/update_autoscaler_configuration_v2_response.py +61 -0
- baiducloud_python_sdk_cce/models/update_node_attributes_v2_request.py +97 -0
- baiducloud_python_sdk_cce/models/update_node_attributes_v2_response.py +72 -0
- baiducloud_python_sdk_cce/models/view_task_details_v2_request.py +64 -0
- baiducloud_python_sdk_cce/models/view_task_details_v2_response.py +70 -0
- baiducloud_python_sdk_cce-0.0.1.dist-info/LICENSE +177 -0
- baiducloud_python_sdk_cce-0.0.1.dist-info/METADATA +76 -0
- baiducloud_python_sdk_cce-0.0.1.dist-info/RECORD +74 -0
- baiducloud_python_sdk_cce-0.0.1.dist-info/WHEEL +5 -0
- baiducloud_python_sdk_cce-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for StepsToObtainNodeEventsV2Response information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_cce.models.step import Step
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class StepsToObtainNodeEventsV2Response(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
StepsToObtainNodeEventsV2Response
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, status=None, steps=None, request_id=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize StepsToObtainNodeEventsV2Response response.
|
|
17
|
+
|
|
18
|
+
:param status: 事件类型
|
|
19
|
+
:type status: str (optional)
|
|
20
|
+
|
|
21
|
+
:param steps: 集群操作步骤
|
|
22
|
+
:type steps: List[Step] (optional)
|
|
23
|
+
|
|
24
|
+
:param request_id: 请求ID
|
|
25
|
+
:type request_id: str (optional)
|
|
26
|
+
"""
|
|
27
|
+
super().__init__()
|
|
28
|
+
self.status = status
|
|
29
|
+
self.steps = steps
|
|
30
|
+
self.request_id = request_id
|
|
31
|
+
|
|
32
|
+
def to_dict(self):
|
|
33
|
+
"""
|
|
34
|
+
Convert the response instance to a dictionary representation.
|
|
35
|
+
|
|
36
|
+
Includes metadata from the parent BceResponse class.
|
|
37
|
+
Nested model objects are recursively converted to dictionaries.
|
|
38
|
+
|
|
39
|
+
:return: Dictionary representation of the response
|
|
40
|
+
:rtype: dict
|
|
41
|
+
"""
|
|
42
|
+
_map = super().to_dict()
|
|
43
|
+
if _map is not None:
|
|
44
|
+
return _map
|
|
45
|
+
result = dict()
|
|
46
|
+
if self.metadata is not None:
|
|
47
|
+
result['metadata'] = dict(self.metadata)
|
|
48
|
+
if self.status is not None:
|
|
49
|
+
result['status'] = self.status
|
|
50
|
+
if self.steps is not None:
|
|
51
|
+
result['steps'] = [i.to_dict() for i in self.steps]
|
|
52
|
+
if self.request_id is not None:
|
|
53
|
+
result['requestID'] = self.request_id
|
|
54
|
+
return result
|
|
55
|
+
|
|
56
|
+
def from_dict(self, m):
|
|
57
|
+
"""
|
|
58
|
+
Populate the response instance from a dictionary.
|
|
59
|
+
|
|
60
|
+
Nested dictionaries are recursively converted to model objects.
|
|
61
|
+
|
|
62
|
+
:param m: Dictionary containing response data
|
|
63
|
+
:type m: dict
|
|
64
|
+
|
|
65
|
+
:return: Self reference for method chaining
|
|
66
|
+
:rtype: StepsToObtainNodeEventsV2Response
|
|
67
|
+
|
|
68
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
69
|
+
:raises ValueError: If nested model conversion fails
|
|
70
|
+
"""
|
|
71
|
+
m = m or dict()
|
|
72
|
+
if m.get('status') is not None:
|
|
73
|
+
self.status = m.get('status')
|
|
74
|
+
if m.get('steps') is not None:
|
|
75
|
+
self.steps = [Step().from_dict(i) for i in m.get('steps')]
|
|
76
|
+
if m.get('requestID') is not None:
|
|
77
|
+
self.request_id = m.get('requestID')
|
|
78
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for SynchronizeNodeMetadataV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SynchronizeNodeMetadataV2Request(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for SynchronizeNodeMetadataV2Request operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, cluster_id):
|
|
16
|
+
"""
|
|
17
|
+
Initialize SynchronizeNodeMetadataV2Request request entity.
|
|
18
|
+
|
|
19
|
+
:param cluster_id: cluster_id parameter
|
|
20
|
+
:type cluster_id: str (required)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.cluster_id = cluster_id
|
|
24
|
+
|
|
25
|
+
def to_dict(self):
|
|
26
|
+
"""
|
|
27
|
+
Convert the request entity to a dictionary representation.
|
|
28
|
+
|
|
29
|
+
Nested model objects are recursively converted to dictionaries.
|
|
30
|
+
|
|
31
|
+
:return: Dictionary representation of the request
|
|
32
|
+
:rtype: dict
|
|
33
|
+
"""
|
|
34
|
+
_map = super().to_dict()
|
|
35
|
+
if _map is not None:
|
|
36
|
+
return _map
|
|
37
|
+
result = dict()
|
|
38
|
+
return result
|
|
39
|
+
|
|
40
|
+
def from_dict(self, m):
|
|
41
|
+
"""
|
|
42
|
+
Populate the request entity from a dictionary.
|
|
43
|
+
|
|
44
|
+
Nested dictionaries are recursively converted to model objects.
|
|
45
|
+
|
|
46
|
+
:param m: Dictionary containing request data
|
|
47
|
+
:type m: dict
|
|
48
|
+
|
|
49
|
+
:return: Self reference for method chaining
|
|
50
|
+
:rtype: SynchronizeNodeMetadataV2Request
|
|
51
|
+
|
|
52
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
53
|
+
:raises ValueError: If nested model conversion fails
|
|
54
|
+
"""
|
|
55
|
+
m = m or dict()
|
|
56
|
+
if m.get('clusterID') is not None:
|
|
57
|
+
self.cluster_id = m.get('clusterID')
|
|
58
|
+
return self
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for SynchronizeNodeMetadataV2Response information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SynchronizeNodeMetadataV2Response(BceResponse):
|
|
9
|
+
"""
|
|
10
|
+
SynchronizeNodeMetadataV2Response
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, cluster_id=None, request_id=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize SynchronizeNodeMetadataV2Response response.
|
|
16
|
+
|
|
17
|
+
:param cluster_id: 请求的集群ID
|
|
18
|
+
:type cluster_id: str (optional)
|
|
19
|
+
|
|
20
|
+
:param request_id: 请求ID
|
|
21
|
+
:type request_id: str (optional)
|
|
22
|
+
"""
|
|
23
|
+
super().__init__()
|
|
24
|
+
self.cluster_id = cluster_id
|
|
25
|
+
self.request_id = request_id
|
|
26
|
+
|
|
27
|
+
def to_dict(self):
|
|
28
|
+
"""
|
|
29
|
+
Convert the response instance to a dictionary representation.
|
|
30
|
+
|
|
31
|
+
Includes metadata from the parent BceResponse class.
|
|
32
|
+
Nested model objects are recursively converted to dictionaries.
|
|
33
|
+
|
|
34
|
+
:return: Dictionary representation of the response
|
|
35
|
+
:rtype: dict
|
|
36
|
+
"""
|
|
37
|
+
_map = super().to_dict()
|
|
38
|
+
if _map is not None:
|
|
39
|
+
return _map
|
|
40
|
+
result = dict()
|
|
41
|
+
if self.metadata is not None:
|
|
42
|
+
result['metadata'] = dict(self.metadata)
|
|
43
|
+
if self.cluster_id is not None:
|
|
44
|
+
result['clusterID'] = self.cluster_id
|
|
45
|
+
if self.request_id is not None:
|
|
46
|
+
result['requestID'] = self.request_id
|
|
47
|
+
return result
|
|
48
|
+
|
|
49
|
+
def from_dict(self, m):
|
|
50
|
+
"""
|
|
51
|
+
Populate the response instance from a dictionary.
|
|
52
|
+
|
|
53
|
+
Nested dictionaries are recursively converted to model objects.
|
|
54
|
+
|
|
55
|
+
:param m: Dictionary containing response data
|
|
56
|
+
:type m: dict
|
|
57
|
+
|
|
58
|
+
:return: Self reference for method chaining
|
|
59
|
+
:rtype: SynchronizeNodeMetadataV2Response
|
|
60
|
+
|
|
61
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
62
|
+
:raises ValueError: If nested model conversion fails
|
|
63
|
+
"""
|
|
64
|
+
m = m or dict()
|
|
65
|
+
if m.get('clusterID') is not None:
|
|
66
|
+
self.cluster_id = m.get('clusterID')
|
|
67
|
+
if m.get('requestID') is not None:
|
|
68
|
+
self.request_id = m.get('requestID')
|
|
69
|
+
return self
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Taint information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Taint(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Taint
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, key=None, value=None, effect=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize Taint instance.
|
|
16
|
+
|
|
17
|
+
:param key:
|
|
18
|
+
:type key: str (optional)
|
|
19
|
+
|
|
20
|
+
:param value:
|
|
21
|
+
:type value: str (optional)
|
|
22
|
+
|
|
23
|
+
:param effect:
|
|
24
|
+
:type effect: str (optional)
|
|
25
|
+
"""
|
|
26
|
+
super().__init__()
|
|
27
|
+
self.key = key
|
|
28
|
+
self.value = value
|
|
29
|
+
self.effect = effect
|
|
30
|
+
|
|
31
|
+
def to_dict(self):
|
|
32
|
+
"""
|
|
33
|
+
Convert the model instance to a dictionary representation.
|
|
34
|
+
|
|
35
|
+
Nested model objects are recursively converted to dictionaries.
|
|
36
|
+
|
|
37
|
+
:return: Dictionary representation of the model
|
|
38
|
+
:rtype: dict
|
|
39
|
+
"""
|
|
40
|
+
_map = super().to_dict()
|
|
41
|
+
if _map is not None:
|
|
42
|
+
return _map
|
|
43
|
+
result = dict()
|
|
44
|
+
if self.key is not None:
|
|
45
|
+
result['key'] = self.key
|
|
46
|
+
if self.value is not None:
|
|
47
|
+
result['value'] = self.value
|
|
48
|
+
if self.effect is not None:
|
|
49
|
+
result['effect'] = self.effect
|
|
50
|
+
return result
|
|
51
|
+
|
|
52
|
+
def from_dict(self, m):
|
|
53
|
+
"""
|
|
54
|
+
Populate the model instance from a dictionary.
|
|
55
|
+
|
|
56
|
+
Nested dictionaries are recursively converted to model objects.
|
|
57
|
+
|
|
58
|
+
:param m: Dictionary containing model data
|
|
59
|
+
:type m: dict
|
|
60
|
+
|
|
61
|
+
:return: Self reference for method chaining
|
|
62
|
+
:rtype: Taint
|
|
63
|
+
|
|
64
|
+
:raises TypeError: If input is not a dictionary type
|
|
65
|
+
:raises ValueError: If nested model conversion fails
|
|
66
|
+
"""
|
|
67
|
+
m = m or dict()
|
|
68
|
+
if m.get('key') is not None:
|
|
69
|
+
self.key = m.get('key')
|
|
70
|
+
if m.get('value') is not None:
|
|
71
|
+
self.value = m.get('value')
|
|
72
|
+
if m.get('effect') is not None:
|
|
73
|
+
self.effect = m.get('effect')
|
|
74
|
+
return self
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Task information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Task(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Task
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(
|
|
14
|
+
self, id=None, type=None, description=None, start_time=None, finish_time=None, phase=None, processes=None
|
|
15
|
+
):
|
|
16
|
+
"""
|
|
17
|
+
Initialize Task instance.
|
|
18
|
+
|
|
19
|
+
:param id:
|
|
20
|
+
:type id: str (optional)
|
|
21
|
+
|
|
22
|
+
:param type:
|
|
23
|
+
:type type: str (optional)
|
|
24
|
+
|
|
25
|
+
:param description:
|
|
26
|
+
:type description: str (optional)
|
|
27
|
+
|
|
28
|
+
:param start_time:
|
|
29
|
+
:type start_time: str (optional)
|
|
30
|
+
|
|
31
|
+
:param finish_time:
|
|
32
|
+
:type finish_time: str (optional)
|
|
33
|
+
|
|
34
|
+
:param phase:
|
|
35
|
+
:type phase: str (optional)
|
|
36
|
+
|
|
37
|
+
:param processes:
|
|
38
|
+
:type processes: List[object] (optional)
|
|
39
|
+
"""
|
|
40
|
+
super().__init__()
|
|
41
|
+
self.id = id
|
|
42
|
+
self.type = type
|
|
43
|
+
self.description = description
|
|
44
|
+
self.start_time = start_time
|
|
45
|
+
self.finish_time = finish_time
|
|
46
|
+
self.phase = phase
|
|
47
|
+
self.processes = processes
|
|
48
|
+
|
|
49
|
+
def to_dict(self):
|
|
50
|
+
"""
|
|
51
|
+
Convert the model instance to a dictionary representation.
|
|
52
|
+
|
|
53
|
+
Nested model objects are recursively converted to dictionaries.
|
|
54
|
+
|
|
55
|
+
:return: Dictionary representation of the model
|
|
56
|
+
:rtype: dict
|
|
57
|
+
"""
|
|
58
|
+
_map = super().to_dict()
|
|
59
|
+
if _map is not None:
|
|
60
|
+
return _map
|
|
61
|
+
result = dict()
|
|
62
|
+
if self.id is not None:
|
|
63
|
+
result['id'] = self.id
|
|
64
|
+
if self.type is not None:
|
|
65
|
+
result['type'] = self.type
|
|
66
|
+
if self.description is not None:
|
|
67
|
+
result['description'] = self.description
|
|
68
|
+
if self.start_time is not None:
|
|
69
|
+
result['startTime'] = self.start_time
|
|
70
|
+
if self.finish_time is not None:
|
|
71
|
+
result['finishTime'] = self.finish_time
|
|
72
|
+
if self.phase is not None:
|
|
73
|
+
result['phase'] = self.phase
|
|
74
|
+
if self.processes is not None:
|
|
75
|
+
result['processes'] = self.processes
|
|
76
|
+
return result
|
|
77
|
+
|
|
78
|
+
def from_dict(self, m):
|
|
79
|
+
"""
|
|
80
|
+
Populate the model instance from a dictionary.
|
|
81
|
+
|
|
82
|
+
Nested dictionaries are recursively converted to model objects.
|
|
83
|
+
|
|
84
|
+
:param m: Dictionary containing model data
|
|
85
|
+
:type m: dict
|
|
86
|
+
|
|
87
|
+
:return: Self reference for method chaining
|
|
88
|
+
:rtype: Task
|
|
89
|
+
|
|
90
|
+
:raises TypeError: If input is not a dictionary type
|
|
91
|
+
:raises ValueError: If nested model conversion fails
|
|
92
|
+
"""
|
|
93
|
+
m = m or dict()
|
|
94
|
+
if m.get('id') is not None:
|
|
95
|
+
self.id = m.get('id')
|
|
96
|
+
if m.get('type') is not None:
|
|
97
|
+
self.type = m.get('type')
|
|
98
|
+
if m.get('description') is not None:
|
|
99
|
+
self.description = m.get('description')
|
|
100
|
+
if m.get('startTime') is not None:
|
|
101
|
+
self.start_time = m.get('startTime')
|
|
102
|
+
if m.get('finishTime') is not None:
|
|
103
|
+
self.finish_time = m.get('finishTime')
|
|
104
|
+
if m.get('phase') is not None:
|
|
105
|
+
self.phase = m.get('phase')
|
|
106
|
+
if m.get('processes') is not None:
|
|
107
|
+
self.processes = m.get('processes')
|
|
108
|
+
return self
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for UpdateAutoscalerConfigurationV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpdateAutoscalerConfigurationV2Request(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for UpdateAutoscalerConfigurationV2Request operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(
|
|
16
|
+
self,
|
|
17
|
+
cluster_id,
|
|
18
|
+
expander,
|
|
19
|
+
instance_groups=None,
|
|
20
|
+
kube_version=None,
|
|
21
|
+
max_empty_bulk_delete=None,
|
|
22
|
+
scale_down_delay_after_add=None,
|
|
23
|
+
scale_down_enabled=None,
|
|
24
|
+
scale_down_gpu_utilization_threshold=None,
|
|
25
|
+
scale_down_unneeded_time=None,
|
|
26
|
+
scale_down_utilization_threshold=None,
|
|
27
|
+
skip_nodes_with_local_storage=None,
|
|
28
|
+
skip_nodes_with_system_pods=None,
|
|
29
|
+
custom_configs=None,
|
|
30
|
+
):
|
|
31
|
+
"""
|
|
32
|
+
Initialize UpdateAutoscalerConfigurationV2Request request entity.
|
|
33
|
+
|
|
34
|
+
:param cluster_id: cluster_id parameter
|
|
35
|
+
:type cluster_id: str (required)
|
|
36
|
+
|
|
37
|
+
:param expander: expander parameter
|
|
38
|
+
:type expander: str (required)
|
|
39
|
+
|
|
40
|
+
:param instance_groups: 节点组的 Autoscaler 配置。用户无需输入此项内容。
|
|
41
|
+
:type instance_groups: List[object] (optional)
|
|
42
|
+
|
|
43
|
+
:param kube_version: K8S 版本。为空时,后台会自动查询集群 K8S 版本号。
|
|
44
|
+
:type kube_version: str (optional)
|
|
45
|
+
|
|
46
|
+
:param max_empty_bulk_delete: 最大并发缩容数
|
|
47
|
+
:type max_empty_bulk_delete: int (optional)
|
|
48
|
+
|
|
49
|
+
:param scale_down_delay_after_add: 扩容后缩容启动时延,单位为分钟
|
|
50
|
+
:type scale_down_delay_after_add: int (optional)
|
|
51
|
+
|
|
52
|
+
:param scale_down_enabled: 是否启用缩容。默认值为 false。
|
|
53
|
+
:type scale_down_enabled: bool (optional)
|
|
54
|
+
|
|
55
|
+
:param scale_down_gpu_utilization_threshold: GPU 缩容阈值百分比,取值范围为 (0, 100)。
|
|
56
|
+
:type scale_down_gpu_utilization_threshold: int (optional)
|
|
57
|
+
|
|
58
|
+
:param scale_down_unneeded_time: 缩容触发时延,单位为分钟。
|
|
59
|
+
:type scale_down_unneeded_time: int (optional)
|
|
60
|
+
|
|
61
|
+
:param scale_down_utilization_threshold: 缩容阈值百分比,取值范围为 (0, 100)。
|
|
62
|
+
:type scale_down_utilization_threshold: int (optional)
|
|
63
|
+
|
|
64
|
+
:param skip_nodes_with_local_storage: 是否跳过使用本地存储的节点。默认值为 true。
|
|
65
|
+
:type skip_nodes_with_local_storage: bool (optional)
|
|
66
|
+
|
|
67
|
+
:param skip_nodes_with_system_pods: 是否跳过有部署系统 Pod 的节点。默认值为 true。
|
|
68
|
+
:type skip_nodes_with_system_pods: bool (optional)
|
|
69
|
+
|
|
70
|
+
:param custom_configs: 用户自定义配置。
|
|
71
|
+
:type custom_configs: Dict[str, str] (optional)
|
|
72
|
+
"""
|
|
73
|
+
super().__init__()
|
|
74
|
+
self.cluster_id = cluster_id
|
|
75
|
+
self.expander = expander
|
|
76
|
+
self.instance_groups = instance_groups
|
|
77
|
+
self.kube_version = kube_version
|
|
78
|
+
self.max_empty_bulk_delete = max_empty_bulk_delete
|
|
79
|
+
self.scale_down_delay_after_add = scale_down_delay_after_add
|
|
80
|
+
self.scale_down_enabled = scale_down_enabled
|
|
81
|
+
self.scale_down_gpu_utilization_threshold = scale_down_gpu_utilization_threshold
|
|
82
|
+
self.scale_down_unneeded_time = scale_down_unneeded_time
|
|
83
|
+
self.scale_down_utilization_threshold = scale_down_utilization_threshold
|
|
84
|
+
self.skip_nodes_with_local_storage = skip_nodes_with_local_storage
|
|
85
|
+
self.skip_nodes_with_system_pods = skip_nodes_with_system_pods
|
|
86
|
+
self.custom_configs = custom_configs
|
|
87
|
+
|
|
88
|
+
def to_dict(self):
|
|
89
|
+
"""
|
|
90
|
+
Convert the request entity to a dictionary representation.
|
|
91
|
+
|
|
92
|
+
Nested model objects are recursively converted to dictionaries.
|
|
93
|
+
|
|
94
|
+
:return: Dictionary representation of the request
|
|
95
|
+
:rtype: dict
|
|
96
|
+
"""
|
|
97
|
+
_map = super().to_dict()
|
|
98
|
+
if _map is not None:
|
|
99
|
+
return _map
|
|
100
|
+
result = dict()
|
|
101
|
+
if self.expander is not None:
|
|
102
|
+
result['expander'] = self.expander
|
|
103
|
+
if self.instance_groups is not None:
|
|
104
|
+
result['instanceGroups'] = self.instance_groups
|
|
105
|
+
if self.kube_version is not None:
|
|
106
|
+
result['kubeVersion'] = self.kube_version
|
|
107
|
+
if self.max_empty_bulk_delete is not None:
|
|
108
|
+
result['maxEmptyBulkDelete'] = self.max_empty_bulk_delete
|
|
109
|
+
if self.scale_down_delay_after_add is not None:
|
|
110
|
+
result['scaleDownDelayAfterAdd'] = self.scale_down_delay_after_add
|
|
111
|
+
if self.scale_down_enabled is not None:
|
|
112
|
+
result['scaleDownEnabled'] = self.scale_down_enabled
|
|
113
|
+
if self.scale_down_gpu_utilization_threshold is not None:
|
|
114
|
+
result['scaleDownGPUUtilizationThreshold'] = self.scale_down_gpu_utilization_threshold
|
|
115
|
+
if self.scale_down_unneeded_time is not None:
|
|
116
|
+
result['scaleDownUnneededTime'] = self.scale_down_unneeded_time
|
|
117
|
+
if self.scale_down_utilization_threshold is not None:
|
|
118
|
+
result['scaleDownUtilizationThreshold'] = self.scale_down_utilization_threshold
|
|
119
|
+
if self.skip_nodes_with_local_storage is not None:
|
|
120
|
+
result['skipNodesWithLocalStorage'] = self.skip_nodes_with_local_storage
|
|
121
|
+
if self.skip_nodes_with_system_pods is not None:
|
|
122
|
+
result['skipNodesWithSystemPods'] = self.skip_nodes_with_system_pods
|
|
123
|
+
if self.custom_configs is not None:
|
|
124
|
+
result['customConfigs'] = self.custom_configs
|
|
125
|
+
return result
|
|
126
|
+
|
|
127
|
+
def from_dict(self, m):
|
|
128
|
+
"""
|
|
129
|
+
Populate the request entity from a dictionary.
|
|
130
|
+
|
|
131
|
+
Nested dictionaries are recursively converted to model objects.
|
|
132
|
+
|
|
133
|
+
:param m: Dictionary containing request data
|
|
134
|
+
:type m: dict
|
|
135
|
+
|
|
136
|
+
:return: Self reference for method chaining
|
|
137
|
+
:rtype: UpdateAutoscalerConfigurationV2Request
|
|
138
|
+
|
|
139
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
140
|
+
:raises ValueError: If nested model conversion fails
|
|
141
|
+
"""
|
|
142
|
+
m = m or dict()
|
|
143
|
+
if m.get('clusterID') is not None:
|
|
144
|
+
self.cluster_id = m.get('clusterID')
|
|
145
|
+
if m.get('expander') is not None:
|
|
146
|
+
self.expander = m.get('expander')
|
|
147
|
+
if m.get('instanceGroups') is not None:
|
|
148
|
+
self.instance_groups = m.get('instanceGroups')
|
|
149
|
+
if m.get('kubeVersion') is not None:
|
|
150
|
+
self.kube_version = m.get('kubeVersion')
|
|
151
|
+
if m.get('maxEmptyBulkDelete') is not None:
|
|
152
|
+
self.max_empty_bulk_delete = m.get('maxEmptyBulkDelete')
|
|
153
|
+
if m.get('scaleDownDelayAfterAdd') is not None:
|
|
154
|
+
self.scale_down_delay_after_add = m.get('scaleDownDelayAfterAdd')
|
|
155
|
+
if m.get('scaleDownEnabled') is not None:
|
|
156
|
+
self.scale_down_enabled = m.get('scaleDownEnabled')
|
|
157
|
+
if m.get('scaleDownGPUUtilizationThreshold') is not None:
|
|
158
|
+
self.scale_down_gpu_utilization_threshold = m.get('scaleDownGPUUtilizationThreshold')
|
|
159
|
+
if m.get('scaleDownUnneededTime') is not None:
|
|
160
|
+
self.scale_down_unneeded_time = m.get('scaleDownUnneededTime')
|
|
161
|
+
if m.get('scaleDownUtilizationThreshold') is not None:
|
|
162
|
+
self.scale_down_utilization_threshold = m.get('scaleDownUtilizationThreshold')
|
|
163
|
+
if m.get('skipNodesWithLocalStorage') is not None:
|
|
164
|
+
self.skip_nodes_with_local_storage = m.get('skipNodesWithLocalStorage')
|
|
165
|
+
if m.get('skipNodesWithSystemPods') is not None:
|
|
166
|
+
self.skip_nodes_with_system_pods = m.get('skipNodesWithSystemPods')
|
|
167
|
+
if m.get('customConfigs') is not None:
|
|
168
|
+
self.custom_configs = m.get('customConfigs')
|
|
169
|
+
return self
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for UpdateAutoscalerConfigurationV2Response information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpdateAutoscalerConfigurationV2Response(BceResponse):
|
|
9
|
+
"""
|
|
10
|
+
UpdateAutoscalerConfigurationV2Response
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, request_id=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize UpdateAutoscalerConfigurationV2Response response.
|
|
16
|
+
|
|
17
|
+
:param request_id: 请求 ID,问题定位时请提供该 ID
|
|
18
|
+
:type request_id: str (optional)
|
|
19
|
+
"""
|
|
20
|
+
super().__init__()
|
|
21
|
+
self.request_id = request_id
|
|
22
|
+
|
|
23
|
+
def to_dict(self):
|
|
24
|
+
"""
|
|
25
|
+
Convert the response instance to a dictionary representation.
|
|
26
|
+
|
|
27
|
+
Includes metadata from the parent BceResponse class.
|
|
28
|
+
Nested model objects are recursively converted to dictionaries.
|
|
29
|
+
|
|
30
|
+
:return: Dictionary representation of the response
|
|
31
|
+
:rtype: dict
|
|
32
|
+
"""
|
|
33
|
+
_map = super().to_dict()
|
|
34
|
+
if _map is not None:
|
|
35
|
+
return _map
|
|
36
|
+
result = dict()
|
|
37
|
+
if self.metadata is not None:
|
|
38
|
+
result['metadata'] = dict(self.metadata)
|
|
39
|
+
if self.request_id is not None:
|
|
40
|
+
result['requestID'] = self.request_id
|
|
41
|
+
return result
|
|
42
|
+
|
|
43
|
+
def from_dict(self, m):
|
|
44
|
+
"""
|
|
45
|
+
Populate the response instance from a dictionary.
|
|
46
|
+
|
|
47
|
+
Nested dictionaries are recursively converted to model objects.
|
|
48
|
+
|
|
49
|
+
:param m: Dictionary containing response data
|
|
50
|
+
:type m: dict
|
|
51
|
+
|
|
52
|
+
:return: Self reference for method chaining
|
|
53
|
+
:rtype: UpdateAutoscalerConfigurationV2Response
|
|
54
|
+
|
|
55
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
56
|
+
:raises ValueError: If nested model conversion fails
|
|
57
|
+
"""
|
|
58
|
+
m = m or dict()
|
|
59
|
+
if m.get('requestID') is not None:
|
|
60
|
+
self.request_id = m.get('requestID')
|
|
61
|
+
return self
|