Skip to content

Commit

Permalink
Merge pull request #265 from blackwoodseven/master
Browse files Browse the repository at this point in the history
Parametrize resource path with version part of apiVersion
  • Loading branch information
mbohlool committed Jun 22, 2017
2 parents 4eac56a + 1849b1f commit 04f059a
Show file tree
Hide file tree
Showing 725 changed files with 931 additions and 1,076 deletions.
13 changes: 6 additions & 7 deletions kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ No description provided (generated by Swagger Codegen https://github.com/swagger

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: v1.6.5
- API version: v1.6.7
- Package version: 2.0.0-snapshot
- Build package: io.swagger.codegen.languages.PythonClientCodegen

Expand Down Expand Up @@ -248,7 +248,6 @@ Class | Method | HTTP request | Description
*CoreV1Api* | [**create_namespaced_service_account**](docs/CoreV1Api.md#create_namespaced_service_account) | **POST** /api/v1/namespaces/{namespace}/serviceaccounts |
*CoreV1Api* | [**create_node**](docs/CoreV1Api.md#create_node) | **POST** /api/v1/nodes |
*CoreV1Api* | [**create_persistent_volume**](docs/CoreV1Api.md#create_persistent_volume) | **POST** /api/v1/persistentvolumes |
*CoreV1Api* | [**delete_collection_namespace**](docs/CoreV1Api.md#delete_collection_namespace) | **DELETE** /api/v1/namespaces |
*CoreV1Api* | [**delete_collection_namespaced_config_map**](docs/CoreV1Api.md#delete_collection_namespaced_config_map) | **DELETE** /api/v1/namespaces/{namespace}/configmaps |
*CoreV1Api* | [**delete_collection_namespaced_endpoints**](docs/CoreV1Api.md#delete_collection_namespaced_endpoints) | **DELETE** /api/v1/namespaces/{namespace}/endpoints |
*CoreV1Api* | [**delete_collection_namespaced_event**](docs/CoreV1Api.md#delete_collection_namespaced_event) | **DELETE** /api/v1/namespaces/{namespace}/events |
Expand Down Expand Up @@ -606,11 +605,11 @@ Class | Method | HTTP request | Description
*StorageV1beta1Api* | [**patch_storage_class**](docs/StorageV1beta1Api.md#patch_storage_class) | **PATCH** /apis/storage.k8s.io/v1beta1/storageclasses/{name} |
*StorageV1beta1Api* | [**read_storage_class**](docs/StorageV1beta1Api.md#read_storage_class) | **GET** /apis/storage.k8s.io/v1beta1/storageclasses/{name} |
*StorageV1beta1Api* | [**replace_storage_class**](docs/StorageV1beta1Api.md#replace_storage_class) | **PUT** /apis/storage.k8s.io/v1beta1/storageclasses/{name} |
*ThirdPartyResourcesApi* | [**create_third_party_resource**](docs/ThirdPartyResourcesApi.md#create_third_party_resource) | **POST** /apis/{fqdn}/v1/namespaces/{namespace}/{resource} | Create a Resource
*ThirdPartyResourcesApi* | [**delete_third_party_resource**](docs/ThirdPartyResourcesApi.md#delete_third_party_resource) | **DELETE** /apis/{fqdn}/v1/namespaces/{namespace}/{resource}/{name} | Deletes a specific Resource
*ThirdPartyResourcesApi* | [**get_third_party_resource**](docs/ThirdPartyResourcesApi.md#get_third_party_resource) | **GET** /apis/{fqdn}/v1/namespaces/{namespace}/{resource}/{name} | Gets a specific Resource
*ThirdPartyResourcesApi* | [**list_third_party_resource**](docs/ThirdPartyResourcesApi.md#list_third_party_resource) | **GET** /apis/{fqdn}/v1/{resource} | Gets Resources
*ThirdPartyResourcesApi* | [**update_third_party_resource**](docs/ThirdPartyResourcesApi.md#update_third_party_resource) | **PUT** /apis/{fqdn}/v1/namespaces/{namespace}/{resource}/{name} | Update a Resource
*ThirdPartyResourcesApi* | [**create_third_party_resource**](docs/ThirdPartyResourcesApi.md#create_third_party_resource) | **POST** /apis/{fqdn}/{version}/namespaces/{namespace}/{resource} | Create a Resource
*ThirdPartyResourcesApi* | [**delete_third_party_resource**](docs/ThirdPartyResourcesApi.md#delete_third_party_resource) | **DELETE** /apis/{fqdn}/{version}/namespaces/{namespace}/{resource}/{name} | Deletes a specific Resource
*ThirdPartyResourcesApi* | [**get_third_party_resource**](docs/ThirdPartyResourcesApi.md#get_third_party_resource) | **GET** /apis/{fqdn}/{version}/namespaces/{namespace}/{resource}/{name} | Gets a specific Resource
*ThirdPartyResourcesApi* | [**list_third_party_resource**](docs/ThirdPartyResourcesApi.md#list_third_party_resource) | **GET** /apis/{fqdn}/{version}/{resource} | Gets Resources
*ThirdPartyResourcesApi* | [**update_third_party_resource**](docs/ThirdPartyResourcesApi.md#update_third_party_resource) | **PUT** /apis/{fqdn}/{version}/namespaces/{namespace}/{resource}/{name} | Update a Resource
*VersionApi* | [**get_code**](docs/VersionApi.md#get_code) | **GET** /version/ |


Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/apis_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/apps_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/apps_v1beta1_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/authentication_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/authentication_v1_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/authentication_v1beta1_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/authorization_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/authorization_v1_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/authorization_v1beta1_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/autoscaling_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/autoscaling_v1_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/autoscaling_v2alpha1_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/batch_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/batch_v1_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/batch_v2alpha1_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/certificates_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/certificates_v1beta1_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/core_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
124 changes: 1 addition & 123 deletions kubernetes/client/apis/core_v1_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down Expand Up @@ -7107,128 +7107,6 @@ def create_persistent_volume_with_http_info(self, body, **kwargs):
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def delete_collection_namespace(self, **kwargs):
"""
delete collection of Namespace
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_collection_namespace(callback=callback_function)

:param callback function: The callback function
for asynchronous request. (optional)
:param str pretty: If 'true', then the output is pretty printed.
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
:param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
:param int timeout_seconds: Timeout for the list/watch call.
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
:return: V1Status
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.delete_collection_namespace_with_http_info(**kwargs)
else:
(data) = self.delete_collection_namespace_with_http_info(**kwargs)
return data

def delete_collection_namespace_with_http_info(self, **kwargs):
"""
delete collection of Namespace
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_collection_namespace_with_http_info(callback=callback_function)

:param callback function: The callback function
for asynchronous request. (optional)
:param str pretty: If 'true', then the output is pretty printed.
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
:param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
:param int timeout_seconds: Timeout for the list/watch call.
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
:return: V1Status
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['pretty', 'field_selector', 'label_selector', 'resource_version', 'timeout_seconds', 'watch']
all_params.append('callback')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')

params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_collection_namespace" % key
)
params[key] = val
del params['kwargs']


collection_formats = {}

resource_path = '/api/v1/namespaces'.replace('{format}', 'json')
path_params = {}

query_params = {}
if 'pretty' in params:
query_params['pretty'] = params['pretty']
if 'field_selector' in params:
query_params['fieldSelector'] = params['field_selector']
if 'label_selector' in params:
query_params['labelSelector'] = params['label_selector']
if 'resource_version' in params:
query_params['resourceVersion'] = params['resource_version']
if 'timeout_seconds' in params:
query_params['timeoutSeconds'] = params['timeout_seconds']
if 'watch' in params:
query_params['watch'] = params['watch']

header_params = {}

form_params = []
local_var_files = {}

body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])

# Authentication setting
auth_settings = ['BearerToken']

return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1Status',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def delete_collection_namespaced_config_map(self, namespace, **kwargs):
"""
delete collection of ConfigMap
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/extensions_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/extensions_v1beta1_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/logs_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/policy_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/policy_v1beta1_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/client/apis/rbac_authorization_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
OpenAPI spec version: v1.6.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down

0 comments on commit 04f059a

Please sign in to comment.