Skip to content

Commit 7c86ab9

Browse files
committed
feat: update vke api
1 parent aaee78c commit 7c86ab9

17 files changed

+1510
-40
lines changed

volcenginesdkvke/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@
107107
from volcenginesdkvke.models.list_supported_resource_types_response import ListSupportedResourceTypesResponse
108108
from volcenginesdkvke.models.list_tags_for_resources_request import ListTagsForResourcesRequest
109109
from volcenginesdkvke.models.list_tags_for_resources_response import ListTagsForResourcesResponse
110+
from volcenginesdkvke.models.log_setup_for_create_cluster_input import LogSetupForCreateClusterInput
111+
from volcenginesdkvke.models.log_setup_for_list_clusters_output import LogSetupForListClustersOutput
112+
from volcenginesdkvke.models.log_setup_for_update_cluster_config_input import LogSetupForUpdateClusterConfigInput
113+
from volcenginesdkvke.models.logging_config_for_create_cluster_input import LoggingConfigForCreateClusterInput
114+
from volcenginesdkvke.models.logging_config_for_list_clusters_output import LoggingConfigForListClustersOutput
115+
from volcenginesdkvke.models.logging_config_for_update_cluster_config_input import LoggingConfigForUpdateClusterConfigInput
110116
from volcenginesdkvke.models.login_for_create_default_node_pool_input import LoginForCreateDefaultNodePoolInput
111117
from volcenginesdkvke.models.login_for_create_node_pool_input import LoginForCreateNodePoolInput
112118
from volcenginesdkvke.models.login_for_list_node_pools_output import LoginForListNodePoolsOutput
@@ -119,6 +125,7 @@
119125
from volcenginesdkvke.models.node_statistics_for_list_node_pools_output import NodeStatisticsForListNodePoolsOutput
120126
from volcenginesdkvke.models.pods_config_for_create_cluster_input import PodsConfigForCreateClusterInput
121127
from volcenginesdkvke.models.pods_config_for_list_clusters_output import PodsConfigForListClustersOutput
128+
from volcenginesdkvke.models.pods_config_for_update_cluster_config_input import PodsConfigForUpdateClusterConfigInput
122129
from volcenginesdkvke.models.private_ip_for_list_clusters_output import PrivateIpForListClustersOutput
123130
from volcenginesdkvke.models.public_access_network_config_for_create_cluster_input import PublicAccessNetworkConfigForCreateClusterInput
124131
from volcenginesdkvke.models.public_access_network_config_for_list_clusters_output import PublicAccessNetworkConfigForListClustersOutput
@@ -173,3 +180,4 @@
173180
from volcenginesdkvke.models.version_for_list_supported_addons_output import VersionForListSupportedAddonsOutput
174181
from volcenginesdkvke.models.vpc_cni_config_for_create_cluster_input import VpcCniConfigForCreateClusterInput
175182
from volcenginesdkvke.models.vpc_cni_config_for_list_clusters_output import VpcCniConfigForListClustersOutput
183+
from volcenginesdkvke.models.vpc_cni_config_for_update_cluster_config_input import VpcCniConfigForUpdateClusterConfigInput

volcenginesdkvke/api/vke_api.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def create_addon_with_http_info(self, body, **kwargs): # noqa: E501
115115
auth_settings = ['volcengineSign'] # noqa: E501
116116

117117
return self.api_client.call_api(
118-
'/CreateAddon/2022-05-12/vke/post/', 'POST',
118+
'/CreateAddon/2022-05-12/vke/post/application_json/', 'POST',
119119
path_params,
120120
query_params,
121121
header_params,
@@ -212,7 +212,7 @@ def create_cluster_with_http_info(self, body, **kwargs): # noqa: E501
212212
auth_settings = ['volcengineSign'] # noqa: E501
213213

214214
return self.api_client.call_api(
215-
'/CreateCluster/2022-05-12/vke/post/', 'POST',
215+
'/CreateCluster/2022-05-12/vke/post/application_json/', 'POST',
216216
path_params,
217217
query_params,
218218
header_params,
@@ -309,7 +309,7 @@ def create_default_node_pool_with_http_info(self, body, **kwargs): # noqa: E501
309309
auth_settings = ['volcengineSign'] # noqa: E501
310310

311311
return self.api_client.call_api(
312-
'/CreateDefaultNodePool/2022-05-12/vke/post/', 'POST',
312+
'/CreateDefaultNodePool/2022-05-12/vke/post/application_json/', 'POST',
313313
path_params,
314314
query_params,
315315
header_params,
@@ -406,7 +406,7 @@ def create_kubeconfig_with_http_info(self, body, **kwargs): # noqa: E501
406406
auth_settings = ['volcengineSign'] # noqa: E501
407407

408408
return self.api_client.call_api(
409-
'/CreateKubeconfig/2022-05-12/vke/post/', 'POST',
409+
'/CreateKubeconfig/2022-05-12/vke/post/application_json/', 'POST',
410410
path_params,
411411
query_params,
412412
header_params,
@@ -503,7 +503,7 @@ def create_node_pool_with_http_info(self, body, **kwargs): # noqa: E501
503503
auth_settings = ['volcengineSign'] # noqa: E501
504504

505505
return self.api_client.call_api(
506-
'/CreateNodePool/2022-05-12/vke/post/', 'POST',
506+
'/CreateNodePool/2022-05-12/vke/post/application_json/', 'POST',
507507
path_params,
508508
query_params,
509509
header_params,
@@ -600,7 +600,7 @@ def create_nodes_with_http_info(self, body, **kwargs): # noqa: E501
600600
auth_settings = ['volcengineSign'] # noqa: E501
601601

602602
return self.api_client.call_api(
603-
'/CreateNodes/2022-05-12/vke/post/', 'POST',
603+
'/CreateNodes/2022-05-12/vke/post/application_json/', 'POST',
604604
path_params,
605605
query_params,
606606
header_params,
@@ -697,7 +697,7 @@ def delete_addon_with_http_info(self, body, **kwargs): # noqa: E501
697697
auth_settings = ['volcengineSign'] # noqa: E501
698698

699699
return self.api_client.call_api(
700-
'/DeleteAddon/2022-05-12/vke/post/', 'POST',
700+
'/DeleteAddon/2022-05-12/vke/post/application_json/', 'POST',
701701
path_params,
702702
query_params,
703703
header_params,
@@ -794,7 +794,7 @@ def delete_cluster_with_http_info(self, body, **kwargs): # noqa: E501
794794
auth_settings = ['volcengineSign'] # noqa: E501
795795

796796
return self.api_client.call_api(
797-
'/DeleteCluster/2022-05-12/vke/post/', 'POST',
797+
'/DeleteCluster/2022-05-12/vke/post/application_json/', 'POST',
798798
path_params,
799799
query_params,
800800
header_params,
@@ -891,7 +891,7 @@ def delete_kubeconfigs_with_http_info(self, body, **kwargs): # noqa: E501
891891
auth_settings = ['volcengineSign'] # noqa: E501
892892

893893
return self.api_client.call_api(
894-
'/DeleteKubeconfigs/2022-05-12/vke/post/', 'POST',
894+
'/DeleteKubeconfigs/2022-05-12/vke/post/application_json/', 'POST',
895895
path_params,
896896
query_params,
897897
header_params,
@@ -988,7 +988,7 @@ def delete_node_pool_with_http_info(self, body, **kwargs): # noqa: E501
988988
auth_settings = ['volcengineSign'] # noqa: E501
989989

990990
return self.api_client.call_api(
991-
'/DeleteNodePool/2022-05-12/vke/post/', 'POST',
991+
'/DeleteNodePool/2022-05-12/vke/post/application_json/', 'POST',
992992
path_params,
993993
query_params,
994994
header_params,
@@ -1085,7 +1085,7 @@ def delete_nodes_with_http_info(self, body, **kwargs): # noqa: E501
10851085
auth_settings = ['volcengineSign'] # noqa: E501
10861086

10871087
return self.api_client.call_api(
1088-
'/DeleteNodes/2022-05-12/vke/post/', 'POST',
1088+
'/DeleteNodes/2022-05-12/vke/post/application_json/', 'POST',
10891089
path_params,
10901090
query_params,
10911091
header_params,
@@ -1182,7 +1182,7 @@ def forward_kubernetes_api_with_http_info(self, body, **kwargs): # noqa: E501
11821182
auth_settings = ['volcengineSign'] # noqa: E501
11831183

11841184
return self.api_client.call_api(
1185-
'/ForwardKubernetesApi/2022-05-12/vke/post/', 'POST',
1185+
'/ForwardKubernetesApi/2022-05-12/vke/post/application_json/', 'POST',
11861186
path_params,
11871187
query_params,
11881188
header_params,
@@ -1279,7 +1279,7 @@ def list_addons_with_http_info(self, body, **kwargs): # noqa: E501
12791279
auth_settings = ['volcengineSign'] # noqa: E501
12801280

12811281
return self.api_client.call_api(
1282-
'/ListAddons/2022-05-12/vke/post/', 'POST',
1282+
'/ListAddons/2022-05-12/vke/post/application_json/', 'POST',
12831283
path_params,
12841284
query_params,
12851285
header_params,
@@ -1376,7 +1376,7 @@ def list_clusters_with_http_info(self, body, **kwargs): # noqa: E501
13761376
auth_settings = ['volcengineSign'] # noqa: E501
13771377

13781378
return self.api_client.call_api(
1379-
'/ListClusters/2022-05-12/vke/post/', 'POST',
1379+
'/ListClusters/2022-05-12/vke/post/application_json/', 'POST',
13801380
path_params,
13811381
query_params,
13821382
header_params,
@@ -1473,7 +1473,7 @@ def list_kubeconfigs_with_http_info(self, body, **kwargs): # noqa: E501
14731473
auth_settings = ['volcengineSign'] # noqa: E501
14741474

14751475
return self.api_client.call_api(
1476-
'/ListKubeconfigs/2022-05-12/vke/post/', 'POST',
1476+
'/ListKubeconfigs/2022-05-12/vke/post/application_json/', 'POST',
14771477
path_params,
14781478
query_params,
14791479
header_params,
@@ -1570,7 +1570,7 @@ def list_node_pools_with_http_info(self, body, **kwargs): # noqa: E501
15701570
auth_settings = ['volcengineSign'] # noqa: E501
15711571

15721572
return self.api_client.call_api(
1573-
'/ListNodePools/2022-05-12/vke/post/', 'POST',
1573+
'/ListNodePools/2022-05-12/vke/post/application_json/', 'POST',
15741574
path_params,
15751575
query_params,
15761576
header_params,
@@ -1667,7 +1667,7 @@ def list_nodes_with_http_info(self, body, **kwargs): # noqa: E501
16671667
auth_settings = ['volcengineSign'] # noqa: E501
16681668

16691669
return self.api_client.call_api(
1670-
'/ListNodes/2022-05-12/vke/post/', 'POST',
1670+
'/ListNodes/2022-05-12/vke/post/application_json/', 'POST',
16711671
path_params,
16721672
query_params,
16731673
header_params,
@@ -1764,7 +1764,7 @@ def list_supported_addons_with_http_info(self, body, **kwargs): # noqa: E501
17641764
auth_settings = ['volcengineSign'] # noqa: E501
17651765

17661766
return self.api_client.call_api(
1767-
'/ListSupportedAddons/2022-05-12/vke/post/', 'POST',
1767+
'/ListSupportedAddons/2022-05-12/vke/post/application_json/', 'POST',
17681768
path_params,
17691769
query_params,
17701770
header_params,
@@ -1861,7 +1861,7 @@ def list_supported_resource_types_with_http_info(self, body, **kwargs): # noqa:
18611861
auth_settings = ['volcengineSign'] # noqa: E501
18621862

18631863
return self.api_client.call_api(
1864-
'/ListSupportedResourceTypes/2022-05-12/vke/post/', 'POST',
1864+
'/ListSupportedResourceTypes/2022-05-12/vke/post/application_json/', 'POST',
18651865
path_params,
18661866
query_params,
18671867
header_params,
@@ -1958,7 +1958,7 @@ def list_tags_for_resources_with_http_info(self, body, **kwargs): # noqa: E501
19581958
auth_settings = ['volcengineSign'] # noqa: E501
19591959

19601960
return self.api_client.call_api(
1961-
'/ListTagsForResources/2022-05-12/vke/post/', 'POST',
1961+
'/ListTagsForResources/2022-05-12/vke/post/application_json/', 'POST',
19621962
path_params,
19631963
query_params,
19641964
header_params,
@@ -2055,7 +2055,7 @@ def tag_resources_with_http_info(self, body, **kwargs): # noqa: E501
20552055
auth_settings = ['volcengineSign'] # noqa: E501
20562056

20572057
return self.api_client.call_api(
2058-
'/TagResources/2022-05-12/vke/post/', 'POST',
2058+
'/TagResources/2022-05-12/vke/post/application_json/', 'POST',
20592059
path_params,
20602060
query_params,
20612061
header_params,
@@ -2152,7 +2152,7 @@ def untag_resources_with_http_info(self, body, **kwargs): # noqa: E501
21522152
auth_settings = ['volcengineSign'] # noqa: E501
21532153

21542154
return self.api_client.call_api(
2155-
'/UntagResources/2022-05-12/vke/post/', 'POST',
2155+
'/UntagResources/2022-05-12/vke/post/application_json/', 'POST',
21562156
path_params,
21572157
query_params,
21582158
header_params,
@@ -2249,7 +2249,7 @@ def update_addon_config_with_http_info(self, body, **kwargs): # noqa: E501
22492249
auth_settings = ['volcengineSign'] # noqa: E501
22502250

22512251
return self.api_client.call_api(
2252-
'/UpdateAddonConfig/2022-05-12/vke/post/', 'POST',
2252+
'/UpdateAddonConfig/2022-05-12/vke/post/application_json/', 'POST',
22532253
path_params,
22542254
query_params,
22552255
header_params,
@@ -2346,7 +2346,7 @@ def update_addon_version_with_http_info(self, body, **kwargs): # noqa: E501
23462346
auth_settings = ['volcengineSign'] # noqa: E501
23472347

23482348
return self.api_client.call_api(
2349-
'/UpdateAddonVersion/2022-05-12/vke/post/', 'POST',
2349+
'/UpdateAddonVersion/2022-05-12/vke/post/application_json/', 'POST',
23502350
path_params,
23512351
query_params,
23522352
header_params,
@@ -2443,7 +2443,7 @@ def update_cluster_config_with_http_info(self, body, **kwargs): # noqa: E501
24432443
auth_settings = ['volcengineSign'] # noqa: E501
24442444

24452445
return self.api_client.call_api(
2446-
'/UpdateClusterConfig/2022-05-12/vke/post/', 'POST',
2446+
'/UpdateClusterConfig/2022-05-12/vke/post/application_json/', 'POST',
24472447
path_params,
24482448
query_params,
24492449
header_params,
@@ -2540,7 +2540,7 @@ def update_node_pool_config_with_http_info(self, body, **kwargs): # noqa: E501
25402540
auth_settings = ['volcengineSign'] # noqa: E501
25412541

25422542
return self.api_client.call_api(
2543-
'/UpdateNodePoolConfig/2022-05-12/vke/post/', 'POST',
2543+
'/UpdateNodePoolConfig/2022-05-12/vke/post/application_json/', 'POST',
25442544
path_params,
25452545
query_params,
25462546
header_params,

volcenginesdkvke/models/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@
103103
from volcenginesdkvke.models.list_supported_resource_types_response import ListSupportedResourceTypesResponse
104104
from volcenginesdkvke.models.list_tags_for_resources_request import ListTagsForResourcesRequest
105105
from volcenginesdkvke.models.list_tags_for_resources_response import ListTagsForResourcesResponse
106+
from volcenginesdkvke.models.log_setup_for_create_cluster_input import LogSetupForCreateClusterInput
107+
from volcenginesdkvke.models.log_setup_for_list_clusters_output import LogSetupForListClustersOutput
108+
from volcenginesdkvke.models.log_setup_for_update_cluster_config_input import LogSetupForUpdateClusterConfigInput
109+
from volcenginesdkvke.models.logging_config_for_create_cluster_input import LoggingConfigForCreateClusterInput
110+
from volcenginesdkvke.models.logging_config_for_list_clusters_output import LoggingConfigForListClustersOutput
111+
from volcenginesdkvke.models.logging_config_for_update_cluster_config_input import LoggingConfigForUpdateClusterConfigInput
106112
from volcenginesdkvke.models.login_for_create_default_node_pool_input import LoginForCreateDefaultNodePoolInput
107113
from volcenginesdkvke.models.login_for_create_node_pool_input import LoginForCreateNodePoolInput
108114
from volcenginesdkvke.models.login_for_list_node_pools_output import LoginForListNodePoolsOutput
@@ -115,6 +121,7 @@
115121
from volcenginesdkvke.models.node_statistics_for_list_node_pools_output import NodeStatisticsForListNodePoolsOutput
116122
from volcenginesdkvke.models.pods_config_for_create_cluster_input import PodsConfigForCreateClusterInput
117123
from volcenginesdkvke.models.pods_config_for_list_clusters_output import PodsConfigForListClustersOutput
124+
from volcenginesdkvke.models.pods_config_for_update_cluster_config_input import PodsConfigForUpdateClusterConfigInput
118125
from volcenginesdkvke.models.private_ip_for_list_clusters_output import PrivateIpForListClustersOutput
119126
from volcenginesdkvke.models.public_access_network_config_for_create_cluster_input import PublicAccessNetworkConfigForCreateClusterInput
120127
from volcenginesdkvke.models.public_access_network_config_for_list_clusters_output import PublicAccessNetworkConfigForListClustersOutput
@@ -169,3 +176,4 @@
169176
from volcenginesdkvke.models.version_for_list_supported_addons_output import VersionForListSupportedAddonsOutput
170177
from volcenginesdkvke.models.vpc_cni_config_for_create_cluster_input import VpcCniConfigForCreateClusterInput
171178
from volcenginesdkvke.models.vpc_cni_config_for_list_clusters_output import VpcCniConfigForListClustersOutput
179+
from volcenginesdkvke.models.vpc_cni_config_for_update_cluster_config_input import VpcCniConfigForUpdateClusterConfigInput

volcenginesdkvke/models/auto_scaling_for_create_node_pool_input.py

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,20 @@ class AutoScalingForCreateNodePoolInput(object):
3737
'enabled': 'bool',
3838
'max_replicas': 'int',
3939
'min_replicas': 'int',
40-
'priority': 'int'
40+
'priority': 'int',
41+
'subnet_policy': 'str'
4142
}
4243

4344
attribute_map = {
4445
'desired_replicas': 'DesiredReplicas',
4546
'enabled': 'Enabled',
4647
'max_replicas': 'MaxReplicas',
4748
'min_replicas': 'MinReplicas',
48-
'priority': 'Priority'
49+
'priority': 'Priority',
50+
'subnet_policy': 'SubnetPolicy'
4951
}
5052

51-
def __init__(self, desired_replicas=None, enabled=None, max_replicas=None, min_replicas=None, priority=None, _configuration=None): # noqa: E501
53+
def __init__(self, desired_replicas=None, enabled=None, max_replicas=None, min_replicas=None, priority=None, subnet_policy=None, _configuration=None): # noqa: E501
5254
"""AutoScalingForCreateNodePoolInput - a model defined in Swagger""" # noqa: E501
5355
if _configuration is None:
5456
_configuration = Configuration()
@@ -59,6 +61,7 @@ def __init__(self, desired_replicas=None, enabled=None, max_replicas=None, min_r
5961
self._max_replicas = None
6062
self._min_replicas = None
6163
self._priority = None
64+
self._subnet_policy = None
6265
self.discriminator = None
6366

6467
if desired_replicas is not None:
@@ -71,6 +74,8 @@ def __init__(self, desired_replicas=None, enabled=None, max_replicas=None, min_r
7174
self.min_replicas = min_replicas
7275
if priority is not None:
7376
self.priority = priority
77+
if subnet_policy is not None:
78+
self.subnet_policy = subnet_policy
7479

7580
@property
7681
def desired_replicas(self):
@@ -177,6 +182,34 @@ def priority(self, priority):
177182

178183
self._priority = priority
179184

185+
@property
186+
def subnet_policy(self):
187+
"""Gets the subnet_policy of this AutoScalingForCreateNodePoolInput. # noqa: E501
188+
189+
190+
:return: The subnet_policy of this AutoScalingForCreateNodePoolInput. # noqa: E501
191+
:rtype: str
192+
"""
193+
return self._subnet_policy
194+
195+
@subnet_policy.setter
196+
def subnet_policy(self, subnet_policy):
197+
"""Sets the subnet_policy of this AutoScalingForCreateNodePoolInput.
198+
199+
200+
:param subnet_policy: The subnet_policy of this AutoScalingForCreateNodePoolInput. # noqa: E501
201+
:type: str
202+
"""
203+
allowed_values = ["Priority", "ZoneBalance"] # noqa: E501
204+
if (self._configuration.client_side_validation and
205+
subnet_policy not in allowed_values):
206+
raise ValueError(
207+
"Invalid value for `subnet_policy` ({0}), must be one of {1}" # noqa: E501
208+
.format(subnet_policy, allowed_values)
209+
)
210+
211+
self._subnet_policy = subnet_policy
212+
180213
def to_dict(self):
181214
"""Returns the model properties as a dict"""
182215
result = {}

0 commit comments

Comments
 (0)