Skip to content

Commit

Permalink
Merge pull request #267 from blackwoodseven/master
Browse files Browse the repository at this point in the history
Swap order of parameters 'name' and 'namespace' for TPRs
  • Loading branch information
mbohlool committed Jun 25, 2017
2 parents 04f059a + b0bc0be commit 7650c9a
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 52 deletions.
56 changes: 28 additions & 28 deletions kubernetes/client/apis/third_party_resources_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def delete_third_party_resource_with_http_info(self, body, **kwargs):
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def get_third_party_resource(self, namespace, name, fqdn, version, resource, **kwargs):
def get_third_party_resource(self, name, namespace, fqdn, version, resource, **kwargs):
"""
Gets a specific Resource
Returns a specific Resource in a namespace
Expand All @@ -288,12 +288,12 @@ def get_third_party_resource(self, namespace, name, fqdn, version, resource, **k
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_third_party_resource(namespace, name, fqdn, version, resource, callback=callback_function)
>>> thread = api.get_third_party_resource(name, namespace, fqdn, version, resource, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str namespace: The Resource's namespace (required)
:param str name: The Resource's name (required)
:param str namespace: The Resource's namespace (required)
:param str fqdn: The Third party Resource fqdn (required)
:param str version: The Third party Resource version (required)
:param str resource: The Resource type (required)
Expand All @@ -303,12 +303,12 @@ def get_third_party_resource(self, namespace, name, fqdn, version, resource, **k
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.get_third_party_resource_with_http_info(namespace, name, fqdn, version, resource, **kwargs)
return self.get_third_party_resource_with_http_info(name, namespace, fqdn, version, resource, **kwargs)
else:
(data) = self.get_third_party_resource_with_http_info(namespace, name, fqdn, version, resource, **kwargs)
(data) = self.get_third_party_resource_with_http_info(name, namespace, fqdn, version, resource, **kwargs)
return data

def get_third_party_resource_with_http_info(self, namespace, name, fqdn, version, resource, **kwargs):
def get_third_party_resource_with_http_info(self, name, namespace, fqdn, version, resource, **kwargs):
"""
Gets a specific Resource
Returns a specific Resource in a namespace
Expand All @@ -318,12 +318,12 @@ def get_third_party_resource_with_http_info(self, namespace, name, fqdn, version
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_third_party_resource_with_http_info(namespace, name, fqdn, version, resource, callback=callback_function)
>>> thread = api.get_third_party_resource_with_http_info(name, namespace, fqdn, version, resource, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str namespace: The Resource's namespace (required)
:param str name: The Resource's name (required)
:param str namespace: The Resource's namespace (required)
:param str fqdn: The Third party Resource fqdn (required)
:param str version: The Third party Resource version (required)
:param str resource: The Resource type (required)
Expand All @@ -332,7 +332,7 @@ def get_third_party_resource_with_http_info(self, namespace, name, fqdn, version
returns the request thread.
"""

all_params = ['namespace', 'name', 'fqdn', 'version', 'resource']
all_params = ['name', 'namespace', 'fqdn', 'version', 'resource']
all_params.append('callback')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
Expand All @@ -347,12 +347,12 @@ def get_third_party_resource_with_http_info(self, namespace, name, fqdn, version
)
params[key] = val
del params['kwargs']
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `get_third_party_resource`")
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `get_third_party_resource`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `get_third_party_resource`")
# verify the required parameter 'fqdn' is set
if ('fqdn' not in params) or (params['fqdn'] is None):
raise ValueError("Missing the required parameter `fqdn` when calling `get_third_party_resource`")
Expand All @@ -368,10 +368,10 @@ def get_third_party_resource_with_http_info(self, namespace, name, fqdn, version

resource_path = '/apis/{fqdn}/{version}/namespaces/{namespace}/{resource}/{name}'.replace('{format}', 'json')
path_params = {}
if 'namespace' in params:
path_params['namespace'] = params['namespace']
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
if 'fqdn' in params:
path_params['fqdn'] = params['fqdn']
if 'version' in params:
Expand Down Expand Up @@ -522,7 +522,7 @@ def list_third_party_resource_with_http_info(self, fqdn, version, resource, **kw
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def update_third_party_resource(self, namespace, name, fqdn, version, resource, body, **kwargs):
def update_third_party_resource(self, name, namespace, fqdn, version, resource, body, **kwargs):
"""
Update a Resource
Update the specified third party resource of the type specified
Expand All @@ -532,12 +532,12 @@ def update_third_party_resource(self, namespace, name, fqdn, version, resource,
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_third_party_resource(namespace, name, fqdn, version, resource, body, callback=callback_function)
>>> thread = api.update_third_party_resource(name, namespace, fqdn, version, resource, body, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str namespace: The Resource's namespace (required)
:param str name: The Resource's name (required)
:param str namespace: The Resource's namespace (required)
:param str fqdn: The Third party Resource fqdn (required)
:param str version: The Third party Resource version (required)
:param str resource: The Resource type (required)
Expand All @@ -548,12 +548,12 @@ def update_third_party_resource(self, namespace, name, fqdn, version, resource,
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.update_third_party_resource_with_http_info(namespace, name, fqdn, version, resource, body, **kwargs)
return self.update_third_party_resource_with_http_info(name, namespace, fqdn, version, resource, body, **kwargs)
else:
(data) = self.update_third_party_resource_with_http_info(namespace, name, fqdn, version, resource, body, **kwargs)
(data) = self.update_third_party_resource_with_http_info(name, namespace, fqdn, version, resource, body, **kwargs)
return data

def update_third_party_resource_with_http_info(self, namespace, name, fqdn, version, resource, body, **kwargs):
def update_third_party_resource_with_http_info(self, name, namespace, fqdn, version, resource, body, **kwargs):
"""
Update a Resource
Update the specified third party resource of the type specified
Expand All @@ -563,12 +563,12 @@ def update_third_party_resource_with_http_info(self, namespace, name, fqdn, vers
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_third_party_resource_with_http_info(namespace, name, fqdn, version, resource, body, callback=callback_function)
>>> thread = api.update_third_party_resource_with_http_info(name, namespace, fqdn, version, resource, body, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str namespace: The Resource's namespace (required)
:param str name: The Resource's name (required)
:param str namespace: The Resource's namespace (required)
:param str fqdn: The Third party Resource fqdn (required)
:param str version: The Third party Resource version (required)
:param str resource: The Resource type (required)
Expand All @@ -578,7 +578,7 @@ def update_third_party_resource_with_http_info(self, namespace, name, fqdn, vers
returns the request thread.
"""

all_params = ['namespace', 'name', 'fqdn', 'version', 'resource', 'body']
all_params = ['name', 'namespace', 'fqdn', 'version', 'resource', 'body']
all_params.append('callback')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
Expand All @@ -593,12 +593,12 @@ def update_third_party_resource_with_http_info(self, namespace, name, fqdn, vers
)
params[key] = val
del params['kwargs']
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `update_third_party_resource`")
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `update_third_party_resource`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `update_third_party_resource`")
# verify the required parameter 'fqdn' is set
if ('fqdn' not in params) or (params['fqdn'] is None):
raise ValueError("Missing the required parameter `fqdn` when calling `update_third_party_resource`")
Expand All @@ -617,10 +617,10 @@ def update_third_party_resource_with_http_info(self, namespace, name, fqdn, vers

resource_path = '/apis/{fqdn}/{version}/namespaces/{namespace}/{resource}/{name}'.replace('{format}', 'json')
path_params = {}
if 'namespace' in params:
path_params['namespace'] = params['namespace']
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
if 'fqdn' in params:
path_params['fqdn'] = params['fqdn']
if 'version' in params:
Expand Down
16 changes: 8 additions & 8 deletions kubernetes/docs/ThirdPartyResourcesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Name | Type | Description | Notes
[[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)

# **get_third_party_resource**
> object get_third_party_resource(namespace, name, fqdn, version, resource)
> object get_third_party_resource(name, namespace, fqdn, version, resource)
Gets a specific Resource

Expand All @@ -153,15 +153,15 @@ kubernetes.client.configuration.api_key['authorization'] = 'YOUR_API_KEY'

# create an instance of the API class
api_instance = kubernetes.client.ThirdPartyResourcesApi()
namespace = 'namespace_example' # str | The Resource's namespace
name = 'name_example' # str | The Resource's name
namespace = 'namespace_example' # str | The Resource's namespace
fqdn = 'fqdn_example' # str | The Third party Resource fqdn
version = 'version_example' # str | The Third party Resource version
resource = 'resource_example' # str | The Resource type

try:
# Gets a specific Resource
api_response = api_instance.get_third_party_resource(namespace, name, fqdn, version, resource)
api_response = api_instance.get_third_party_resource(name, namespace, fqdn, version, resource)
pprint(api_response)
except ApiException as e:
print("Exception when calling ThirdPartyResourcesApi->get_third_party_resource: %s\n" % e)
Expand All @@ -171,8 +171,8 @@ except ApiException as e:

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**namespace** | **str**| The Resource's namespace |
**name** | **str**| The Resource's name |
**namespace** | **str**| The Resource's namespace |
**fqdn** | **str**| The Third party Resource fqdn |
**version** | **str**| The Third party Resource version |
**resource** | **str**| The Resource type |
Expand Down Expand Up @@ -252,7 +252,7 @@ Name | Type | Description | Notes
[[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)

# **update_third_party_resource**
> object update_third_party_resource(namespace, name, fqdn, version, resource, body)
> object update_third_party_resource(name, namespace, fqdn, version, resource, body)
Update a Resource

Expand All @@ -273,16 +273,16 @@ kubernetes.client.configuration.api_key['authorization'] = 'YOUR_API_KEY'

# create an instance of the API class
api_instance = kubernetes.client.ThirdPartyResourcesApi()
namespace = 'namespace_example' # str | The Resource's namespace
name = 'name_example' # str | The Resource's name
namespace = 'namespace_example' # str | The Resource's namespace
fqdn = 'fqdn_example' # str | The Third party Resource fqdn
version = 'version_example' # str | The Third party Resource version
resource = 'resource_example' # str | The Resource type
body = NULL # object | The JSON schema of the Resource to create.

try:
# Update a Resource
api_response = api_instance.update_third_party_resource(namespace, name, fqdn, version, resource, body)
api_response = api_instance.update_third_party_resource(name, namespace, fqdn, version, resource, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ThirdPartyResourcesApi->update_third_party_resource: %s\n" % e)
Expand All @@ -292,8 +292,8 @@ except ApiException as e:

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**namespace** | **str**| The Resource's namespace |
**name** | **str**| The Resource's name |
**namespace** | **str**| The Resource's namespace |
**fqdn** | **str**| The Third party Resource fqdn |
**version** | **str**| The Third party Resource version |
**resource** | **str**| The Resource type |
Expand Down
16 changes: 8 additions & 8 deletions scripts/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -33262,17 +33262,17 @@
},
"parameters": [
{
"description": "The Resource's namespace",
"description": "The Resource's name",
"required": true,
"type": "string",
"name": "namespace",
"name": "name",
"in": "path"
},
{
"description": "The Resource's name",
"description": "The Resource's namespace",
"required": true,
"type": "string",
"name": "name",
"name": "namespace",
"in": "path"
},
{
Expand Down Expand Up @@ -33371,17 +33371,17 @@
},
"parameters": [
{
"description": "The Resource's namespace",
"description": "The Resource's name",
"required": true,
"type": "string",
"name": "namespace",
"name": "name",
"in": "path"
},
{
"description": "The Resource's name",
"description": "The Resource's namespace",
"required": true,
"type": "string",
"name": "name",
"name": "namespace",
"in": "path"
},
{
Expand Down
16 changes: 8 additions & 8 deletions scripts/thirdpartypaths.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,17 @@
],
"parameters": [
{
"name": "namespace",
"name": "name",
"in": "path",
"required": true,
"description": "The Resource's namespace",
"description": "The Resource's name",
"type": "string"
},
{
"name": "name",
"name": "namespace",
"in": "path",
"required": true,
"description": "The Resource's name",
"description": "The Resource's namespace",
"type": "string"
},
{
Expand Down Expand Up @@ -214,17 +214,17 @@
],
"parameters": [
{
"name": "namespace",
"name": "name",
"in": "path",
"required": true,
"description": "The Resource's namespace",
"description": "The Resource's name",
"type": "string"
},
{
"name": "name",
"name": "namespace",
"in": "path",
"required": true,
"description": "The Resource's name",
"description": "The Resource's namespace",
"type": "string"
},
{
Expand Down

0 comments on commit 7650c9a

Please sign in to comment.