Skip to content

Commit b4d11b0

Browse files
committed
Update client with OpenAPI generator v4.3.0
Signed-off-by: Nabarun Pal <[email protected]>
1 parent e60d921 commit b4d11b0

File tree

2,146 files changed

+170248
-42379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,146 files changed

+170248
-42379
lines changed

kubernetes/.openapi-generator/COMMIT

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Requested Commit: v3.3.4
2-
Actual Commit: 2353d71d4b02be6dbabe25aac1a9e56eb3b812a2
1+
Requested Commit: v4.3.0
2+
Actual Commit: c224cf484b020a7f5997d883cf331715df3fb52a

kubernetes/.openapi-generator/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.4
1+
4.3.0
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c42abf3bdfe7d91346cc5b0972b1ef8c5de539671c8ffa1612ec63a14b9ee9d3
1+
92a199ec5d6f1d4a6df0bbfe509b5bbd504bba8a817a2e6a4c60e8ba2a0049e8

kubernetes/README.md

+22-15
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Python 2.7 and 3.4+
1414
## Installation & Usage
1515
### pip install
1616

17-
If the python package is hosted on Github, you can install directly from Github
17+
If the python package is hosted on a repository, you can install directly using:
1818

1919
```sh
2020
pip install git+https://github.com/kubernetes-client/python.git
@@ -23,7 +23,7 @@ pip install git+https://github.com/kubernetes-client/python.git
2323

2424
Then import the package:
2525
```python
26-
import kubernetes.client
26+
import kubernetes.client
2727
```
2828

2929
### Setuptools
@@ -51,21 +51,28 @@ import kubernetes.client
5151
from kubernetes.client.rest import ApiException
5252
from pprint import pprint
5353

54-
# Configure API key authorization: BearerToken
5554
configuration = kubernetes.client.Configuration()
55+
# Configure API key authorization: BearerToken
5656
configuration.api_key['authorization'] = 'YOUR_API_KEY'
5757
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
5858
# configuration.api_key_prefix['authorization'] = 'Bearer'
5959

60-
# create an instance of the API class
61-
api_instance = kubernetes.client.AdmissionregistrationApi(kubernetes.client.ApiClient(configuration))
62-
63-
try:
64-
api_response = api_instance.get_api_group()
65-
pprint(api_response)
66-
except ApiException as e:
67-
print("Exception when calling AdmissionregistrationApi->get_api_group: %s\n" % e)
60+
# Defining host is optional and default to http://localhost
61+
configuration.host = "http://localhost"
6862

63+
# Defining host is optional and default to http://localhost
64+
configuration.host = "http://localhost"
65+
# Enter a context with an instance of the API kubernetes.client
66+
with kubernetes.client.ApiClient(configuration) as api_client:
67+
# Create an instance of the API class
68+
api_instance = kubernetes.client.AdmissionregistrationApi(api_client)
69+
70+
try:
71+
api_response = api_instance.get_api_group()
72+
pprint(api_response)
73+
except ApiException as e:
74+
print("Exception when calling AdmissionregistrationApi->get_api_group: %s\n" % e)
75+
6976
```
7077

7178
## Documentation for API Endpoints
@@ -648,10 +655,10 @@ Class | Method | HTTP request | Description
648655
*CoreV1Api* | [**replace_persistent_volume_status**](docs/CoreV1Api.md#replace_persistent_volume_status) | **PUT** /api/v1/persistentvolumes/{name}/status |
649656
*CustomObjectsApi* | [**create_cluster_custom_object**](docs/CustomObjectsApi.md#create_cluster_custom_object) | **POST** /apis/{group}/{version}/{plural} |
650657
*CustomObjectsApi* | [**create_namespaced_custom_object**](docs/CustomObjectsApi.md#create_namespaced_custom_object) | **POST** /apis/{group}/{version}/namespaces/{namespace}/{plural} |
651-
*CustomObjectsApi* | [**delete_cluster_custom_object**](docs/CustomObjectsApi.md#delete_cluster_custom_object) | **DELETE** /apis/{group}/{version}/{plural} |
652-
*CustomObjectsApi* | [**delete_cluster_custom_object_0**](docs/CustomObjectsApi.md#delete_cluster_custom_object_0) | **DELETE** /apis/{group}/{version}/{plural}/{name} |
653-
*CustomObjectsApi* | [**delete_namespaced_custom_object**](docs/CustomObjectsApi.md#delete_namespaced_custom_object) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural} |
654-
*CustomObjectsApi* | [**delete_namespaced_custom_object_0**](docs/CustomObjectsApi.md#delete_namespaced_custom_object_0) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} |
658+
*CustomObjectsApi* | [**delete_cluster_custom_object**](docs/CustomObjectsApi.md#delete_cluster_custom_object) | **DELETE** /apis/{group}/{version}/{plural}/{name} |
659+
*CustomObjectsApi* | [**delete_collection_cluster_custom_object**](docs/CustomObjectsApi.md#delete_collection_cluster_custom_object) | **DELETE** /apis/{group}/{version}/{plural} |
660+
*CustomObjectsApi* | [**delete_collection_namespaced_custom_object**](docs/CustomObjectsApi.md#delete_collection_namespaced_custom_object) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural} |
661+
*CustomObjectsApi* | [**delete_namespaced_custom_object**](docs/CustomObjectsApi.md#delete_namespaced_custom_object) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} |
655662
*CustomObjectsApi* | [**get_cluster_custom_object**](docs/CustomObjectsApi.md#get_cluster_custom_object) | **GET** /apis/{group}/{version}/{plural}/{name} |
656663
*CustomObjectsApi* | [**get_cluster_custom_object_scale**](docs/CustomObjectsApi.md#get_cluster_custom_object_scale) | **GET** /apis/{group}/{version}/{plural}/{name}/scale |
657664
*CustomObjectsApi* | [**get_cluster_custom_object_status**](docs/CustomObjectsApi.md#get_cluster_custom_object_status) | **GET** /apis/{group}/{version}/{plural}/{name}/status |

kubernetes/client/__init__.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
99
10-
OpenAPI spec version: release-1.16
10+
The version of the OpenAPI document: release-1.16
1111
Generated by: https://openapi-generator.tech
1212
"""
1313

@@ -89,6 +89,11 @@
8989
# import ApiClient
9090
from kubernetes.client.api_client import ApiClient
9191
from kubernetes.client.configuration import Configuration
92+
from kubernetes.client.exceptions import OpenApiException
93+
from kubernetes.client.exceptions import ApiTypeError
94+
from kubernetes.client.exceptions import ApiValueError
95+
from kubernetes.client.exceptions import ApiKeyError
96+
from kubernetes.client.exceptions import ApiException
9297
# import models into sdk package
9398
from kubernetes.client.models.admissionregistration_v1_service_reference import AdmissionregistrationV1ServiceReference
9499
from kubernetes.client.models.admissionregistration_v1_webhook_client_config import AdmissionregistrationV1WebhookClientConfig
@@ -735,3 +740,4 @@
735740
from kubernetes.client.models.v2beta2_resource_metric_source import V2beta2ResourceMetricSource
736741
from kubernetes.client.models.v2beta2_resource_metric_status import V2beta2ResourceMetricStatus
737742
from kubernetes.client.models.version_info import VersionInfo
743+

kubernetes/client/api/admissionregistration_api.py

+36-15
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
77
8-
OpenAPI spec version: release-1.16
8+
The version of the OpenAPI document: release-1.16
99
Generated by: https://openapi-generator.tech
1010
"""
1111

@@ -18,6 +18,10 @@
1818
import six
1919

2020
from kubernetes.client.api_client import ApiClient
21+
from kubernetes.client.exceptions import ( # noqa: F401
22+
ApiTypeError,
23+
ApiValueError
24+
)
2125

2226

2327
class AdmissionregistrationApi(object):
@@ -41,17 +45,20 @@ def get_api_group(self, **kwargs): # noqa: E501
4145
>>> thread = api.get_api_group(async_req=True)
4246
>>> result = thread.get()
4347
44-
:param async_req bool
48+
:param async_req bool: execute request asynchronously
49+
:param _preload_content: if False, the urllib3.HTTPResponse object will
50+
be returned without reading/decoding response
51+
data. Default is True.
52+
:param _request_timeout: timeout setting for this request. If one
53+
number provided, it will be total request
54+
timeout. It can also be a pair (tuple) of
55+
(connection, read) timeouts.
4556
:return: V1APIGroup
4657
If the method is called asynchronously,
4758
returns the request thread.
4859
"""
4960
kwargs['_return_http_data_only'] = True
50-
if kwargs.get('async_req'):
51-
return self.get_api_group_with_http_info(**kwargs) # noqa: E501
52-
else:
53-
(data) = self.get_api_group_with_http_info(**kwargs) # noqa: E501
54-
return data
61+
return self.get_api_group_with_http_info(**kwargs) # noqa: E501
5562

5663
def get_api_group_with_http_info(self, **kwargs): # noqa: E501
5764
"""get_api_group # noqa: E501
@@ -62,23 +69,37 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
6269
>>> thread = api.get_api_group_with_http_info(async_req=True)
6370
>>> result = thread.get()
6471
65-
:param async_req bool
66-
:return: V1APIGroup
72+
:param async_req bool: execute request asynchronously
73+
:param _return_http_data_only: response data without head status code
74+
and headers
75+
:param _preload_content: if False, the urllib3.HTTPResponse object will
76+
be returned without reading/decoding response
77+
data. Default is True.
78+
:param _request_timeout: timeout setting for this request. If one
79+
number provided, it will be total request
80+
timeout. It can also be a pair (tuple) of
81+
(connection, read) timeouts.
82+
:return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
6783
If the method is called asynchronously,
6884
returns the request thread.
6985
"""
7086

7187
local_var_params = locals()
7288

73-
all_params = [] # noqa: E501
74-
all_params.append('async_req')
75-
all_params.append('_return_http_data_only')
76-
all_params.append('_preload_content')
77-
all_params.append('_request_timeout')
89+
all_params = [
90+
]
91+
all_params.extend(
92+
[
93+
'async_req',
94+
'_return_http_data_only',
95+
'_preload_content',
96+
'_request_timeout'
97+
]
98+
)
7899

79100
for key, val in six.iteritems(local_var_params['kwargs']):
80101
if key not in all_params:
81-
raise TypeError(
102+
raise ApiTypeError(
82103
"Got an unexpected keyword argument '%s'"
83104
" to method get_api_group" % key
84105
)

0 commit comments

Comments
 (0)