Skip to content

Commit 38b0ff4

Browse files
authored
Merge pull request #221 from mbohlool/master
Added OperationIDs to TPR spec and regenerated the client
2 parents 87e16bb + 23b0f8c commit 38b0ff4

File tree

9 files changed

+1255
-3
lines changed

9 files changed

+1255
-3
lines changed

kubernetes/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,11 @@ Class | Method | HTTP request | Description
606606
*StorageV1beta1Api* | [**patch_storage_class**](docs/StorageV1beta1Api.md#patch_storage_class) | **PATCH** /apis/storage.k8s.io/v1beta1/storageclasses/{name} |
607607
*StorageV1beta1Api* | [**read_storage_class**](docs/StorageV1beta1Api.md#read_storage_class) | **GET** /apis/storage.k8s.io/v1beta1/storageclasses/{name} |
608608
*StorageV1beta1Api* | [**replace_storage_class**](docs/StorageV1beta1Api.md#replace_storage_class) | **PUT** /apis/storage.k8s.io/v1beta1/storageclasses/{name} |
609+
*ThirdPartyResourcesApi* | [**create_third_party_resource**](docs/ThirdPartyResourcesApi.md#create_third_party_resource) | **POST** /apis/{fqdn}/v1/namespaces/{namespace}/{resource} | Create a Resource
610+
*ThirdPartyResourcesApi* | [**delete_third_party_resource**](docs/ThirdPartyResourcesApi.md#delete_third_party_resource) | **DELETE** /apis/{fqdn}/v1/namespaces/{namespace}/{resource}/{name} | Deletes a specific Resource
611+
*ThirdPartyResourcesApi* | [**get_third_party_resource**](docs/ThirdPartyResourcesApi.md#get_third_party_resource) | **GET** /apis/{fqdn}/v1/namespaces/{namespace}/{resource}/{name} | Gets a specific Resource
612+
*ThirdPartyResourcesApi* | [**list_third_party_resource**](docs/ThirdPartyResourcesApi.md#list_third_party_resource) | **GET** /apis/{fqdn}/v1/{resource} | Gets Resources
613+
*ThirdPartyResourcesApi* | [**update_third_party_resource**](docs/ThirdPartyResourcesApi.md#update_third_party_resource) | **PUT** /apis/{fqdn}/v1/namespaces/{namespace}/{resource}/{name} | Update a Resource
609614
*VersionApi* | [**get_code**](docs/VersionApi.md#get_code) | **GET** /version/ |
610615

611616

kubernetes/client/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@
373373
from .apis.storage_api import StorageApi
374374
from .apis.storage_v1_api import StorageV1Api
375375
from .apis.storage_v1beta1_api import StorageV1beta1Api
376+
from .apis.third_party_resources_api import ThirdPartyResourcesApi
376377
from .apis.version_api import VersionApi
377378

378379
# import ApiClient

kubernetes/client/apis/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@
3333
from .storage_api import StorageApi
3434
from .storage_v1_api import StorageV1Api
3535
from .storage_v1beta1_api import StorageV1beta1Api
36+
from .third_party_resources_api import ThirdPartyResourcesApi
3637
from .version_api import VersionApi

kubernetes/client/apis/third_party_resources_api.py

Lines changed: 622 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 281 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,281 @@
1+
# kubernetes.client.ThirdPartyResourcesApi
2+
3+
All URIs are relative to *https://localhost*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**create_third_party_resource**](ThirdPartyResourcesApi.md#create_third_party_resource) | **POST** /apis/{fqdn}/v1/namespaces/{namespace}/{resource} | Create a Resource
8+
[**delete_third_party_resource**](ThirdPartyResourcesApi.md#delete_third_party_resource) | **DELETE** /apis/{fqdn}/v1/namespaces/{namespace}/{resource}/{name} | Deletes a specific Resource
9+
[**get_third_party_resource**](ThirdPartyResourcesApi.md#get_third_party_resource) | **GET** /apis/{fqdn}/v1/namespaces/{namespace}/{resource}/{name} | Gets a specific Resource
10+
[**list_third_party_resource**](ThirdPartyResourcesApi.md#list_third_party_resource) | **GET** /apis/{fqdn}/v1/{resource} | Gets Resources
11+
[**update_third_party_resource**](ThirdPartyResourcesApi.md#update_third_party_resource) | **PUT** /apis/{fqdn}/v1/namespaces/{namespace}/{resource}/{name} | Update a Resource
12+
13+
14+
# **create_third_party_resource**
15+
> object create_third_party_resource(namespace, fqdn, resource, body)
16+
17+
Create a Resource
18+
19+
Creates a third party resource of the type specified
20+
21+
### Example
22+
```python
23+
from __future__ import print_statement
24+
import time
25+
import kubernetes.client
26+
from kubernetes.client.rest import ApiException
27+
from pprint import pprint
28+
29+
# create an instance of the API class
30+
api_instance = kubernetes.client.ThirdPartyResourcesApi()
31+
namespace = 'namespace_example' # str | The Resource's namespace
32+
fqdn = 'fqdn_example' # str | The Third party Resource fqdn
33+
resource = 'resource_example' # str | The Resource type
34+
body = NULL # object | The JSON schema of the Resource to create.
35+
36+
try:
37+
# Create a Resource
38+
api_response = api_instance.create_third_party_resource(namespace, fqdn, resource, body)
39+
pprint(api_response)
40+
except ApiException as e:
41+
print("Exception when calling ThirdPartyResourcesApi->create_third_party_resource: %s\n" % e)
42+
```
43+
44+
### Parameters
45+
46+
Name | Type | Description | Notes
47+
------------- | ------------- | ------------- | -------------
48+
**namespace** | **str**| The Resource's namespace |
49+
**fqdn** | **str**| The Third party Resource fqdn |
50+
**resource** | **str**| The Resource type |
51+
**body** | **object**| The JSON schema of the Resource to create. |
52+
53+
### Return type
54+
55+
**object**
56+
57+
### Authorization
58+
59+
No authorization required
60+
61+
### HTTP request headers
62+
63+
- **Content-Type**: Not defined
64+
- **Accept**: Not defined
65+
66+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
67+
68+
# **delete_third_party_resource**
69+
> object delete_third_party_resource(body, grace_period_seconds=grace_period_seconds, orphan_dependents=orphan_dependents, propagation_policy=propagation_policy)
70+
71+
Deletes a specific Resource
72+
73+
Deletes the specified Resource in the specified namespace
74+
75+
### Example
76+
```python
77+
from __future__ import print_statement
78+
import time
79+
import kubernetes.client
80+
from kubernetes.client.rest import ApiException
81+
from pprint import pprint
82+
83+
# create an instance of the API class
84+
api_instance = kubernetes.client.ThirdPartyResourcesApi()
85+
body = kubernetes.client.V1DeleteOptions() # V1DeleteOptions |
86+
grace_period_seconds = 56 # int | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional)
87+
orphan_dependents = true # bool | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional)
88+
propagation_policy = 'propagation_policy_example' # str | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. (optional)
89+
90+
try:
91+
# Deletes a specific Resource
92+
api_response = api_instance.delete_third_party_resource(body, grace_period_seconds=grace_period_seconds, orphan_dependents=orphan_dependents, propagation_policy=propagation_policy)
93+
pprint(api_response)
94+
except ApiException as e:
95+
print("Exception when calling ThirdPartyResourcesApi->delete_third_party_resource: %s\n" % e)
96+
```
97+
98+
### Parameters
99+
100+
Name | Type | Description | Notes
101+
------------- | ------------- | ------------- | -------------
102+
**body** | [**V1DeleteOptions**](V1DeleteOptions.md)| |
103+
**grace_period_seconds** | **int**| The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional]
104+
**orphan_dependents** | **bool**| Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional]
105+
**propagation_policy** | **str**| Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. | [optional]
106+
107+
### Return type
108+
109+
**object**
110+
111+
### Authorization
112+
113+
No authorization required
114+
115+
### HTTP request headers
116+
117+
- **Content-Type**: Not defined
118+
- **Accept**: Not defined
119+
120+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
121+
122+
# **get_third_party_resource**
123+
> object get_third_party_resource(namespace, name, fqdn, resource)
124+
125+
Gets a specific Resource
126+
127+
Returns a specific Resource in a namespace
128+
129+
### Example
130+
```python
131+
from __future__ import print_statement
132+
import time
133+
import kubernetes.client
134+
from kubernetes.client.rest import ApiException
135+
from pprint import pprint
136+
137+
# create an instance of the API class
138+
api_instance = kubernetes.client.ThirdPartyResourcesApi()
139+
namespace = 'namespace_example' # str | The Resource's namespace
140+
name = 'name_example' # str | The Resource's name
141+
fqdn = 'fqdn_example' # str | The Third party Resource fqdn
142+
resource = 'resource_example' # str | The Resource type
143+
144+
try:
145+
# Gets a specific Resource
146+
api_response = api_instance.get_third_party_resource(namespace, name, fqdn, resource)
147+
pprint(api_response)
148+
except ApiException as e:
149+
print("Exception when calling ThirdPartyResourcesApi->get_third_party_resource: %s\n" % e)
150+
```
151+
152+
### Parameters
153+
154+
Name | Type | Description | Notes
155+
------------- | ------------- | ------------- | -------------
156+
**namespace** | **str**| The Resource's namespace |
157+
**name** | **str**| The Resource's name |
158+
**fqdn** | **str**| The Third party Resource fqdn |
159+
**resource** | **str**| The Resource type |
160+
161+
### Return type
162+
163+
**object**
164+
165+
### Authorization
166+
167+
No authorization required
168+
169+
### HTTP request headers
170+
171+
- **Content-Type**: Not defined
172+
- **Accept**: Not defined
173+
174+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
175+
176+
# **list_third_party_resource**
177+
> object list_third_party_resource(fqdn, resource, watch=watch)
178+
179+
Gets Resources
180+
181+
Returns a list of Resources
182+
183+
### Example
184+
```python
185+
from __future__ import print_statement
186+
import time
187+
import kubernetes.client
188+
from kubernetes.client.rest import ApiException
189+
from pprint import pprint
190+
191+
# create an instance of the API class
192+
api_instance = kubernetes.client.ThirdPartyResourcesApi()
193+
fqdn = 'fqdn_example' # str | The Third party Resource fqdn
194+
resource = 'resource_example' # str | The Resource type
195+
watch = true # bool | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
196+
197+
try:
198+
# Gets Resources
199+
api_response = api_instance.list_third_party_resource(fqdn, resource, watch=watch)
200+
pprint(api_response)
201+
except ApiException as e:
202+
print("Exception when calling ThirdPartyResourcesApi->list_third_party_resource: %s\n" % e)
203+
```
204+
205+
### Parameters
206+
207+
Name | Type | Description | Notes
208+
------------- | ------------- | ------------- | -------------
209+
**fqdn** | **str**| The Third party Resource fqdn |
210+
**resource** | **str**| The Resource type |
211+
**watch** | **bool**| Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | [optional]
212+
213+
### Return type
214+
215+
**object**
216+
217+
### Authorization
218+
219+
No authorization required
220+
221+
### HTTP request headers
222+
223+
- **Content-Type**: Not defined
224+
- **Accept**: Not defined
225+
226+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
227+
228+
# **update_third_party_resource**
229+
> object update_third_party_resource(namespace, fqdn, resource, body)
230+
231+
Update a Resource
232+
233+
Update the specified third party resource of the type specified
234+
235+
### Example
236+
```python
237+
from __future__ import print_statement
238+
import time
239+
import kubernetes.client
240+
from kubernetes.client.rest import ApiException
241+
from pprint import pprint
242+
243+
# create an instance of the API class
244+
api_instance = kubernetes.client.ThirdPartyResourcesApi()
245+
namespace = 'namespace_example' # str | The Resource's namespace
246+
fqdn = 'fqdn_example' # str | The Third party Resource fqdn
247+
resource = 'resource_example' # str | The Resource type
248+
body = NULL # object | The JSON schema of the Resource to create.
249+
250+
try:
251+
# Update a Resource
252+
api_response = api_instance.update_third_party_resource(namespace, fqdn, resource, body)
253+
pprint(api_response)
254+
except ApiException as e:
255+
print("Exception when calling ThirdPartyResourcesApi->update_third_party_resource: %s\n" % e)
256+
```
257+
258+
### Parameters
259+
260+
Name | Type | Description | Notes
261+
------------- | ------------- | ------------- | -------------
262+
**namespace** | **str**| The Resource's namespace |
263+
**fqdn** | **str**| The Third party Resource fqdn |
264+
**resource** | **str**| The Resource type |
265+
**body** | **object**| The JSON schema of the Resource to create. |
266+
267+
### Return type
268+
269+
**object**
270+
271+
### Authorization
272+
273+
No authorization required
274+
275+
### HTTP request headers
276+
277+
- **Content-Type**: Not defined
278+
- **Accept**: Not defined
279+
280+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
281+
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# coding: utf-8
2+
3+
"""
4+
Kubernetes
5+
6+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
7+
8+
OpenAPI spec version: v1.6.3
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
14+
from __future__ import absolute_import
15+
16+
import os
17+
import sys
18+
import unittest
19+
20+
import kubernetes.client
21+
from kubernetes.client.rest import ApiException
22+
from kubernetes.client.apis.third_party_resources_api import ThirdPartyResourcesApi
23+
24+
25+
class TestThirdPartyResourcesApi(unittest.TestCase):
26+
""" ThirdPartyResourcesApi unit test stubs """
27+
28+
def setUp(self):
29+
self.api = kubernetes.client.apis.third_party_resources_api.ThirdPartyResourcesApi()
30+
31+
def tearDown(self):
32+
pass
33+
34+
def test_create_third_party_resource(self):
35+
"""
36+
Test case for create_third_party_resource
37+
38+
Create a Resource
39+
"""
40+
pass
41+
42+
def test_delete_third_party_resource(self):
43+
"""
44+
Test case for delete_third_party_resource
45+
46+
Deletes a specific Resource
47+
"""
48+
pass
49+
50+
def test_get_third_party_resource(self):
51+
"""
52+
Test case for get_third_party_resource
53+
54+
Gets a specific Resource
55+
"""
56+
pass
57+
58+
def test_list_third_party_resource(self):
59+
"""
60+
Test case for list_third_party_resource
61+
62+
Gets Resources
63+
"""
64+
pass
65+
66+
def test_update_third_party_resource(self):
67+
"""
68+
Test case for update_third_party_resource
69+
70+
Update a Resource
71+
"""
72+
pass
73+
74+
75+
if __name__ == '__main__':
76+
unittest.main()

0 commit comments

Comments
 (0)