Skip to content

Commit

Permalink
Update client with OpenAPI generator v4.3.0
Browse files Browse the repository at this point in the history
Signed-off-by: Nabarun Pal <[email protected]>
  • Loading branch information
palnabarun committed Jul 16, 2020
1 parent e60d921 commit b4d11b0
Show file tree
Hide file tree
Showing 2,146 changed files with 170,248 additions and 42,379 deletions.
4 changes: 2 additions & 2 deletions kubernetes/.openapi-generator/COMMIT
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Requested Commit: v3.3.4
Actual Commit: 2353d71d4b02be6dbabe25aac1a9e56eb3b812a2
Requested Commit: v4.3.0
Actual Commit: c224cf484b020a7f5997d883cf331715df3fb52a
2 changes: 1 addition & 1 deletion kubernetes/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.4
4.3.0
2 changes: 1 addition & 1 deletion kubernetes/.openapi-generator/swagger.json.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c42abf3bdfe7d91346cc5b0972b1ef8c5de539671c8ffa1612ec63a14b9ee9d3
92a199ec5d6f1d4a6df0bbfe509b5bbd504bba8a817a2e6a4c60e8ba2a0049e8
37 changes: 22 additions & 15 deletions kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Python 2.7 and 3.4+
## Installation & Usage
### pip install

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

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

Then import the package:
```python
import kubernetes.client
import kubernetes.client
```

### Setuptools
Expand Down Expand Up @@ -51,21 +51,28 @@ import kubernetes.client
from kubernetes.client.rest import ApiException
from pprint import pprint

# Configure API key authorization: BearerToken
configuration = kubernetes.client.Configuration()
# Configure API key authorization: BearerToken
configuration.api_key['authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['authorization'] = 'Bearer'

# create an instance of the API class
api_instance = kubernetes.client.AdmissionregistrationApi(kubernetes.client.ApiClient(configuration))

try:
api_response = api_instance.get_api_group()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdmissionregistrationApi->get_api_group: %s\n" % e)
# Defining host is optional and default to http://localhost
configuration.host = "http://localhost"

# Defining host is optional and default to http://localhost
configuration.host = "http://localhost"
# Enter a context with an instance of the API kubernetes.client
with kubernetes.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kubernetes.client.AdmissionregistrationApi(api_client)

try:
api_response = api_instance.get_api_group()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdmissionregistrationApi->get_api_group: %s\n" % e)

```

## Documentation for API Endpoints
Expand Down Expand Up @@ -648,10 +655,10 @@ Class | Method | HTTP request | Description
*CoreV1Api* | [**replace_persistent_volume_status**](docs/CoreV1Api.md#replace_persistent_volume_status) | **PUT** /api/v1/persistentvolumes/{name}/status |
*CustomObjectsApi* | [**create_cluster_custom_object**](docs/CustomObjectsApi.md#create_cluster_custom_object) | **POST** /apis/{group}/{version}/{plural} |
*CustomObjectsApi* | [**create_namespaced_custom_object**](docs/CustomObjectsApi.md#create_namespaced_custom_object) | **POST** /apis/{group}/{version}/namespaces/{namespace}/{plural} |
*CustomObjectsApi* | [**delete_cluster_custom_object**](docs/CustomObjectsApi.md#delete_cluster_custom_object) | **DELETE** /apis/{group}/{version}/{plural} |
*CustomObjectsApi* | [**delete_cluster_custom_object_0**](docs/CustomObjectsApi.md#delete_cluster_custom_object_0) | **DELETE** /apis/{group}/{version}/{plural}/{name} |
*CustomObjectsApi* | [**delete_namespaced_custom_object**](docs/CustomObjectsApi.md#delete_namespaced_custom_object) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural} |
*CustomObjectsApi* | [**delete_namespaced_custom_object_0**](docs/CustomObjectsApi.md#delete_namespaced_custom_object_0) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} |
*CustomObjectsApi* | [**delete_cluster_custom_object**](docs/CustomObjectsApi.md#delete_cluster_custom_object) | **DELETE** /apis/{group}/{version}/{plural}/{name} |
*CustomObjectsApi* | [**delete_collection_cluster_custom_object**](docs/CustomObjectsApi.md#delete_collection_cluster_custom_object) | **DELETE** /apis/{group}/{version}/{plural} |
*CustomObjectsApi* | [**delete_collection_namespaced_custom_object**](docs/CustomObjectsApi.md#delete_collection_namespaced_custom_object) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural} |
*CustomObjectsApi* | [**delete_namespaced_custom_object**](docs/CustomObjectsApi.md#delete_namespaced_custom_object) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} |
*CustomObjectsApi* | [**get_cluster_custom_object**](docs/CustomObjectsApi.md#get_cluster_custom_object) | **GET** /apis/{group}/{version}/{plural}/{name} |
*CustomObjectsApi* | [**get_cluster_custom_object_scale**](docs/CustomObjectsApi.md#get_cluster_custom_object_scale) | **GET** /apis/{group}/{version}/{plural}/{name}/scale |
*CustomObjectsApi* | [**get_cluster_custom_object_status**](docs/CustomObjectsApi.md#get_cluster_custom_object_status) | **GET** /apis/{group}/{version}/{plural}/{name}/status |
Expand Down
8 changes: 7 additions & 1 deletion kubernetes/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.16
The version of the OpenAPI document: release-1.16
Generated by: https://openapi-generator.tech
"""

Expand Down Expand Up @@ -89,6 +89,11 @@
# import ApiClient
from kubernetes.client.api_client import ApiClient
from kubernetes.client.configuration import Configuration
from kubernetes.client.exceptions import OpenApiException
from kubernetes.client.exceptions import ApiTypeError
from kubernetes.client.exceptions import ApiValueError
from kubernetes.client.exceptions import ApiKeyError
from kubernetes.client.exceptions import ApiException
# import models into sdk package
from kubernetes.client.models.admissionregistration_v1_service_reference import AdmissionregistrationV1ServiceReference
from kubernetes.client.models.admissionregistration_v1_webhook_client_config import AdmissionregistrationV1WebhookClientConfig
Expand Down Expand Up @@ -735,3 +740,4 @@
from kubernetes.client.models.v2beta2_resource_metric_source import V2beta2ResourceMetricSource
from kubernetes.client.models.v2beta2_resource_metric_status import V2beta2ResourceMetricStatus
from kubernetes.client.models.version_info import VersionInfo

51 changes: 36 additions & 15 deletions kubernetes/client/api/admissionregistration_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.16
The version of the OpenAPI document: release-1.16
Generated by: https://openapi-generator.tech
"""

Expand All @@ -18,6 +18,10 @@
import six

from kubernetes.client.api_client import ApiClient
from kubernetes.client.exceptions import ( # noqa: F401
ApiTypeError,
ApiValueError
)


class AdmissionregistrationApi(object):
Expand All @@ -41,17 +45,20 @@ def get_api_group(self, **kwargs): # noqa: E501
>>> thread = api.get_api_group(async_req=True)
>>> result = thread.get()
:param async_req bool
:param async_req bool: execute request asynchronously
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: V1APIGroup
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_api_group_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.get_api_group_with_http_info(**kwargs) # noqa: E501
return data
return self.get_api_group_with_http_info(**kwargs) # noqa: E501

def get_api_group_with_http_info(self, **kwargs): # noqa: E501
"""get_api_group # noqa: E501
Expand All @@ -62,23 +69,37 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
>>> thread = api.get_api_group_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:return: V1APIGroup
:param async_req bool: execute request asynchronously
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""

local_var_params = locals()

all_params = [] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
all_params = [
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout'
]
)

for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise TypeError(
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_api_group" % key
)
Expand Down
Loading

0 comments on commit b4d11b0

Please sign in to comment.