Skip to content

Commit 108d6ca

Browse files
committed
feat: update vke api
1 parent 42ed810 commit 108d6ca

File tree

5 files changed

+207
-4
lines changed

5 files changed

+207
-4
lines changed

volcenginesdkvke/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@
148148
from volcenginesdkvke.models.tag_for_create_node_pool_input import TagForCreateNodePoolInput
149149
from volcenginesdkvke.models.tag_for_list_clusters_input import TagForListClustersInput
150150
from volcenginesdkvke.models.tag_for_list_clusters_output import TagForListClustersOutput
151+
from volcenginesdkvke.models.tag_for_list_node_pools_input import TagForListNodePoolsInput
151152
from volcenginesdkvke.models.tag_for_list_node_pools_output import TagForListNodePoolsOutput
152153
from volcenginesdkvke.models.tag_for_tag_resources_input import TagForTagResourcesInput
153154
from volcenginesdkvke.models.tag_for_update_node_pool_config_input import TagForUpdateNodePoolConfigInput

volcenginesdkvke/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
from volcenginesdkvke.models.tag_for_create_node_pool_input import TagForCreateNodePoolInput
145145
from volcenginesdkvke.models.tag_for_list_clusters_input import TagForListClustersInput
146146
from volcenginesdkvke.models.tag_for_list_clusters_output import TagForListClustersOutput
147+
from volcenginesdkvke.models.tag_for_list_node_pools_input import TagForListNodePoolsInput
147148
from volcenginesdkvke.models.tag_for_list_node_pools_output import TagForListNodePoolsOutput
148149
from volcenginesdkvke.models.tag_for_tag_resources_input import TagForTagResourcesInput
149150
from volcenginesdkvke.models.tag_for_update_node_pool_config_input import TagForUpdateNodePoolConfigInput

volcenginesdkvke/models/create_nodes_request.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class CreateNodesRequest(object):
3737
'client_token': 'str',
3838
'cluster_id': 'str',
3939
'container_storage_path': 'str',
40+
'image_id': 'str',
4041
'initialize_script': 'str',
4142
'instance_ids': 'list[str]',
4243
'keep_instance_name': 'bool',
@@ -48,13 +49,14 @@ class CreateNodesRequest(object):
4849
'client_token': 'ClientToken',
4950
'cluster_id': 'ClusterId',
5051
'container_storage_path': 'ContainerStoragePath',
52+
'image_id': 'ImageId',
5153
'initialize_script': 'InitializeScript',
5254
'instance_ids': 'InstanceIds',
5355
'keep_instance_name': 'KeepInstanceName',
5456
'kubernetes_config': 'KubernetesConfig'
5557
}
5658

57-
def __init__(self, additional_container_storage_enabled=None, client_token=None, cluster_id=None, container_storage_path=None, initialize_script=None, instance_ids=None, keep_instance_name=None, kubernetes_config=None, _configuration=None): # noqa: E501
59+
def __init__(self, additional_container_storage_enabled=None, client_token=None, cluster_id=None, container_storage_path=None, image_id=None, initialize_script=None, instance_ids=None, keep_instance_name=None, kubernetes_config=None, _configuration=None): # noqa: E501
5860
"""CreateNodesRequest - a model defined in Swagger""" # noqa: E501
5961
if _configuration is None:
6062
_configuration = Configuration()
@@ -64,6 +66,7 @@ def __init__(self, additional_container_storage_enabled=None, client_token=None,
6466
self._client_token = None
6567
self._cluster_id = None
6668
self._container_storage_path = None
69+
self._image_id = None
6770
self._initialize_script = None
6871
self._instance_ids = None
6972
self._keep_instance_name = None
@@ -78,6 +81,8 @@ def __init__(self, additional_container_storage_enabled=None, client_token=None,
7881
self.cluster_id = cluster_id
7982
if container_storage_path is not None:
8083
self.container_storage_path = container_storage_path
84+
if image_id is not None:
85+
self.image_id = image_id
8186
if initialize_script is not None:
8287
self.initialize_script = initialize_script
8388
if instance_ids is not None:
@@ -171,6 +176,27 @@ def container_storage_path(self, container_storage_path):
171176

172177
self._container_storage_path = container_storage_path
173178

179+
@property
180+
def image_id(self):
181+
"""Gets the image_id of this CreateNodesRequest. # noqa: E501
182+
183+
184+
:return: The image_id of this CreateNodesRequest. # noqa: E501
185+
:rtype: str
186+
"""
187+
return self._image_id
188+
189+
@image_id.setter
190+
def image_id(self, image_id):
191+
"""Sets the image_id of this CreateNodesRequest.
192+
193+
194+
:param image_id: The image_id of this CreateNodesRequest. # noqa: E501
195+
:type: str
196+
"""
197+
198+
self._image_id = image_id
199+
174200
@property
175201
def initialize_script(self):
176202
"""Gets the initialize_script of this CreateNodesRequest. # noqa: E501

volcenginesdkvke/models/list_node_pools_request.py

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,18 @@ class ListNodePoolsRequest(object):
3535
swagger_types = {
3636
'filter': 'FilterForListNodePoolsInput',
3737
'page_number': 'int',
38-
'page_size': 'int'
38+
'page_size': 'int',
39+
'tags': 'list[TagForListNodePoolsInput]'
3940
}
4041

4142
attribute_map = {
4243
'filter': 'Filter',
4344
'page_number': 'PageNumber',
44-
'page_size': 'PageSize'
45+
'page_size': 'PageSize',
46+
'tags': 'Tags'
4547
}
4648

47-
def __init__(self, filter=None, page_number=None, page_size=None, _configuration=None): # noqa: E501
49+
def __init__(self, filter=None, page_number=None, page_size=None, tags=None, _configuration=None): # noqa: E501
4850
"""ListNodePoolsRequest - a model defined in Swagger""" # noqa: E501
4951
if _configuration is None:
5052
_configuration = Configuration()
@@ -53,6 +55,7 @@ def __init__(self, filter=None, page_number=None, page_size=None, _configuration
5355
self._filter = None
5456
self._page_number = None
5557
self._page_size = None
58+
self._tags = None
5659
self.discriminator = None
5760

5861
if filter is not None:
@@ -61,6 +64,8 @@ def __init__(self, filter=None, page_number=None, page_size=None, _configuration
6164
self.page_number = page_number
6265
if page_size is not None:
6366
self.page_size = page_size
67+
if tags is not None:
68+
self.tags = tags
6469

6570
@property
6671
def filter(self):
@@ -125,6 +130,27 @@ def page_size(self, page_size):
125130

126131
self._page_size = page_size
127132

133+
@property
134+
def tags(self):
135+
"""Gets the tags of this ListNodePoolsRequest. # noqa: E501
136+
137+
138+
:return: The tags of this ListNodePoolsRequest. # noqa: E501
139+
:rtype: list[TagForListNodePoolsInput]
140+
"""
141+
return self._tags
142+
143+
@tags.setter
144+
def tags(self, tags):
145+
"""Sets the tags of this ListNodePoolsRequest.
146+
147+
148+
:param tags: The tags of this ListNodePoolsRequest. # noqa: E501
149+
:type: list[TagForListNodePoolsInput]
150+
"""
151+
152+
self._tags = tags
153+
128154
def to_dict(self):
129155
"""Returns the model properties as a dict"""
130156
result = {}
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# coding: utf-8
2+
3+
"""
4+
vke
5+
6+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7+
8+
OpenAPI spec version: common-version
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
14+
import pprint
15+
import re # noqa: F401
16+
17+
import six
18+
19+
from volcenginesdkcore.configuration import Configuration
20+
21+
22+
class TagForListNodePoolsInput(object):
23+
"""NOTE: This class is auto generated by the swagger code generator program.
24+
25+
Do not edit the class manually.
26+
"""
27+
28+
"""
29+
Attributes:
30+
swagger_types (dict): The key is attribute name
31+
and the value is attribute type.
32+
attribute_map (dict): The key is attribute name
33+
and the value is json key in definition.
34+
"""
35+
swagger_types = {
36+
'key': 'str',
37+
'value': 'str'
38+
}
39+
40+
attribute_map = {
41+
'key': 'Key',
42+
'value': 'Value'
43+
}
44+
45+
def __init__(self, key=None, value=None, _configuration=None): # noqa: E501
46+
"""TagForListNodePoolsInput - a model defined in Swagger""" # noqa: E501
47+
if _configuration is None:
48+
_configuration = Configuration()
49+
self._configuration = _configuration
50+
51+
self._key = None
52+
self._value = None
53+
self.discriminator = None
54+
55+
if key is not None:
56+
self.key = key
57+
if value is not None:
58+
self.value = value
59+
60+
@property
61+
def key(self):
62+
"""Gets the key of this TagForListNodePoolsInput. # noqa: E501
63+
64+
65+
:return: The key of this TagForListNodePoolsInput. # noqa: E501
66+
:rtype: str
67+
"""
68+
return self._key
69+
70+
@key.setter
71+
def key(self, key):
72+
"""Sets the key of this TagForListNodePoolsInput.
73+
74+
75+
:param key: The key of this TagForListNodePoolsInput. # noqa: E501
76+
:type: str
77+
"""
78+
79+
self._key = key
80+
81+
@property
82+
def value(self):
83+
"""Gets the value of this TagForListNodePoolsInput. # noqa: E501
84+
85+
86+
:return: The value of this TagForListNodePoolsInput. # noqa: E501
87+
:rtype: str
88+
"""
89+
return self._value
90+
91+
@value.setter
92+
def value(self, value):
93+
"""Sets the value of this TagForListNodePoolsInput.
94+
95+
96+
:param value: The value of this TagForListNodePoolsInput. # noqa: E501
97+
:type: str
98+
"""
99+
100+
self._value = value
101+
102+
def to_dict(self):
103+
"""Returns the model properties as a dict"""
104+
result = {}
105+
106+
for attr, _ in six.iteritems(self.swagger_types):
107+
value = getattr(self, attr)
108+
if isinstance(value, list):
109+
result[attr] = list(map(
110+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
111+
value
112+
))
113+
elif hasattr(value, "to_dict"):
114+
result[attr] = value.to_dict()
115+
elif isinstance(value, dict):
116+
result[attr] = dict(map(
117+
lambda item: (item[0], item[1].to_dict())
118+
if hasattr(item[1], "to_dict") else item,
119+
value.items()
120+
))
121+
else:
122+
result[attr] = value
123+
if issubclass(TagForListNodePoolsInput, dict):
124+
for key, value in self.items():
125+
result[key] = value
126+
127+
return result
128+
129+
def to_str(self):
130+
"""Returns the string representation of the model"""
131+
return pprint.pformat(self.to_dict())
132+
133+
def __repr__(self):
134+
"""For `print` and `pprint`"""
135+
return self.to_str()
136+
137+
def __eq__(self, other):
138+
"""Returns true if both objects are equal"""
139+
if not isinstance(other, TagForListNodePoolsInput):
140+
return False
141+
142+
return self.to_dict() == other.to_dict()
143+
144+
def __ne__(self, other):
145+
"""Returns true if both objects are not equal"""
146+
if not isinstance(other, TagForListNodePoolsInput):
147+
return True
148+
149+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)