29156 lines
1.3 MiB
29156 lines
1.3 MiB
# coding: utf-8
|
|
|
|
"""
|
|
Kubernetes
|
|
|
|
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
|
|
OpenAPI spec version: v1.5.0-beta.1
|
|
|
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
"""
|
|
|
|
from __future__ import absolute_import
|
|
|
|
import sys
|
|
import os
|
|
import re
|
|
|
|
# python 2 and python 3 compatibility library
|
|
from six import iteritems
|
|
|
|
from ..configuration import Configuration
|
|
from ..api_client import ApiClient
|
|
|
|
|
|
class CoreV1Api(object):
|
|
"""
|
|
NOTE: This class is auto generated by the swagger code generator program.
|
|
Do not edit the class manually.
|
|
Ref: https://github.com/swagger-api/swagger-codegen
|
|
"""
|
|
|
|
def __init__(self, api_client=None):
|
|
config = Configuration()
|
|
if api_client:
|
|
self.api_client = api_client
|
|
else:
|
|
if not config.api_client:
|
|
config.api_client = ApiClient()
|
|
self.api_client = config.api_client
|
|
|
|
def connect_delete_namespaced_pod_proxy(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect DELETE requests to proxy of Pod
|
|
|
|
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.connect_delete_namespaced_pod_proxy(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_delete_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_delete_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_delete_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect DELETE requests to proxy of Pod
|
|
|
|
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.connect_delete_namespaced_pod_proxy_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 connect_delete_namespaced_pod_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_delete_namespaced_pod_proxy`")
|
|
# 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 `connect_delete_namespaced_pod_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='str',
|
|
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 connect_delete_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect DELETE requests to proxy of Pod
|
|
|
|
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.connect_delete_namespaced_pod_proxy_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_delete_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_delete_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def connect_delete_namespaced_pod_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect DELETE requests to proxy of Pod
|
|
|
|
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.connect_delete_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path', 'path2']
|
|
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 connect_delete_namespaced_pod_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_delete_namespaced_pod_proxy_with_path`")
|
|
# 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 `connect_delete_namespaced_pod_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_delete_namespaced_pod_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='str',
|
|
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 connect_delete_namespaced_service_proxy(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect DELETE requests to proxy of Service
|
|
|
|
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.connect_delete_namespaced_service_proxy(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_delete_namespaced_service_proxy_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_delete_namespaced_service_proxy_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_delete_namespaced_service_proxy_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect DELETE requests to proxy of Service
|
|
|
|
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.connect_delete_namespaced_service_proxy_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 connect_delete_namespaced_service_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_delete_namespaced_service_proxy`")
|
|
# 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 `connect_delete_namespaced_service_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='str',
|
|
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 connect_delete_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect DELETE requests to proxy of Service
|
|
|
|
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.connect_delete_namespaced_service_proxy_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_delete_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_delete_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def connect_delete_namespaced_service_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect DELETE requests to proxy of Service
|
|
|
|
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.connect_delete_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path', 'path2']
|
|
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 connect_delete_namespaced_service_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_delete_namespaced_service_proxy_with_path`")
|
|
# 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 `connect_delete_namespaced_service_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_delete_namespaced_service_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='str',
|
|
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 connect_delete_node_proxy(self, name, **kwargs):
|
|
"""
|
|
|
|
connect DELETE requests to proxy of Node
|
|
|
|
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.connect_delete_node_proxy(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_delete_node_proxy_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.connect_delete_node_proxy_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def connect_delete_node_proxy_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
connect DELETE requests to proxy of Node
|
|
|
|
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.connect_delete_node_proxy_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path']
|
|
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 connect_delete_node_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_delete_node_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='str',
|
|
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 connect_delete_node_proxy_with_path(self, name, path, **kwargs):
|
|
"""
|
|
|
|
connect DELETE requests to proxy of Node
|
|
|
|
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.connect_delete_node_proxy_with_path(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_delete_node_proxy_with_path_with_http_info(name, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_delete_node_proxy_with_path_with_http_info(name, path, **kwargs)
|
|
return data
|
|
|
|
def connect_delete_node_proxy_with_path_with_http_info(self, name, path, **kwargs):
|
|
"""
|
|
|
|
connect DELETE requests to proxy of Node
|
|
|
|
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.connect_delete_node_proxy_with_path_with_http_info(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path', 'path2']
|
|
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 connect_delete_node_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_delete_node_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_delete_node_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='str',
|
|
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 connect_get_namespaced_pod_attach(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to attach of Pod
|
|
|
|
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.connect_get_namespaced_pod_attach(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str container: The container in which to execute the command. Defaults to only container if there is only one container in the pod.
|
|
:param bool stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.
|
|
:param bool stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.
|
|
:param bool stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.
|
|
:param bool tty: TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_get_namespaced_pod_attach_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_get_namespaced_pod_attach_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_get_namespaced_pod_attach_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to attach of Pod
|
|
|
|
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.connect_get_namespaced_pod_attach_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str container: The container in which to execute the command. Defaults to only container if there is only one container in the pod.
|
|
:param bool stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.
|
|
:param bool stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.
|
|
:param bool stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.
|
|
:param bool tty: TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'container', 'stderr', 'stdin', 'stdout', 'tty']
|
|
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 connect_get_namespaced_pod_attach" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_get_namespaced_pod_attach`")
|
|
# 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 `connect_get_namespaced_pod_attach`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/attach'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'container' in params:
|
|
query_params['container'] = params['container']
|
|
if 'stderr' in params:
|
|
query_params['stderr'] = params['stderr']
|
|
if 'stdin' in params:
|
|
query_params['stdin'] = params['stdin']
|
|
if 'stdout' in params:
|
|
query_params['stdout'] = params['stdout']
|
|
if 'tty' in params:
|
|
query_params['tty'] = params['tty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_get_namespaced_pod_exec(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to exec of Pod
|
|
|
|
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.connect_get_namespaced_pod_exec(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str command: Command is the remote command to execute. argv array. Not executed within a shell.
|
|
:param str container: Container in which to execute the command. Defaults to only container if there is only one container in the pod.
|
|
:param bool stderr: Redirect the standard error stream of the pod for this call. Defaults to true.
|
|
:param bool stdin: Redirect the standard input stream of the pod for this call. Defaults to false.
|
|
:param bool stdout: Redirect the standard output stream of the pod for this call. Defaults to true.
|
|
:param bool tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_get_namespaced_pod_exec_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_get_namespaced_pod_exec_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_get_namespaced_pod_exec_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to exec of Pod
|
|
|
|
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.connect_get_namespaced_pod_exec_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str command: Command is the remote command to execute. argv array. Not executed within a shell.
|
|
:param str container: Container in which to execute the command. Defaults to only container if there is only one container in the pod.
|
|
:param bool stderr: Redirect the standard error stream of the pod for this call. Defaults to true.
|
|
:param bool stdin: Redirect the standard input stream of the pod for this call. Defaults to false.
|
|
:param bool stdout: Redirect the standard output stream of the pod for this call. Defaults to true.
|
|
:param bool tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'command', 'container', 'stderr', 'stdin', 'stdout', 'tty']
|
|
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 connect_get_namespaced_pod_exec" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_get_namespaced_pod_exec`")
|
|
# 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 `connect_get_namespaced_pod_exec`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/exec'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'command' in params:
|
|
query_params['command'] = params['command']
|
|
if 'container' in params:
|
|
query_params['container'] = params['container']
|
|
if 'stderr' in params:
|
|
query_params['stderr'] = params['stderr']
|
|
if 'stdin' in params:
|
|
query_params['stdin'] = params['stdin']
|
|
if 'stdout' in params:
|
|
query_params['stdout'] = params['stdout']
|
|
if 'tty' in params:
|
|
query_params['tty'] = params['tty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_get_namespaced_pod_portforward(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to portforward of Pod
|
|
|
|
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.connect_get_namespaced_pod_portforward(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_get_namespaced_pod_portforward_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_get_namespaced_pod_portforward_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_get_namespaced_pod_portforward_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to portforward of Pod
|
|
|
|
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.connect_get_namespaced_pod_portforward_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace']
|
|
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 connect_get_namespaced_pod_portforward" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_get_namespaced_pod_portforward`")
|
|
# 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 `connect_get_namespaced_pod_portforward`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/portforward'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_get_namespaced_pod_proxy(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to proxy of Pod
|
|
|
|
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.connect_get_namespaced_pod_proxy(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_get_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_get_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_get_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to proxy of Pod
|
|
|
|
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.connect_get_namespaced_pod_proxy_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 connect_get_namespaced_pod_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_get_namespaced_pod_proxy`")
|
|
# 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 `connect_get_namespaced_pod_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_get_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to proxy of Pod
|
|
|
|
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.connect_get_namespaced_pod_proxy_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_get_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_get_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def connect_get_namespaced_pod_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to proxy of Pod
|
|
|
|
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.connect_get_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path', 'path2']
|
|
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 connect_get_namespaced_pod_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_get_namespaced_pod_proxy_with_path`")
|
|
# 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 `connect_get_namespaced_pod_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_get_namespaced_pod_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_get_namespaced_service_proxy(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to proxy of Service
|
|
|
|
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.connect_get_namespaced_service_proxy(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_get_namespaced_service_proxy_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_get_namespaced_service_proxy_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_get_namespaced_service_proxy_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to proxy of Service
|
|
|
|
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.connect_get_namespaced_service_proxy_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 connect_get_namespaced_service_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_get_namespaced_service_proxy`")
|
|
# 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 `connect_get_namespaced_service_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_get_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to proxy of Service
|
|
|
|
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.connect_get_namespaced_service_proxy_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_get_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_get_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def connect_get_namespaced_service_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to proxy of Service
|
|
|
|
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.connect_get_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path', 'path2']
|
|
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 connect_get_namespaced_service_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_get_namespaced_service_proxy_with_path`")
|
|
# 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 `connect_get_namespaced_service_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_get_namespaced_service_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_get_node_proxy(self, name, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to proxy of Node
|
|
|
|
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.connect_get_node_proxy(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_get_node_proxy_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.connect_get_node_proxy_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def connect_get_node_proxy_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to proxy of Node
|
|
|
|
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.connect_get_node_proxy_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path']
|
|
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 connect_get_node_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_get_node_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_get_node_proxy_with_path(self, name, path, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to proxy of Node
|
|
|
|
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.connect_get_node_proxy_with_path(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_get_node_proxy_with_path_with_http_info(name, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_get_node_proxy_with_path_with_http_info(name, path, **kwargs)
|
|
return data
|
|
|
|
def connect_get_node_proxy_with_path_with_http_info(self, name, path, **kwargs):
|
|
"""
|
|
|
|
connect GET requests to proxy of Node
|
|
|
|
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.connect_get_node_proxy_with_path_with_http_info(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path', 'path2']
|
|
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 connect_get_node_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_get_node_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_get_node_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_head_namespaced_pod_proxy(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect HEAD requests to proxy of Pod
|
|
|
|
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.connect_head_namespaced_pod_proxy(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_head_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_head_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_head_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect HEAD requests to proxy of Pod
|
|
|
|
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.connect_head_namespaced_pod_proxy_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 connect_head_namespaced_pod_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_head_namespaced_pod_proxy`")
|
|
# 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 `connect_head_namespaced_pod_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_head_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect HEAD requests to proxy of Pod
|
|
|
|
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.connect_head_namespaced_pod_proxy_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_head_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_head_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def connect_head_namespaced_pod_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect HEAD requests to proxy of Pod
|
|
|
|
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.connect_head_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path', 'path2']
|
|
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 connect_head_namespaced_pod_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_head_namespaced_pod_proxy_with_path`")
|
|
# 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 `connect_head_namespaced_pod_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_head_namespaced_pod_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_head_namespaced_service_proxy(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect HEAD requests to proxy of Service
|
|
|
|
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.connect_head_namespaced_service_proxy(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_head_namespaced_service_proxy_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_head_namespaced_service_proxy_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_head_namespaced_service_proxy_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect HEAD requests to proxy of Service
|
|
|
|
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.connect_head_namespaced_service_proxy_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 connect_head_namespaced_service_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_head_namespaced_service_proxy`")
|
|
# 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 `connect_head_namespaced_service_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_head_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect HEAD requests to proxy of Service
|
|
|
|
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.connect_head_namespaced_service_proxy_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_head_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_head_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def connect_head_namespaced_service_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect HEAD requests to proxy of Service
|
|
|
|
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.connect_head_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path', 'path2']
|
|
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 connect_head_namespaced_service_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_head_namespaced_service_proxy_with_path`")
|
|
# 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 `connect_head_namespaced_service_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_head_namespaced_service_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_head_node_proxy(self, name, **kwargs):
|
|
"""
|
|
|
|
connect HEAD requests to proxy of Node
|
|
|
|
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.connect_head_node_proxy(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_head_node_proxy_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.connect_head_node_proxy_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def connect_head_node_proxy_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
connect HEAD requests to proxy of Node
|
|
|
|
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.connect_head_node_proxy_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path']
|
|
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 connect_head_node_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_head_node_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_head_node_proxy_with_path(self, name, path, **kwargs):
|
|
"""
|
|
|
|
connect HEAD requests to proxy of Node
|
|
|
|
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.connect_head_node_proxy_with_path(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_head_node_proxy_with_path_with_http_info(name, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_head_node_proxy_with_path_with_http_info(name, path, **kwargs)
|
|
return data
|
|
|
|
def connect_head_node_proxy_with_path_with_http_info(self, name, path, **kwargs):
|
|
"""
|
|
|
|
connect HEAD requests to proxy of Node
|
|
|
|
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.connect_head_node_proxy_with_path_with_http_info(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path', 'path2']
|
|
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 connect_head_node_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_head_node_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_head_node_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_options_namespaced_pod_proxy(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect OPTIONS requests to proxy of Pod
|
|
|
|
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.connect_options_namespaced_pod_proxy(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_options_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_options_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_options_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect OPTIONS requests to proxy of Pod
|
|
|
|
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.connect_options_namespaced_pod_proxy_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 connect_options_namespaced_pod_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_options_namespaced_pod_proxy`")
|
|
# 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 `connect_options_namespaced_pod_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_options_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect OPTIONS requests to proxy of Pod
|
|
|
|
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.connect_options_namespaced_pod_proxy_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_options_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_options_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def connect_options_namespaced_pod_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect OPTIONS requests to proxy of Pod
|
|
|
|
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.connect_options_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path', 'path2']
|
|
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 connect_options_namespaced_pod_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_options_namespaced_pod_proxy_with_path`")
|
|
# 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 `connect_options_namespaced_pod_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_options_namespaced_pod_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_options_namespaced_service_proxy(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect OPTIONS requests to proxy of Service
|
|
|
|
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.connect_options_namespaced_service_proxy(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_options_namespaced_service_proxy_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_options_namespaced_service_proxy_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_options_namespaced_service_proxy_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect OPTIONS requests to proxy of Service
|
|
|
|
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.connect_options_namespaced_service_proxy_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 connect_options_namespaced_service_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_options_namespaced_service_proxy`")
|
|
# 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 `connect_options_namespaced_service_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_options_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect OPTIONS requests to proxy of Service
|
|
|
|
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.connect_options_namespaced_service_proxy_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_options_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_options_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def connect_options_namespaced_service_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect OPTIONS requests to proxy of Service
|
|
|
|
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.connect_options_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path', 'path2']
|
|
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 connect_options_namespaced_service_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_options_namespaced_service_proxy_with_path`")
|
|
# 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 `connect_options_namespaced_service_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_options_namespaced_service_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_options_node_proxy(self, name, **kwargs):
|
|
"""
|
|
|
|
connect OPTIONS requests to proxy of Node
|
|
|
|
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.connect_options_node_proxy(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_options_node_proxy_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.connect_options_node_proxy_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def connect_options_node_proxy_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
connect OPTIONS requests to proxy of Node
|
|
|
|
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.connect_options_node_proxy_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path']
|
|
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 connect_options_node_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_options_node_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_options_node_proxy_with_path(self, name, path, **kwargs):
|
|
"""
|
|
|
|
connect OPTIONS requests to proxy of Node
|
|
|
|
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.connect_options_node_proxy_with_path(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_options_node_proxy_with_path_with_http_info(name, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_options_node_proxy_with_path_with_http_info(name, path, **kwargs)
|
|
return data
|
|
|
|
def connect_options_node_proxy_with_path_with_http_info(self, name, path, **kwargs):
|
|
"""
|
|
|
|
connect OPTIONS requests to proxy of Node
|
|
|
|
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.connect_options_node_proxy_with_path_with_http_info(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path', 'path2']
|
|
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 connect_options_node_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_options_node_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_options_node_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_post_namespaced_pod_attach(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to attach of Pod
|
|
|
|
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.connect_post_namespaced_pod_attach(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str container: The container in which to execute the command. Defaults to only container if there is only one container in the pod.
|
|
:param bool stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.
|
|
:param bool stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.
|
|
:param bool stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.
|
|
:param bool tty: TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_post_namespaced_pod_attach_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_post_namespaced_pod_attach_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_post_namespaced_pod_attach_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to attach of Pod
|
|
|
|
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.connect_post_namespaced_pod_attach_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str container: The container in which to execute the command. Defaults to only container if there is only one container in the pod.
|
|
:param bool stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.
|
|
:param bool stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.
|
|
:param bool stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.
|
|
:param bool tty: TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'container', 'stderr', 'stdin', 'stdout', 'tty']
|
|
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 connect_post_namespaced_pod_attach" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_post_namespaced_pod_attach`")
|
|
# 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 `connect_post_namespaced_pod_attach`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/attach'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'container' in params:
|
|
query_params['container'] = params['container']
|
|
if 'stderr' in params:
|
|
query_params['stderr'] = params['stderr']
|
|
if 'stdin' in params:
|
|
query_params['stdin'] = params['stdin']
|
|
if 'stdout' in params:
|
|
query_params['stdout'] = params['stdout']
|
|
if 'tty' in params:
|
|
query_params['tty'] = params['tty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_post_namespaced_pod_exec(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to exec of Pod
|
|
|
|
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.connect_post_namespaced_pod_exec(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str command: Command is the remote command to execute. argv array. Not executed within a shell.
|
|
:param str container: Container in which to execute the command. Defaults to only container if there is only one container in the pod.
|
|
:param bool stderr: Redirect the standard error stream of the pod for this call. Defaults to true.
|
|
:param bool stdin: Redirect the standard input stream of the pod for this call. Defaults to false.
|
|
:param bool stdout: Redirect the standard output stream of the pod for this call. Defaults to true.
|
|
:param bool tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_post_namespaced_pod_exec_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_post_namespaced_pod_exec_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_post_namespaced_pod_exec_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to exec of Pod
|
|
|
|
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.connect_post_namespaced_pod_exec_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str command: Command is the remote command to execute. argv array. Not executed within a shell.
|
|
:param str container: Container in which to execute the command. Defaults to only container if there is only one container in the pod.
|
|
:param bool stderr: Redirect the standard error stream of the pod for this call. Defaults to true.
|
|
:param bool stdin: Redirect the standard input stream of the pod for this call. Defaults to false.
|
|
:param bool stdout: Redirect the standard output stream of the pod for this call. Defaults to true.
|
|
:param bool tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'command', 'container', 'stderr', 'stdin', 'stdout', 'tty']
|
|
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 connect_post_namespaced_pod_exec" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_post_namespaced_pod_exec`")
|
|
# 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 `connect_post_namespaced_pod_exec`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/exec'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'command' in params:
|
|
query_params['command'] = params['command']
|
|
if 'container' in params:
|
|
query_params['container'] = params['container']
|
|
if 'stderr' in params:
|
|
query_params['stderr'] = params['stderr']
|
|
if 'stdin' in params:
|
|
query_params['stdin'] = params['stdin']
|
|
if 'stdout' in params:
|
|
query_params['stdout'] = params['stdout']
|
|
if 'tty' in params:
|
|
query_params['tty'] = params['tty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_post_namespaced_pod_portforward(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to portforward of Pod
|
|
|
|
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.connect_post_namespaced_pod_portforward(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_post_namespaced_pod_portforward_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_post_namespaced_pod_portforward_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_post_namespaced_pod_portforward_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to portforward of Pod
|
|
|
|
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.connect_post_namespaced_pod_portforward_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace']
|
|
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 connect_post_namespaced_pod_portforward" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_post_namespaced_pod_portforward`")
|
|
# 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 `connect_post_namespaced_pod_portforward`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/portforward'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_post_namespaced_pod_proxy(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to proxy of Pod
|
|
|
|
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.connect_post_namespaced_pod_proxy(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_post_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_post_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_post_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to proxy of Pod
|
|
|
|
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.connect_post_namespaced_pod_proxy_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 connect_post_namespaced_pod_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_post_namespaced_pod_proxy`")
|
|
# 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 `connect_post_namespaced_pod_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_post_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to proxy of Pod
|
|
|
|
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.connect_post_namespaced_pod_proxy_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_post_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_post_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def connect_post_namespaced_pod_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to proxy of Pod
|
|
|
|
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.connect_post_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path', 'path2']
|
|
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 connect_post_namespaced_pod_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_post_namespaced_pod_proxy_with_path`")
|
|
# 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 `connect_post_namespaced_pod_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_post_namespaced_pod_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_post_namespaced_service_proxy(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to proxy of Service
|
|
|
|
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.connect_post_namespaced_service_proxy(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_post_namespaced_service_proxy_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_post_namespaced_service_proxy_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_post_namespaced_service_proxy_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to proxy of Service
|
|
|
|
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.connect_post_namespaced_service_proxy_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 connect_post_namespaced_service_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_post_namespaced_service_proxy`")
|
|
# 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 `connect_post_namespaced_service_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_post_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to proxy of Service
|
|
|
|
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.connect_post_namespaced_service_proxy_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_post_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_post_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def connect_post_namespaced_service_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to proxy of Service
|
|
|
|
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.connect_post_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path', 'path2']
|
|
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 connect_post_namespaced_service_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_post_namespaced_service_proxy_with_path`")
|
|
# 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 `connect_post_namespaced_service_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_post_namespaced_service_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_post_node_proxy(self, name, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to proxy of Node
|
|
|
|
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.connect_post_node_proxy(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_post_node_proxy_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.connect_post_node_proxy_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def connect_post_node_proxy_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to proxy of Node
|
|
|
|
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.connect_post_node_proxy_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path']
|
|
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 connect_post_node_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_post_node_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_post_node_proxy_with_path(self, name, path, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to proxy of Node
|
|
|
|
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.connect_post_node_proxy_with_path(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_post_node_proxy_with_path_with_http_info(name, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_post_node_proxy_with_path_with_http_info(name, path, **kwargs)
|
|
return data
|
|
|
|
def connect_post_node_proxy_with_path_with_http_info(self, name, path, **kwargs):
|
|
"""
|
|
|
|
connect POST requests to proxy of Node
|
|
|
|
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.connect_post_node_proxy_with_path_with_http_info(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path', 'path2']
|
|
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 connect_post_node_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_post_node_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_post_node_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_put_namespaced_pod_proxy(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect PUT requests to proxy of Pod
|
|
|
|
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.connect_put_namespaced_pod_proxy(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_put_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_put_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_put_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect PUT requests to proxy of Pod
|
|
|
|
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.connect_put_namespaced_pod_proxy_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 connect_put_namespaced_pod_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_put_namespaced_pod_proxy`")
|
|
# 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 `connect_put_namespaced_pod_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_put_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect PUT requests to proxy of Pod
|
|
|
|
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.connect_put_namespaced_pod_proxy_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_put_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_put_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def connect_put_namespaced_pod_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect PUT requests to proxy of Pod
|
|
|
|
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.connect_put_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to pod.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path', 'path2']
|
|
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 connect_put_namespaced_pod_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_put_namespaced_pod_proxy_with_path`")
|
|
# 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 `connect_put_namespaced_pod_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_put_namespaced_pod_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_put_namespaced_service_proxy(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect PUT requests to proxy of Service
|
|
|
|
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.connect_put_namespaced_service_proxy(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_put_namespaced_service_proxy_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.connect_put_namespaced_service_proxy_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def connect_put_namespaced_service_proxy_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
connect PUT requests to proxy of Service
|
|
|
|
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.connect_put_namespaced_service_proxy_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 connect_put_namespaced_service_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_put_namespaced_service_proxy`")
|
|
# 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 `connect_put_namespaced_service_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_put_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect PUT requests to proxy of Service
|
|
|
|
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.connect_put_namespaced_service_proxy_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_put_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_put_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def connect_put_namespaced_service_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
connect PUT requests to proxy of Service
|
|
|
|
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.connect_put_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path', 'path2']
|
|
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 connect_put_namespaced_service_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_put_namespaced_service_proxy_with_path`")
|
|
# 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 `connect_put_namespaced_service_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_put_namespaced_service_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_put_node_proxy(self, name, **kwargs):
|
|
"""
|
|
|
|
connect PUT requests to proxy of Node
|
|
|
|
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.connect_put_node_proxy(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_put_node_proxy_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.connect_put_node_proxy_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def connect_put_node_proxy_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
connect PUT requests to proxy of Node
|
|
|
|
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.connect_put_node_proxy_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path']
|
|
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 connect_put_node_proxy" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_put_node_proxy`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/proxy'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'path' in params:
|
|
query_params['path'] = params['path']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 connect_put_node_proxy_with_path(self, name, path, **kwargs):
|
|
"""
|
|
|
|
connect PUT requests to proxy of Node
|
|
|
|
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.connect_put_node_proxy_with_path(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.connect_put_node_proxy_with_path_with_http_info(name, path, **kwargs)
|
|
else:
|
|
(data) = self.connect_put_node_proxy_with_path_with_http_info(name, path, **kwargs)
|
|
return data
|
|
|
|
def connect_put_node_proxy_with_path_with_http_info(self, name, path, **kwargs):
|
|
"""
|
|
|
|
connect PUT requests to proxy of Node
|
|
|
|
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.connect_put_node_proxy_with_path_with_http_info(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:param str path2: Path is the URL path to use for the current proxy request to node.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path', 'path2']
|
|
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 connect_put_node_proxy_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `connect_put_node_proxy_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `connect_put_node_proxy_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/proxy/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
if 'path2' in params:
|
|
query_params['path'] = params['path2']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 create_namespace(self, body, **kwargs):
|
|
"""
|
|
|
|
create a 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.create_namespace(body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param V1Namespace body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespace_with_http_info(body, **kwargs)
|
|
else:
|
|
(data) = self.create_namespace_with_http_info(body, **kwargs)
|
|
return data
|
|
|
|
def create_namespace_with_http_info(self, body, **kwargs):
|
|
"""
|
|
|
|
create a 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.create_namespace_with_http_info(body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param V1Namespace body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['body', 'pretty']
|
|
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 create_namespace" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespace`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace',
|
|
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 create_namespaced_binding(self, body, namespace, **kwargs):
|
|
"""
|
|
|
|
create a Binding
|
|
|
|
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.create_namespaced_binding(body, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param V1Binding body: (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Binding
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_binding_with_http_info(body, namespace, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_binding_with_http_info(body, namespace, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_binding_with_http_info(self, body, namespace, **kwargs):
|
|
"""
|
|
|
|
create a Binding
|
|
|
|
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.create_namespaced_binding_with_http_info(body, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param V1Binding body: (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Binding
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['body', 'namespace', 'pretty']
|
|
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 create_namespaced_binding" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_binding`")
|
|
# 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 `create_namespaced_binding`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/bindings'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Binding',
|
|
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 create_namespaced_binding_binding(self, body, name, namespace, **kwargs):
|
|
"""
|
|
|
|
create binding of a Binding
|
|
|
|
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.create_namespaced_binding_binding(body, name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param V1Binding body: (required)
|
|
:param str name: name of the Binding (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Binding
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_binding_binding_with_http_info(body, name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_binding_binding_with_http_info(body, name, namespace, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_binding_binding_with_http_info(self, body, name, namespace, **kwargs):
|
|
"""
|
|
|
|
create binding of a Binding
|
|
|
|
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.create_namespaced_binding_binding_with_http_info(body, name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param V1Binding body: (required)
|
|
:param str name: name of the Binding (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Binding
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['body', 'name', 'namespace', 'pretty']
|
|
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 create_namespaced_binding_binding" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_binding_binding`")
|
|
# 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 `create_namespaced_binding_binding`")
|
|
# 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 `create_namespaced_binding_binding`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/binding'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Binding',
|
|
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 create_namespaced_config_map(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a ConfigMap
|
|
|
|
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.create_namespaced_config_map(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ConfigMap body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ConfigMap
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_config_map_with_http_info(namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_config_map_with_http_info(namespace, body, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_config_map_with_http_info(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a ConfigMap
|
|
|
|
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.create_namespaced_config_map_with_http_info(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ConfigMap body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ConfigMap
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', 'body', 'pretty']
|
|
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 create_namespaced_config_map" % key
|
|
)
|
|
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 `create_namespaced_config_map`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_config_map`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/configmaps'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ConfigMap',
|
|
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 create_namespaced_endpoints(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create Endpoints
|
|
|
|
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.create_namespaced_endpoints(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Endpoints body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Endpoints
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_endpoints_with_http_info(namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_endpoints_with_http_info(namespace, body, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_endpoints_with_http_info(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create Endpoints
|
|
|
|
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.create_namespaced_endpoints_with_http_info(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Endpoints body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Endpoints
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', 'body', 'pretty']
|
|
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 create_namespaced_endpoints" % key
|
|
)
|
|
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 `create_namespaced_endpoints`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_endpoints`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/endpoints'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Endpoints',
|
|
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 create_namespaced_event(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create an Event
|
|
|
|
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.create_namespaced_event(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Event body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Event
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_event_with_http_info(namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_event_with_http_info(namespace, body, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_event_with_http_info(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create an Event
|
|
|
|
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.create_namespaced_event_with_http_info(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Event body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Event
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', 'body', 'pretty']
|
|
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 create_namespaced_event" % key
|
|
)
|
|
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 `create_namespaced_event`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_event`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/events'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Event',
|
|
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 create_namespaced_eviction_eviction(self, body, name, namespace, **kwargs):
|
|
"""
|
|
|
|
create eviction of an Eviction
|
|
|
|
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.create_namespaced_eviction_eviction(body, name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param V1beta1Eviction body: (required)
|
|
:param str name: name of the Eviction (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1beta1Eviction
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_eviction_eviction_with_http_info(body, name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_eviction_eviction_with_http_info(body, name, namespace, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_eviction_eviction_with_http_info(self, body, name, namespace, **kwargs):
|
|
"""
|
|
|
|
create eviction of an Eviction
|
|
|
|
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.create_namespaced_eviction_eviction_with_http_info(body, name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param V1beta1Eviction body: (required)
|
|
:param str name: name of the Eviction (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1beta1Eviction
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['body', 'name', 'namespace', 'pretty']
|
|
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 create_namespaced_eviction_eviction" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_eviction_eviction`")
|
|
# 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 `create_namespaced_eviction_eviction`")
|
|
# 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 `create_namespaced_eviction_eviction`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/eviction'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1beta1Eviction',
|
|
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 create_namespaced_limit_range(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a LimitRange
|
|
|
|
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.create_namespaced_limit_range(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1LimitRange body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1LimitRange
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_limit_range_with_http_info(namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_limit_range_with_http_info(namespace, body, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_limit_range_with_http_info(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a LimitRange
|
|
|
|
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.create_namespaced_limit_range_with_http_info(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1LimitRange body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1LimitRange
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', 'body', 'pretty']
|
|
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 create_namespaced_limit_range" % key
|
|
)
|
|
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 `create_namespaced_limit_range`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_limit_range`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/limitranges'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1LimitRange',
|
|
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 create_namespaced_persistent_volume_claim(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a PersistentVolumeClaim
|
|
|
|
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.create_namespaced_persistent_volume_claim(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1PersistentVolumeClaim body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_persistent_volume_claim_with_http_info(namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_persistent_volume_claim_with_http_info(namespace, body, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_persistent_volume_claim_with_http_info(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a PersistentVolumeClaim
|
|
|
|
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.create_namespaced_persistent_volume_claim_with_http_info(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1PersistentVolumeClaim body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', 'body', 'pretty']
|
|
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 create_namespaced_persistent_volume_claim" % key
|
|
)
|
|
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 `create_namespaced_persistent_volume_claim`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_persistent_volume_claim`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim',
|
|
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 create_namespaced_pod(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a Pod
|
|
|
|
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.create_namespaced_pod(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Pod body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_pod_with_http_info(namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_pod_with_http_info(namespace, body, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_pod_with_http_info(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a Pod
|
|
|
|
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.create_namespaced_pod_with_http_info(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Pod body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', 'body', 'pretty']
|
|
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 create_namespaced_pod" % key
|
|
)
|
|
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 `create_namespaced_pod`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_pod`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod',
|
|
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 create_namespaced_pod_template(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a PodTemplate
|
|
|
|
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.create_namespaced_pod_template(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1PodTemplate body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PodTemplate
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_pod_template_with_http_info(namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_pod_template_with_http_info(namespace, body, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_pod_template_with_http_info(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a PodTemplate
|
|
|
|
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.create_namespaced_pod_template_with_http_info(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1PodTemplate body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PodTemplate
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', 'body', 'pretty']
|
|
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 create_namespaced_pod_template" % key
|
|
)
|
|
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 `create_namespaced_pod_template`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_pod_template`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/podtemplates'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodTemplate',
|
|
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 create_namespaced_replication_controller(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a ReplicationController
|
|
|
|
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.create_namespaced_replication_controller(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ReplicationController body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_replication_controller_with_http_info(namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_replication_controller_with_http_info(namespace, body, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_replication_controller_with_http_info(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a ReplicationController
|
|
|
|
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.create_namespaced_replication_controller_with_http_info(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ReplicationController body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', 'body', 'pretty']
|
|
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 create_namespaced_replication_controller" % key
|
|
)
|
|
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 `create_namespaced_replication_controller`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_replication_controller`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationController',
|
|
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 create_namespaced_resource_quota(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a ResourceQuota
|
|
|
|
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.create_namespaced_resource_quota(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ResourceQuota body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_resource_quota_with_http_info(namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_resource_quota_with_http_info(namespace, body, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_resource_quota_with_http_info(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a ResourceQuota
|
|
|
|
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.create_namespaced_resource_quota_with_http_info(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ResourceQuota body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', 'body', 'pretty']
|
|
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 create_namespaced_resource_quota" % key
|
|
)
|
|
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 `create_namespaced_resource_quota`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_resource_quota`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/resourcequotas'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota',
|
|
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 create_namespaced_secret(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a Secret
|
|
|
|
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.create_namespaced_secret(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Secret body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Secret
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_secret_with_http_info(namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_secret_with_http_info(namespace, body, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_secret_with_http_info(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a Secret
|
|
|
|
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.create_namespaced_secret_with_http_info(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Secret body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Secret
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', 'body', 'pretty']
|
|
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 create_namespaced_secret" % key
|
|
)
|
|
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 `create_namespaced_secret`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_secret`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/secrets'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Secret',
|
|
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 create_namespaced_service(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a Service
|
|
|
|
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.create_namespaced_service(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Service body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_service_with_http_info(namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_service_with_http_info(namespace, body, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_service_with_http_info(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a Service
|
|
|
|
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.create_namespaced_service_with_http_info(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Service body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', 'body', 'pretty']
|
|
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 create_namespaced_service" % key
|
|
)
|
|
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 `create_namespaced_service`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_service`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service',
|
|
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 create_namespaced_service_account(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a ServiceAccount
|
|
|
|
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.create_namespaced_service_account(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ServiceAccount body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ServiceAccount
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_namespaced_service_account_with_http_info(namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.create_namespaced_service_account_with_http_info(namespace, body, **kwargs)
|
|
return data
|
|
|
|
def create_namespaced_service_account_with_http_info(self, namespace, body, **kwargs):
|
|
"""
|
|
|
|
create a ServiceAccount
|
|
|
|
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.create_namespaced_service_account_with_http_info(namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ServiceAccount body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ServiceAccount
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', 'body', 'pretty']
|
|
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 create_namespaced_service_account" % key
|
|
)
|
|
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 `create_namespaced_service_account`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_namespaced_service_account`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/serviceaccounts'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceAccount',
|
|
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 create_node(self, body, **kwargs):
|
|
"""
|
|
|
|
create a Node
|
|
|
|
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.create_node(body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param V1Node body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_node_with_http_info(body, **kwargs)
|
|
else:
|
|
(data) = self.create_node_with_http_info(body, **kwargs)
|
|
return data
|
|
|
|
def create_node_with_http_info(self, body, **kwargs):
|
|
"""
|
|
|
|
create a Node
|
|
|
|
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.create_node_with_http_info(body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param V1Node body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['body', 'pretty']
|
|
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 create_node" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_node`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Node',
|
|
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 create_persistent_volume(self, body, **kwargs):
|
|
"""
|
|
|
|
create a PersistentVolume
|
|
|
|
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.create_persistent_volume(body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param V1PersistentVolume body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.create_persistent_volume_with_http_info(body, **kwargs)
|
|
else:
|
|
(data) = self.create_persistent_volume_with_http_info(body, **kwargs)
|
|
return data
|
|
|
|
def create_persistent_volume_with_http_info(self, body, **kwargs):
|
|
"""
|
|
|
|
create a PersistentVolume
|
|
|
|
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.create_persistent_volume_with_http_info(body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param V1PersistentVolume body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['body', 'pretty']
|
|
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 create_persistent_volume" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `create_persistent_volume`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/persistentvolumes'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume',
|
|
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_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.
|
|
: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: UnversionedStatus
|
|
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.
|
|
: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: UnversionedStatus
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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
|
|
|
|
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_namespaced_config_map(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_collection_namespaced_config_map_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.delete_collection_namespaced_config_map_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def delete_collection_namespaced_config_map_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of ConfigMap
|
|
|
|
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_namespaced_config_map_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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_namespaced_config_map" % key
|
|
)
|
|
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 `delete_collection_namespaced_config_map`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/configmaps'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_endpoints(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of Endpoints
|
|
|
|
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_namespaced_endpoints(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_collection_namespaced_endpoints_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.delete_collection_namespaced_endpoints_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def delete_collection_namespaced_endpoints_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of Endpoints
|
|
|
|
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_namespaced_endpoints_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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_namespaced_endpoints" % key
|
|
)
|
|
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 `delete_collection_namespaced_endpoints`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/endpoints'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_event(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of Event
|
|
|
|
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_namespaced_event(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_collection_namespaced_event_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.delete_collection_namespaced_event_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of Event
|
|
|
|
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_namespaced_event_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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_namespaced_event" % key
|
|
)
|
|
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 `delete_collection_namespaced_event`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/events'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_limit_range(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of LimitRange
|
|
|
|
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_namespaced_limit_range(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_collection_namespaced_limit_range_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.delete_collection_namespaced_limit_range_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def delete_collection_namespaced_limit_range_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of LimitRange
|
|
|
|
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_namespaced_limit_range_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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_namespaced_limit_range" % key
|
|
)
|
|
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 `delete_collection_namespaced_limit_range`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/limitranges'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_persistent_volume_claim(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of PersistentVolumeClaim
|
|
|
|
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_namespaced_persistent_volume_claim(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_collection_namespaced_persistent_volume_claim_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.delete_collection_namespaced_persistent_volume_claim_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def delete_collection_namespaced_persistent_volume_claim_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of PersistentVolumeClaim
|
|
|
|
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_namespaced_persistent_volume_claim_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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_namespaced_persistent_volume_claim" % key
|
|
)
|
|
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 `delete_collection_namespaced_persistent_volume_claim`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_pod(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of Pod
|
|
|
|
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_namespaced_pod(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_collection_namespaced_pod_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.delete_collection_namespaced_pod_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def delete_collection_namespaced_pod_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of Pod
|
|
|
|
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_namespaced_pod_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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_namespaced_pod" % key
|
|
)
|
|
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 `delete_collection_namespaced_pod`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_pod_template(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of PodTemplate
|
|
|
|
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_namespaced_pod_template(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_collection_namespaced_pod_template_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.delete_collection_namespaced_pod_template_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def delete_collection_namespaced_pod_template_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of PodTemplate
|
|
|
|
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_namespaced_pod_template_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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_namespaced_pod_template" % key
|
|
)
|
|
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 `delete_collection_namespaced_pod_template`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/podtemplates'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_replication_controller(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of ReplicationController
|
|
|
|
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_namespaced_replication_controller(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_collection_namespaced_replication_controller_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.delete_collection_namespaced_replication_controller_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def delete_collection_namespaced_replication_controller_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of ReplicationController
|
|
|
|
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_namespaced_replication_controller_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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_namespaced_replication_controller" % key
|
|
)
|
|
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 `delete_collection_namespaced_replication_controller`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_resource_quota(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of ResourceQuota
|
|
|
|
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_namespaced_resource_quota(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_collection_namespaced_resource_quota_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.delete_collection_namespaced_resource_quota_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def delete_collection_namespaced_resource_quota_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of ResourceQuota
|
|
|
|
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_namespaced_resource_quota_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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_namespaced_resource_quota" % key
|
|
)
|
|
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 `delete_collection_namespaced_resource_quota`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/resourcequotas'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_secret(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of Secret
|
|
|
|
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_namespaced_secret(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_collection_namespaced_secret_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.delete_collection_namespaced_secret_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def delete_collection_namespaced_secret_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of Secret
|
|
|
|
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_namespaced_secret_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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_namespaced_secret" % key
|
|
)
|
|
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 `delete_collection_namespaced_secret`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/secrets'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_service_account(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of ServiceAccount
|
|
|
|
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_namespaced_service_account(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_collection_namespaced_service_account_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.delete_collection_namespaced_service_account_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def delete_collection_namespaced_service_account_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
delete collection of ServiceAccount
|
|
|
|
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_namespaced_service_account_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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_namespaced_service_account" % key
|
|
)
|
|
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 `delete_collection_namespaced_service_account`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/serviceaccounts'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_node(self, **kwargs):
|
|
"""
|
|
|
|
delete collection of Node
|
|
|
|
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_node(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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_collection_node_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.delete_collection_node_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def delete_collection_node_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
delete collection of Node
|
|
|
|
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_node_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.
|
|
: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: UnversionedStatus
|
|
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_node" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes'.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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_persistent_volume(self, **kwargs):
|
|
"""
|
|
|
|
delete collection of PersistentVolume
|
|
|
|
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_persistent_volume(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.
|
|
: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: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_collection_persistent_volume_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.delete_collection_persistent_volume_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def delete_collection_persistent_volume_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
delete collection of PersistentVolume
|
|
|
|
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_persistent_volume_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.
|
|
: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: UnversionedStatus
|
|
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_persistent_volume" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/persistentvolumes'.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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_namespace(self, name, body, **kwargs):
|
|
"""
|
|
|
|
delete a 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_namespace(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Namespace (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_namespace_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.delete_namespace_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def delete_namespace_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
delete a 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_namespace_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Namespace (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents']
|
|
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_namespace" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_namespace`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `delete_namespace`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'grace_period_seconds' in params:
|
|
query_params['gracePeriodSeconds'] = params['grace_period_seconds']
|
|
if 'orphan_dependents' in params:
|
|
query_params['orphanDependents'] = params['orphan_dependents']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_namespaced_config_map(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a ConfigMap
|
|
|
|
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_namespaced_config_map(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ConfigMap (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_namespaced_config_map_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.delete_namespaced_config_map_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def delete_namespaced_config_map_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a ConfigMap
|
|
|
|
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_namespaced_config_map_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ConfigMap (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents']
|
|
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_namespaced_config_map" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_namespaced_config_map`")
|
|
# 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 `delete_namespaced_config_map`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_config_map`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/configmaps/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'grace_period_seconds' in params:
|
|
query_params['gracePeriodSeconds'] = params['grace_period_seconds']
|
|
if 'orphan_dependents' in params:
|
|
query_params['orphanDependents'] = params['orphan_dependents']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_namespaced_endpoints(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete Endpoints
|
|
|
|
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_namespaced_endpoints(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Endpoints (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_namespaced_endpoints_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.delete_namespaced_endpoints_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def delete_namespaced_endpoints_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete Endpoints
|
|
|
|
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_namespaced_endpoints_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Endpoints (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents']
|
|
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_namespaced_endpoints" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_namespaced_endpoints`")
|
|
# 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 `delete_namespaced_endpoints`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_endpoints`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/endpoints/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'grace_period_seconds' in params:
|
|
query_params['gracePeriodSeconds'] = params['grace_period_seconds']
|
|
if 'orphan_dependents' in params:
|
|
query_params['orphanDependents'] = params['orphan_dependents']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_namespaced_event(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete an Event
|
|
|
|
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_namespaced_event(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Event (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_namespaced_event_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.delete_namespaced_event_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def delete_namespaced_event_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete an Event
|
|
|
|
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_namespaced_event_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Event (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents']
|
|
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_namespaced_event" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_namespaced_event`")
|
|
# 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 `delete_namespaced_event`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_event`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/events/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'grace_period_seconds' in params:
|
|
query_params['gracePeriodSeconds'] = params['grace_period_seconds']
|
|
if 'orphan_dependents' in params:
|
|
query_params['orphanDependents'] = params['orphan_dependents']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_namespaced_limit_range(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a LimitRange
|
|
|
|
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_namespaced_limit_range(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the LimitRange (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_namespaced_limit_range_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.delete_namespaced_limit_range_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def delete_namespaced_limit_range_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a LimitRange
|
|
|
|
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_namespaced_limit_range_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the LimitRange (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents']
|
|
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_namespaced_limit_range" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_namespaced_limit_range`")
|
|
# 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 `delete_namespaced_limit_range`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_limit_range`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/limitranges/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'grace_period_seconds' in params:
|
|
query_params['gracePeriodSeconds'] = params['grace_period_seconds']
|
|
if 'orphan_dependents' in params:
|
|
query_params['orphanDependents'] = params['orphan_dependents']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_namespaced_persistent_volume_claim(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a PersistentVolumeClaim
|
|
|
|
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_namespaced_persistent_volume_claim(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.delete_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def delete_namespaced_persistent_volume_claim_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a PersistentVolumeClaim
|
|
|
|
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_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents']
|
|
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_namespaced_persistent_volume_claim" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_namespaced_persistent_volume_claim`")
|
|
# 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 `delete_namespaced_persistent_volume_claim`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_persistent_volume_claim`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'grace_period_seconds' in params:
|
|
query_params['gracePeriodSeconds'] = params['grace_period_seconds']
|
|
if 'orphan_dependents' in params:
|
|
query_params['orphanDependents'] = params['orphan_dependents']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_namespaced_pod(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a Pod
|
|
|
|
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_namespaced_pod(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_namespaced_pod_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.delete_namespaced_pod_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def delete_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a Pod
|
|
|
|
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_namespaced_pod_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents']
|
|
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_namespaced_pod" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_namespaced_pod`")
|
|
# 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 `delete_namespaced_pod`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_pod`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'grace_period_seconds' in params:
|
|
query_params['gracePeriodSeconds'] = params['grace_period_seconds']
|
|
if 'orphan_dependents' in params:
|
|
query_params['orphanDependents'] = params['orphan_dependents']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_namespaced_pod_template(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a PodTemplate
|
|
|
|
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_namespaced_pod_template(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PodTemplate (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_namespaced_pod_template_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.delete_namespaced_pod_template_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def delete_namespaced_pod_template_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a PodTemplate
|
|
|
|
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_namespaced_pod_template_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PodTemplate (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents']
|
|
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_namespaced_pod_template" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_namespaced_pod_template`")
|
|
# 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 `delete_namespaced_pod_template`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_pod_template`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/podtemplates/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'grace_period_seconds' in params:
|
|
query_params['gracePeriodSeconds'] = params['grace_period_seconds']
|
|
if 'orphan_dependents' in params:
|
|
query_params['orphanDependents'] = params['orphan_dependents']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_namespaced_replication_controller(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a ReplicationController
|
|
|
|
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_namespaced_replication_controller(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_namespaced_replication_controller_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.delete_namespaced_replication_controller_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def delete_namespaced_replication_controller_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a ReplicationController
|
|
|
|
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_namespaced_replication_controller_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents']
|
|
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_namespaced_replication_controller" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_namespaced_replication_controller`")
|
|
# 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 `delete_namespaced_replication_controller`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_replication_controller`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'grace_period_seconds' in params:
|
|
query_params['gracePeriodSeconds'] = params['grace_period_seconds']
|
|
if 'orphan_dependents' in params:
|
|
query_params['orphanDependents'] = params['orphan_dependents']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_namespaced_resource_quota(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a ResourceQuota
|
|
|
|
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_namespaced_resource_quota(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_namespaced_resource_quota_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.delete_namespaced_resource_quota_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def delete_namespaced_resource_quota_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a ResourceQuota
|
|
|
|
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_namespaced_resource_quota_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents']
|
|
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_namespaced_resource_quota" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_namespaced_resource_quota`")
|
|
# 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 `delete_namespaced_resource_quota`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_resource_quota`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/resourcequotas/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'grace_period_seconds' in params:
|
|
query_params['gracePeriodSeconds'] = params['grace_period_seconds']
|
|
if 'orphan_dependents' in params:
|
|
query_params['orphanDependents'] = params['orphan_dependents']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_namespaced_secret(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a Secret
|
|
|
|
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_namespaced_secret(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Secret (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_namespaced_secret_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.delete_namespaced_secret_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def delete_namespaced_secret_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a Secret
|
|
|
|
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_namespaced_secret_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Secret (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents']
|
|
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_namespaced_secret" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_namespaced_secret`")
|
|
# 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 `delete_namespaced_secret`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_secret`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/secrets/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'grace_period_seconds' in params:
|
|
query_params['gracePeriodSeconds'] = params['grace_period_seconds']
|
|
if 'orphan_dependents' in params:
|
|
query_params['orphanDependents'] = params['orphan_dependents']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_namespaced_service(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
delete a Service
|
|
|
|
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_namespaced_service(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.delete_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def delete_namespaced_service_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
delete a Service
|
|
|
|
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_namespaced_service_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty']
|
|
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_namespaced_service" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_namespaced_service`")
|
|
# 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 `delete_namespaced_service`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_namespaced_service_account(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a ServiceAccount
|
|
|
|
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_namespaced_service_account(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ServiceAccount (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_namespaced_service_account_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.delete_namespaced_service_account_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def delete_namespaced_service_account_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
delete a ServiceAccount
|
|
|
|
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_namespaced_service_account_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ServiceAccount (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents']
|
|
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_namespaced_service_account" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_namespaced_service_account`")
|
|
# 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 `delete_namespaced_service_account`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_service_account`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'grace_period_seconds' in params:
|
|
query_params['gracePeriodSeconds'] = params['grace_period_seconds']
|
|
if 'orphan_dependents' in params:
|
|
query_params['orphanDependents'] = params['orphan_dependents']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_node(self, name, body, **kwargs):
|
|
"""
|
|
|
|
delete a Node
|
|
|
|
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_node(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_node_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.delete_node_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def delete_node_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
delete a Node
|
|
|
|
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_node_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents']
|
|
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_node" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_node`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `delete_node`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'grace_period_seconds' in params:
|
|
query_params['gracePeriodSeconds'] = params['grace_period_seconds']
|
|
if 'orphan_dependents' in params:
|
|
query_params['orphanDependents'] = params['orphan_dependents']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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_persistent_volume(self, name, body, **kwargs):
|
|
"""
|
|
|
|
delete a PersistentVolume
|
|
|
|
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_persistent_volume(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.delete_persistent_volume_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.delete_persistent_volume_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def delete_persistent_volume_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
delete a PersistentVolume
|
|
|
|
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_persistent_volume_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param V1DeleteOptions body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param int grace_period_seconds: 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.
|
|
:param bool orphan_dependents: Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.
|
|
:return: UnversionedStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents']
|
|
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_persistent_volume" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `delete_persistent_volume`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `delete_persistent_volume`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/persistentvolumes/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'grace_period_seconds' in params:
|
|
query_params['gracePeriodSeconds'] = params['grace_period_seconds']
|
|
if 'orphan_dependents' in params:
|
|
query_params['orphanDependents'] = params['orphan_dependents']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='UnversionedStatus',
|
|
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 get_api_resources(self, **kwargs):
|
|
"""
|
|
|
|
get available resources
|
|
|
|
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.get_api_resources(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:return: UnversionedAPIResourceList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.get_api_resources_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.get_api_resources_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def get_api_resources_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
get available resources
|
|
|
|
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.get_api_resources_with_http_info(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:return: UnversionedAPIResourceList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = []
|
|
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 get_api_resources" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='UnversionedAPIResourceList',
|
|
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 list_component_status(self, **kwargs):
|
|
"""
|
|
|
|
list objects of kind ComponentStatus
|
|
|
|
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.list_component_status(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1ComponentStatusList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_component_status_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_component_status_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_component_status_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list objects of kind ComponentStatus
|
|
|
|
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.list_component_status_with_http_info(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1ComponentStatusList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['field_selector', 'label_selector', 'pretty', '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 list_component_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/componentstatuses'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'field_selector' in params:
|
|
query_params['fieldSelector'] = params['field_selector']
|
|
if 'label_selector' in params:
|
|
query_params['labelSelector'] = params['label_selector']
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ComponentStatusList',
|
|
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 list_config_map_for_all_namespaces(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ConfigMap
|
|
|
|
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.list_config_map_for_all_namespaces(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1ConfigMapList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_config_map_for_all_namespaces_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_config_map_for_all_namespaces_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_config_map_for_all_namespaces_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ConfigMap
|
|
|
|
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.list_config_map_for_all_namespaces_with_http_info(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1ConfigMapList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['field_selector', 'label_selector', 'pretty', '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 list_config_map_for_all_namespaces" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/configmaps'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'field_selector' in params:
|
|
query_params['fieldSelector'] = params['field_selector']
|
|
if 'label_selector' in params:
|
|
query_params['labelSelector'] = params['label_selector']
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ConfigMapList',
|
|
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 list_endpoints_for_all_namespaces(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Endpoints
|
|
|
|
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.list_endpoints_for_all_namespaces(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1EndpointsList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_endpoints_for_all_namespaces_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_endpoints_for_all_namespaces_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_endpoints_for_all_namespaces_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Endpoints
|
|
|
|
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.list_endpoints_for_all_namespaces_with_http_info(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1EndpointsList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['field_selector', 'label_selector', 'pretty', '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 list_endpoints_for_all_namespaces" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/endpoints'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'field_selector' in params:
|
|
query_params['fieldSelector'] = params['field_selector']
|
|
if 'label_selector' in params:
|
|
query_params['labelSelector'] = params['label_selector']
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1EndpointsList',
|
|
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 list_event_for_all_namespaces(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Event
|
|
|
|
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.list_event_for_all_namespaces(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1EventList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_event_for_all_namespaces_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_event_for_all_namespaces_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_event_for_all_namespaces_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Event
|
|
|
|
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.list_event_for_all_namespaces_with_http_info(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1EventList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['field_selector', 'label_selector', 'pretty', '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 list_event_for_all_namespaces" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/events'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'field_selector' in params:
|
|
query_params['fieldSelector'] = params['field_selector']
|
|
if 'label_selector' in params:
|
|
query_params['labelSelector'] = params['label_selector']
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1EventList',
|
|
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 list_limit_range_for_all_namespaces(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind LimitRange
|
|
|
|
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.list_limit_range_for_all_namespaces(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1LimitRangeList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_limit_range_for_all_namespaces_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_limit_range_for_all_namespaces_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_limit_range_for_all_namespaces_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind LimitRange
|
|
|
|
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.list_limit_range_for_all_namespaces_with_http_info(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1LimitRangeList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['field_selector', 'label_selector', 'pretty', '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 list_limit_range_for_all_namespaces" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/limitranges'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'field_selector' in params:
|
|
query_params['fieldSelector'] = params['field_selector']
|
|
if 'label_selector' in params:
|
|
query_params['labelSelector'] = params['label_selector']
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1LimitRangeList',
|
|
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 list_namespace(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind 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.list_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.
|
|
: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: V1NamespaceList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_namespace_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_namespace_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_namespace_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind 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.list_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.
|
|
: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: V1NamespaceList
|
|
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 list_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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1NamespaceList',
|
|
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 list_namespaced_config_map(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ConfigMap
|
|
|
|
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.list_namespaced_config_map(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1ConfigMapList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_namespaced_config_map_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.list_namespaced_config_map_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def list_namespaced_config_map_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ConfigMap
|
|
|
|
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.list_namespaced_config_map_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1ConfigMapList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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 list_namespaced_config_map" % key
|
|
)
|
|
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 `list_namespaced_config_map`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/configmaps'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ConfigMapList',
|
|
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 list_namespaced_endpoints(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Endpoints
|
|
|
|
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.list_namespaced_endpoints(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1EndpointsList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_namespaced_endpoints_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.list_namespaced_endpoints_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def list_namespaced_endpoints_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Endpoints
|
|
|
|
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.list_namespaced_endpoints_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1EndpointsList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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 list_namespaced_endpoints" % key
|
|
)
|
|
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 `list_namespaced_endpoints`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/endpoints'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1EndpointsList',
|
|
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 list_namespaced_event(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Event
|
|
|
|
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.list_namespaced_event(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1EventList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_namespaced_event_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.list_namespaced_event_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def list_namespaced_event_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Event
|
|
|
|
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.list_namespaced_event_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1EventList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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 list_namespaced_event" % key
|
|
)
|
|
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 `list_namespaced_event`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/events'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1EventList',
|
|
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 list_namespaced_limit_range(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind LimitRange
|
|
|
|
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.list_namespaced_limit_range(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1LimitRangeList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_namespaced_limit_range_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.list_namespaced_limit_range_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def list_namespaced_limit_range_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind LimitRange
|
|
|
|
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.list_namespaced_limit_range_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1LimitRangeList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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 list_namespaced_limit_range" % key
|
|
)
|
|
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 `list_namespaced_limit_range`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/limitranges'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1LimitRangeList',
|
|
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 list_namespaced_persistent_volume_claim(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind PersistentVolumeClaim
|
|
|
|
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.list_namespaced_persistent_volume_claim(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1PersistentVolumeClaimList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_namespaced_persistent_volume_claim_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.list_namespaced_persistent_volume_claim_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def list_namespaced_persistent_volume_claim_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind PersistentVolumeClaim
|
|
|
|
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.list_namespaced_persistent_volume_claim_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1PersistentVolumeClaimList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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 list_namespaced_persistent_volume_claim" % key
|
|
)
|
|
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 `list_namespaced_persistent_volume_claim`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaimList',
|
|
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 list_namespaced_pod(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Pod
|
|
|
|
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.list_namespaced_pod(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1PodList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_namespaced_pod_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.list_namespaced_pod_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def list_namespaced_pod_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Pod
|
|
|
|
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.list_namespaced_pod_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1PodList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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 list_namespaced_pod" % key
|
|
)
|
|
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 `list_namespaced_pod`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodList',
|
|
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 list_namespaced_pod_template(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind PodTemplate
|
|
|
|
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.list_namespaced_pod_template(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1PodTemplateList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_namespaced_pod_template_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.list_namespaced_pod_template_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def list_namespaced_pod_template_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind PodTemplate
|
|
|
|
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.list_namespaced_pod_template_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1PodTemplateList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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 list_namespaced_pod_template" % key
|
|
)
|
|
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 `list_namespaced_pod_template`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/podtemplates'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodTemplateList',
|
|
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 list_namespaced_replication_controller(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ReplicationController
|
|
|
|
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.list_namespaced_replication_controller(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1ReplicationControllerList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_namespaced_replication_controller_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.list_namespaced_replication_controller_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def list_namespaced_replication_controller_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ReplicationController
|
|
|
|
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.list_namespaced_replication_controller_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1ReplicationControllerList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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 list_namespaced_replication_controller" % key
|
|
)
|
|
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 `list_namespaced_replication_controller`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationControllerList',
|
|
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 list_namespaced_resource_quota(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ResourceQuota
|
|
|
|
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.list_namespaced_resource_quota(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1ResourceQuotaList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_namespaced_resource_quota_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.list_namespaced_resource_quota_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def list_namespaced_resource_quota_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ResourceQuota
|
|
|
|
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.list_namespaced_resource_quota_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1ResourceQuotaList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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 list_namespaced_resource_quota" % key
|
|
)
|
|
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 `list_namespaced_resource_quota`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/resourcequotas'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuotaList',
|
|
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 list_namespaced_secret(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Secret
|
|
|
|
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.list_namespaced_secret(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1SecretList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_namespaced_secret_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.list_namespaced_secret_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def list_namespaced_secret_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Secret
|
|
|
|
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.list_namespaced_secret_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1SecretList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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 list_namespaced_secret" % key
|
|
)
|
|
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 `list_namespaced_secret`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/secrets'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1SecretList',
|
|
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 list_namespaced_service(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Service
|
|
|
|
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.list_namespaced_service(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1ServiceList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_namespaced_service_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.list_namespaced_service_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def list_namespaced_service_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Service
|
|
|
|
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.list_namespaced_service_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1ServiceList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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 list_namespaced_service" % key
|
|
)
|
|
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 `list_namespaced_service`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceList',
|
|
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 list_namespaced_service_account(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ServiceAccount
|
|
|
|
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.list_namespaced_service_account(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1ServiceAccountList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_namespaced_service_account_with_http_info(namespace, **kwargs)
|
|
else:
|
|
(data) = self.list_namespaced_service_account_with_http_info(namespace, **kwargs)
|
|
return data
|
|
|
|
def list_namespaced_service_account_with_http_info(self, namespace, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ServiceAccount
|
|
|
|
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.list_namespaced_service_account_with_http_info(namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
: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.
|
|
: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: V1ServiceAccountList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['namespace', '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 list_namespaced_service_account" % key
|
|
)
|
|
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 `list_namespaced_service_account`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/serviceaccounts'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceAccountList',
|
|
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 list_node(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Node
|
|
|
|
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.list_node(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.
|
|
: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: V1NodeList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_node_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_node_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_node_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Node
|
|
|
|
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.list_node_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.
|
|
: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: V1NodeList
|
|
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 list_node" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes'.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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1NodeList',
|
|
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 list_persistent_volume(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind PersistentVolume
|
|
|
|
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.list_persistent_volume(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.
|
|
: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: V1PersistentVolumeList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_persistent_volume_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_persistent_volume_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_persistent_volume_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind PersistentVolume
|
|
|
|
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.list_persistent_volume_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.
|
|
: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: V1PersistentVolumeList
|
|
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 list_persistent_volume" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/persistentvolumes'.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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeList',
|
|
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 list_persistent_volume_claim_for_all_namespaces(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind PersistentVolumeClaim
|
|
|
|
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.list_persistent_volume_claim_for_all_namespaces(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1PersistentVolumeClaimList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_persistent_volume_claim_for_all_namespaces_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_persistent_volume_claim_for_all_namespaces_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_persistent_volume_claim_for_all_namespaces_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind PersistentVolumeClaim
|
|
|
|
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.list_persistent_volume_claim_for_all_namespaces_with_http_info(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1PersistentVolumeClaimList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['field_selector', 'label_selector', 'pretty', '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 list_persistent_volume_claim_for_all_namespaces" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/persistentvolumeclaims'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'field_selector' in params:
|
|
query_params['fieldSelector'] = params['field_selector']
|
|
if 'label_selector' in params:
|
|
query_params['labelSelector'] = params['label_selector']
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaimList',
|
|
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 list_pod_for_all_namespaces(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Pod
|
|
|
|
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.list_pod_for_all_namespaces(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1PodList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_pod_for_all_namespaces_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_pod_for_all_namespaces_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_pod_for_all_namespaces_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Pod
|
|
|
|
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.list_pod_for_all_namespaces_with_http_info(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1PodList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['field_selector', 'label_selector', 'pretty', '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 list_pod_for_all_namespaces" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/pods'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'field_selector' in params:
|
|
query_params['fieldSelector'] = params['field_selector']
|
|
if 'label_selector' in params:
|
|
query_params['labelSelector'] = params['label_selector']
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodList',
|
|
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 list_pod_template_for_all_namespaces(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind PodTemplate
|
|
|
|
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.list_pod_template_for_all_namespaces(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1PodTemplateList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_pod_template_for_all_namespaces_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_pod_template_for_all_namespaces_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_pod_template_for_all_namespaces_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind PodTemplate
|
|
|
|
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.list_pod_template_for_all_namespaces_with_http_info(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1PodTemplateList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['field_selector', 'label_selector', 'pretty', '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 list_pod_template_for_all_namespaces" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/podtemplates'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'field_selector' in params:
|
|
query_params['fieldSelector'] = params['field_selector']
|
|
if 'label_selector' in params:
|
|
query_params['labelSelector'] = params['label_selector']
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodTemplateList',
|
|
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 list_replication_controller_for_all_namespaces(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ReplicationController
|
|
|
|
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.list_replication_controller_for_all_namespaces(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1ReplicationControllerList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_replication_controller_for_all_namespaces_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_replication_controller_for_all_namespaces_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_replication_controller_for_all_namespaces_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ReplicationController
|
|
|
|
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.list_replication_controller_for_all_namespaces_with_http_info(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1ReplicationControllerList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['field_selector', 'label_selector', 'pretty', '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 list_replication_controller_for_all_namespaces" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/replicationcontrollers'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'field_selector' in params:
|
|
query_params['fieldSelector'] = params['field_selector']
|
|
if 'label_selector' in params:
|
|
query_params['labelSelector'] = params['label_selector']
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationControllerList',
|
|
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 list_resource_quota_for_all_namespaces(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ResourceQuota
|
|
|
|
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.list_resource_quota_for_all_namespaces(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1ResourceQuotaList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_resource_quota_for_all_namespaces_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_resource_quota_for_all_namespaces_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_resource_quota_for_all_namespaces_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ResourceQuota
|
|
|
|
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.list_resource_quota_for_all_namespaces_with_http_info(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1ResourceQuotaList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['field_selector', 'label_selector', 'pretty', '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 list_resource_quota_for_all_namespaces" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/resourcequotas'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'field_selector' in params:
|
|
query_params['fieldSelector'] = params['field_selector']
|
|
if 'label_selector' in params:
|
|
query_params['labelSelector'] = params['label_selector']
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuotaList',
|
|
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 list_secret_for_all_namespaces(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Secret
|
|
|
|
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.list_secret_for_all_namespaces(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1SecretList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_secret_for_all_namespaces_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_secret_for_all_namespaces_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_secret_for_all_namespaces_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Secret
|
|
|
|
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.list_secret_for_all_namespaces_with_http_info(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1SecretList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['field_selector', 'label_selector', 'pretty', '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 list_secret_for_all_namespaces" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/secrets'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'field_selector' in params:
|
|
query_params['fieldSelector'] = params['field_selector']
|
|
if 'label_selector' in params:
|
|
query_params['labelSelector'] = params['label_selector']
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1SecretList',
|
|
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 list_service_account_for_all_namespaces(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ServiceAccount
|
|
|
|
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.list_service_account_for_all_namespaces(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1ServiceAccountList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_service_account_for_all_namespaces_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_service_account_for_all_namespaces_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_service_account_for_all_namespaces_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind ServiceAccount
|
|
|
|
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.list_service_account_for_all_namespaces_with_http_info(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1ServiceAccountList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['field_selector', 'label_selector', 'pretty', '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 list_service_account_for_all_namespaces" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/serviceaccounts'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'field_selector' in params:
|
|
query_params['fieldSelector'] = params['field_selector']
|
|
if 'label_selector' in params:
|
|
query_params['labelSelector'] = params['label_selector']
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceAccountList',
|
|
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 list_service_for_all_namespaces(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Service
|
|
|
|
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.list_service_for_all_namespaces(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1ServiceList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.list_service_for_all_namespaces_with_http_info(**kwargs)
|
|
else:
|
|
(data) = self.list_service_for_all_namespaces_with_http_info(**kwargs)
|
|
return data
|
|
|
|
def list_service_for_all_namespaces_with_http_info(self, **kwargs):
|
|
"""
|
|
|
|
list or watch objects of kind Service
|
|
|
|
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.list_service_for_all_namespaces_with_http_info(callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
: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 pretty: If 'true', then the output is pretty printed.
|
|
: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.
|
|
: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: V1ServiceList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['field_selector', 'label_selector', 'pretty', '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 list_service_for_all_namespaces" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/services'.replace('{format}', 'json')
|
|
path_params = {}
|
|
|
|
query_params = {}
|
|
if 'field_selector' in params:
|
|
query_params['fieldSelector'] = params['field_selector']
|
|
if 'label_selector' in params:
|
|
query_params['labelSelector'] = params['label_selector']
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
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', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceList',
|
|
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 patch_namespace(self, name, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified 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.patch_namespace(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Namespace (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespace_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespace_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespace_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified 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.patch_namespace_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Namespace (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty']
|
|
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 patch_namespace" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespace`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespace`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace',
|
|
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 patch_namespace_status(self, name, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified 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.patch_namespace_status(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Namespace (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespace_status_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespace_status_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespace_status_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified 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.patch_namespace_status_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Namespace (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty']
|
|
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 patch_namespace_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespace_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespace_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace',
|
|
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 patch_namespaced_config_map(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified ConfigMap
|
|
|
|
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.patch_namespaced_config_map(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ConfigMap (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ConfigMap
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_config_map_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_config_map_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_config_map_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified ConfigMap
|
|
|
|
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.patch_namespaced_config_map_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ConfigMap (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ConfigMap
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_config_map" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_config_map`")
|
|
# 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 `patch_namespaced_config_map`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_config_map`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/configmaps/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ConfigMap',
|
|
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 patch_namespaced_endpoints(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified Endpoints
|
|
|
|
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.patch_namespaced_endpoints(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Endpoints (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Endpoints
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_endpoints_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_endpoints_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_endpoints_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified Endpoints
|
|
|
|
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.patch_namespaced_endpoints_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Endpoints (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Endpoints
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_endpoints" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_endpoints`")
|
|
# 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 `patch_namespaced_endpoints`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_endpoints`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/endpoints/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Endpoints',
|
|
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 patch_namespaced_event(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified Event
|
|
|
|
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.patch_namespaced_event(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Event (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Event
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_event_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_event_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified Event
|
|
|
|
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.patch_namespaced_event_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Event (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Event
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_event" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_event`")
|
|
# 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 `patch_namespaced_event`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_event`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/events/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Event',
|
|
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 patch_namespaced_limit_range(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified LimitRange
|
|
|
|
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.patch_namespaced_limit_range(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the LimitRange (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1LimitRange
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_limit_range_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_limit_range_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_limit_range_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified LimitRange
|
|
|
|
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.patch_namespaced_limit_range_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the LimitRange (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1LimitRange
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_limit_range" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_limit_range`")
|
|
# 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 `patch_namespaced_limit_range`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_limit_range`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/limitranges/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1LimitRange',
|
|
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 patch_namespaced_persistent_volume_claim(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified PersistentVolumeClaim
|
|
|
|
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.patch_namespaced_persistent_volume_claim(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_persistent_volume_claim_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified PersistentVolumeClaim
|
|
|
|
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.patch_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_persistent_volume_claim" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_persistent_volume_claim`")
|
|
# 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 `patch_namespaced_persistent_volume_claim`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_persistent_volume_claim`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim',
|
|
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 patch_namespaced_persistent_volume_claim_status(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified PersistentVolumeClaim
|
|
|
|
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.patch_namespaced_persistent_volume_claim_status(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_persistent_volume_claim_status_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified PersistentVolumeClaim
|
|
|
|
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.patch_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_persistent_volume_claim_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_persistent_volume_claim_status`")
|
|
# 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 `patch_namespaced_persistent_volume_claim_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_persistent_volume_claim_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim',
|
|
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 patch_namespaced_pod(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified Pod
|
|
|
|
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.patch_namespaced_pod(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_pod_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_pod_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified Pod
|
|
|
|
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.patch_namespaced_pod_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_pod" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_pod`")
|
|
# 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 `patch_namespaced_pod`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_pod`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod',
|
|
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 patch_namespaced_pod_status(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified Pod
|
|
|
|
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.patch_namespaced_pod_status(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_pod_status_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_pod_status_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_pod_status_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified Pod
|
|
|
|
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.patch_namespaced_pod_status_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_pod_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_pod_status`")
|
|
# 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 `patch_namespaced_pod_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod',
|
|
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 patch_namespaced_pod_template(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified PodTemplate
|
|
|
|
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.patch_namespaced_pod_template(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PodTemplate (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PodTemplate
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_pod_template_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_pod_template_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_pod_template_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified PodTemplate
|
|
|
|
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.patch_namespaced_pod_template_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PodTemplate (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PodTemplate
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_pod_template" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_pod_template`")
|
|
# 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 `patch_namespaced_pod_template`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_template`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/podtemplates/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodTemplate',
|
|
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 patch_namespaced_replication_controller(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified ReplicationController
|
|
|
|
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.patch_namespaced_replication_controller(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_replication_controller_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_replication_controller_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_replication_controller_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified ReplicationController
|
|
|
|
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.patch_namespaced_replication_controller_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_replication_controller" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_replication_controller`")
|
|
# 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 `patch_namespaced_replication_controller`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_replication_controller`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationController',
|
|
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 patch_namespaced_replication_controller_status(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified ReplicationController
|
|
|
|
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.patch_namespaced_replication_controller_status(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_replication_controller_status_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_replication_controller_status_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_replication_controller_status_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified ReplicationController
|
|
|
|
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.patch_namespaced_replication_controller_status_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_replication_controller_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_replication_controller_status`")
|
|
# 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 `patch_namespaced_replication_controller_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_replication_controller_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationController',
|
|
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 patch_namespaced_resource_quota(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified ResourceQuota
|
|
|
|
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.patch_namespaced_resource_quota(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_resource_quota_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_resource_quota_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_resource_quota_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified ResourceQuota
|
|
|
|
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.patch_namespaced_resource_quota_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_resource_quota" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_resource_quota`")
|
|
# 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 `patch_namespaced_resource_quota`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_quota`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/resourcequotas/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota',
|
|
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 patch_namespaced_resource_quota_status(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified ResourceQuota
|
|
|
|
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.patch_namespaced_resource_quota_status(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_resource_quota_status_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_resource_quota_status_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_resource_quota_status_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified ResourceQuota
|
|
|
|
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.patch_namespaced_resource_quota_status_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_resource_quota_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_resource_quota_status`")
|
|
# 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 `patch_namespaced_resource_quota_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_quota_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota',
|
|
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 patch_namespaced_scale_scale(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update scale of the specified Scale
|
|
|
|
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.patch_namespaced_scale_scale(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Scale (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Scale
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_scale_scale_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_scale_scale_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_scale_scale_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update scale of the specified Scale
|
|
|
|
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.patch_namespaced_scale_scale_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Scale (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Scale
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_scale_scale" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_scale_scale`")
|
|
# 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 `patch_namespaced_scale_scale`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_scale_scale`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Scale',
|
|
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 patch_namespaced_secret(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified Secret
|
|
|
|
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.patch_namespaced_secret(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Secret (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Secret
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_secret_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_secret_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_secret_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified Secret
|
|
|
|
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.patch_namespaced_secret_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Secret (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Secret
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_secret" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_secret`")
|
|
# 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 `patch_namespaced_secret`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_secret`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/secrets/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Secret',
|
|
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 patch_namespaced_service(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified Service
|
|
|
|
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.patch_namespaced_service(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_service_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_service_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_service_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified Service
|
|
|
|
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.patch_namespaced_service_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_service" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_service`")
|
|
# 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 `patch_namespaced_service`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_service`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service',
|
|
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 patch_namespaced_service_account(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified ServiceAccount
|
|
|
|
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.patch_namespaced_service_account(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ServiceAccount (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ServiceAccount
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_service_account_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_service_account_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_service_account_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified ServiceAccount
|
|
|
|
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.patch_namespaced_service_account_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ServiceAccount (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ServiceAccount
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_service_account" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_service_account`")
|
|
# 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 `patch_namespaced_service_account`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_service_account`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceAccount',
|
|
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 patch_namespaced_service_status(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified Service
|
|
|
|
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.patch_namespaced_service_status(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_namespaced_service_status_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_namespaced_service_status_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def patch_namespaced_service_status_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified Service
|
|
|
|
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.patch_namespaced_service_status_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 patch_namespaced_service_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_namespaced_service_status`")
|
|
# 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 `patch_namespaced_service_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_service_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service',
|
|
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 patch_node(self, name, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified Node
|
|
|
|
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.patch_node(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_node_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_node_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def patch_node_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified Node
|
|
|
|
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.patch_node_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty']
|
|
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 patch_node" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_node`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_node`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Node',
|
|
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 patch_node_status(self, name, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified Node
|
|
|
|
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.patch_node_status(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_node_status_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_node_status_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def patch_node_status_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified Node
|
|
|
|
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.patch_node_status_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty']
|
|
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 patch_node_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_node_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_node_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Node',
|
|
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 patch_persistent_volume(self, name, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified PersistentVolume
|
|
|
|
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.patch_persistent_volume(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_persistent_volume_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_persistent_volume_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def patch_persistent_volume_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
partially update the specified PersistentVolume
|
|
|
|
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.patch_persistent_volume_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty']
|
|
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 patch_persistent_volume" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_persistent_volume`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_persistent_volume`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/persistentvolumes/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume',
|
|
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 patch_persistent_volume_status(self, name, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified PersistentVolume
|
|
|
|
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.patch_persistent_volume_status(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.patch_persistent_volume_status_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.patch_persistent_volume_status_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def patch_persistent_volume_status_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
partially update status of the specified PersistentVolume
|
|
|
|
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.patch_persistent_volume_status_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param UnversionedPatch body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty']
|
|
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 patch_persistent_volume_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `patch_persistent_volume_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `patch_persistent_volume_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/persistentvolumes/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.\
|
|
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken']
|
|
|
|
return self.api_client.call_api(resource_path, 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume',
|
|
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 proxy_delete_namespaced_pod(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy DELETE requests to Pod
|
|
|
|
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.proxy_delete_namespaced_pod(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_delete_namespaced_pod_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.proxy_delete_namespaced_pod_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def proxy_delete_namespaced_pod_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy DELETE requests to Pod
|
|
|
|
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.proxy_delete_namespaced_pod_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace']
|
|
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 proxy_delete_namespaced_pod" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_delete_namespaced_pod`")
|
|
# 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 `proxy_delete_namespaced_pod`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='str',
|
|
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 proxy_delete_namespaced_pod_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy DELETE requests to Pod
|
|
|
|
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.proxy_delete_namespaced_pod_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_delete_namespaced_pod_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_delete_namespaced_pod_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_delete_namespaced_pod_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy DELETE requests to Pod
|
|
|
|
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.proxy_delete_namespaced_pod_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 proxy_delete_namespaced_pod_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_delete_namespaced_pod_with_path`")
|
|
# 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 `proxy_delete_namespaced_pod_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_delete_namespaced_pod_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='str',
|
|
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 proxy_delete_namespaced_service(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy DELETE requests to Service
|
|
|
|
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.proxy_delete_namespaced_service(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_delete_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.proxy_delete_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def proxy_delete_namespaced_service_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy DELETE requests to Service
|
|
|
|
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.proxy_delete_namespaced_service_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace']
|
|
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 proxy_delete_namespaced_service" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_delete_namespaced_service`")
|
|
# 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 `proxy_delete_namespaced_service`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='str',
|
|
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 proxy_delete_namespaced_service_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy DELETE requests to Service
|
|
|
|
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.proxy_delete_namespaced_service_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_delete_namespaced_service_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_delete_namespaced_service_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_delete_namespaced_service_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy DELETE requests to Service
|
|
|
|
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.proxy_delete_namespaced_service_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 proxy_delete_namespaced_service_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_delete_namespaced_service_with_path`")
|
|
# 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 `proxy_delete_namespaced_service_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_delete_namespaced_service_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='str',
|
|
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 proxy_delete_node(self, name, **kwargs):
|
|
"""
|
|
|
|
proxy DELETE requests to Node
|
|
|
|
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.proxy_delete_node(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_delete_node_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.proxy_delete_node_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def proxy_delete_node_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
proxy DELETE requests to Node
|
|
|
|
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.proxy_delete_node_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name']
|
|
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 proxy_delete_node" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_delete_node`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/nodes/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='str',
|
|
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 proxy_delete_node_with_path(self, name, path, **kwargs):
|
|
"""
|
|
|
|
proxy DELETE requests to Node
|
|
|
|
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.proxy_delete_node_with_path(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_delete_node_with_path_with_http_info(name, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_delete_node_with_path_with_http_info(name, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_delete_node_with_path_with_http_info(self, name, path, **kwargs):
|
|
"""
|
|
|
|
proxy DELETE requests to Node
|
|
|
|
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.proxy_delete_node_with_path_with_http_info(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path']
|
|
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 proxy_delete_node_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_delete_node_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_delete_node_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/nodes/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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='str',
|
|
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 proxy_get_namespaced_pod(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy GET requests to Pod
|
|
|
|
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.proxy_get_namespaced_pod(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_get_namespaced_pod_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.proxy_get_namespaced_pod_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def proxy_get_namespaced_pod_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy GET requests to Pod
|
|
|
|
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.proxy_get_namespaced_pod_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace']
|
|
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 proxy_get_namespaced_pod" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_get_namespaced_pod`")
|
|
# 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 `proxy_get_namespaced_pod`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_get_namespaced_pod_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy GET requests to Pod
|
|
|
|
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.proxy_get_namespaced_pod_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_get_namespaced_pod_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_get_namespaced_pod_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_get_namespaced_pod_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy GET requests to Pod
|
|
|
|
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.proxy_get_namespaced_pod_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 proxy_get_namespaced_pod_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_get_namespaced_pod_with_path`")
|
|
# 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 `proxy_get_namespaced_pod_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_get_namespaced_pod_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_get_namespaced_service(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy GET requests to Service
|
|
|
|
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.proxy_get_namespaced_service(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_get_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.proxy_get_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def proxy_get_namespaced_service_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy GET requests to Service
|
|
|
|
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.proxy_get_namespaced_service_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace']
|
|
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 proxy_get_namespaced_service" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_get_namespaced_service`")
|
|
# 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 `proxy_get_namespaced_service`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_get_namespaced_service_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy GET requests to Service
|
|
|
|
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.proxy_get_namespaced_service_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_get_namespaced_service_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_get_namespaced_service_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_get_namespaced_service_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy GET requests to Service
|
|
|
|
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.proxy_get_namespaced_service_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 proxy_get_namespaced_service_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_get_namespaced_service_with_path`")
|
|
# 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 `proxy_get_namespaced_service_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_get_namespaced_service_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_get_node(self, name, **kwargs):
|
|
"""
|
|
|
|
proxy GET requests to Node
|
|
|
|
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.proxy_get_node(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_get_node_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.proxy_get_node_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def proxy_get_node_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
proxy GET requests to Node
|
|
|
|
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.proxy_get_node_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name']
|
|
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 proxy_get_node" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_get_node`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/nodes/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_get_node_with_path(self, name, path, **kwargs):
|
|
"""
|
|
|
|
proxy GET requests to Node
|
|
|
|
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.proxy_get_node_with_path(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_get_node_with_path_with_http_info(name, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_get_node_with_path_with_http_info(name, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_get_node_with_path_with_http_info(self, name, path, **kwargs):
|
|
"""
|
|
|
|
proxy GET requests to Node
|
|
|
|
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.proxy_get_node_with_path_with_http_info(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path']
|
|
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 proxy_get_node_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_get_node_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_get_node_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/nodes/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_head_namespaced_pod(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy HEAD requests to Pod
|
|
|
|
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.proxy_head_namespaced_pod(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_head_namespaced_pod_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.proxy_head_namespaced_pod_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def proxy_head_namespaced_pod_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy HEAD requests to Pod
|
|
|
|
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.proxy_head_namespaced_pod_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace']
|
|
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 proxy_head_namespaced_pod" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_head_namespaced_pod`")
|
|
# 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 `proxy_head_namespaced_pod`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_head_namespaced_pod_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy HEAD requests to Pod
|
|
|
|
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.proxy_head_namespaced_pod_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_head_namespaced_pod_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_head_namespaced_pod_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_head_namespaced_pod_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy HEAD requests to Pod
|
|
|
|
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.proxy_head_namespaced_pod_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 proxy_head_namespaced_pod_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_head_namespaced_pod_with_path`")
|
|
# 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 `proxy_head_namespaced_pod_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_head_namespaced_pod_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_head_namespaced_service(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy HEAD requests to Service
|
|
|
|
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.proxy_head_namespaced_service(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_head_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.proxy_head_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def proxy_head_namespaced_service_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy HEAD requests to Service
|
|
|
|
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.proxy_head_namespaced_service_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace']
|
|
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 proxy_head_namespaced_service" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_head_namespaced_service`")
|
|
# 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 `proxy_head_namespaced_service`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_head_namespaced_service_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy HEAD requests to Service
|
|
|
|
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.proxy_head_namespaced_service_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_head_namespaced_service_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_head_namespaced_service_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_head_namespaced_service_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy HEAD requests to Service
|
|
|
|
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.proxy_head_namespaced_service_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 proxy_head_namespaced_service_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_head_namespaced_service_with_path`")
|
|
# 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 `proxy_head_namespaced_service_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_head_namespaced_service_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_head_node(self, name, **kwargs):
|
|
"""
|
|
|
|
proxy HEAD requests to Node
|
|
|
|
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.proxy_head_node(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_head_node_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.proxy_head_node_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def proxy_head_node_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
proxy HEAD requests to Node
|
|
|
|
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.proxy_head_node_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name']
|
|
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 proxy_head_node" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_head_node`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/nodes/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_head_node_with_path(self, name, path, **kwargs):
|
|
"""
|
|
|
|
proxy HEAD requests to Node
|
|
|
|
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.proxy_head_node_with_path(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_head_node_with_path_with_http_info(name, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_head_node_with_path_with_http_info(name, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_head_node_with_path_with_http_info(self, name, path, **kwargs):
|
|
"""
|
|
|
|
proxy HEAD requests to Node
|
|
|
|
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.proxy_head_node_with_path_with_http_info(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path']
|
|
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 proxy_head_node_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_head_node_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_head_node_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/nodes/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_options_namespaced_pod(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy OPTIONS requests to Pod
|
|
|
|
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.proxy_options_namespaced_pod(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_options_namespaced_pod_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.proxy_options_namespaced_pod_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def proxy_options_namespaced_pod_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy OPTIONS requests to Pod
|
|
|
|
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.proxy_options_namespaced_pod_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace']
|
|
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 proxy_options_namespaced_pod" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_options_namespaced_pod`")
|
|
# 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 `proxy_options_namespaced_pod`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_options_namespaced_pod_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy OPTIONS requests to Pod
|
|
|
|
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.proxy_options_namespaced_pod_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_options_namespaced_pod_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_options_namespaced_pod_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_options_namespaced_pod_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy OPTIONS requests to Pod
|
|
|
|
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.proxy_options_namespaced_pod_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 proxy_options_namespaced_pod_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_options_namespaced_pod_with_path`")
|
|
# 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 `proxy_options_namespaced_pod_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_options_namespaced_pod_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_options_namespaced_service(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy OPTIONS requests to Service
|
|
|
|
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.proxy_options_namespaced_service(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_options_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.proxy_options_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def proxy_options_namespaced_service_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy OPTIONS requests to Service
|
|
|
|
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.proxy_options_namespaced_service_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace']
|
|
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 proxy_options_namespaced_service" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_options_namespaced_service`")
|
|
# 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 `proxy_options_namespaced_service`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_options_namespaced_service_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy OPTIONS requests to Service
|
|
|
|
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.proxy_options_namespaced_service_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_options_namespaced_service_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_options_namespaced_service_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_options_namespaced_service_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy OPTIONS requests to Service
|
|
|
|
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.proxy_options_namespaced_service_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 proxy_options_namespaced_service_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_options_namespaced_service_with_path`")
|
|
# 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 `proxy_options_namespaced_service_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_options_namespaced_service_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_options_node(self, name, **kwargs):
|
|
"""
|
|
|
|
proxy OPTIONS requests to Node
|
|
|
|
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.proxy_options_node(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_options_node_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.proxy_options_node_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def proxy_options_node_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
proxy OPTIONS requests to Node
|
|
|
|
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.proxy_options_node_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name']
|
|
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 proxy_options_node" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_options_node`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/nodes/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_options_node_with_path(self, name, path, **kwargs):
|
|
"""
|
|
|
|
proxy OPTIONS requests to Node
|
|
|
|
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.proxy_options_node_with_path(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_options_node_with_path_with_http_info(name, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_options_node_with_path_with_http_info(name, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_options_node_with_path_with_http_info(self, name, path, **kwargs):
|
|
"""
|
|
|
|
proxy OPTIONS requests to Node
|
|
|
|
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.proxy_options_node_with_path_with_http_info(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path']
|
|
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 proxy_options_node_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_options_node_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_options_node_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/nodes/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_post_namespaced_pod(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy POST requests to Pod
|
|
|
|
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.proxy_post_namespaced_pod(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_post_namespaced_pod_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.proxy_post_namespaced_pod_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def proxy_post_namespaced_pod_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy POST requests to Pod
|
|
|
|
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.proxy_post_namespaced_pod_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace']
|
|
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 proxy_post_namespaced_pod" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_post_namespaced_pod`")
|
|
# 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 `proxy_post_namespaced_pod`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_post_namespaced_pod_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy POST requests to Pod
|
|
|
|
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.proxy_post_namespaced_pod_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_post_namespaced_pod_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_post_namespaced_pod_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_post_namespaced_pod_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy POST requests to Pod
|
|
|
|
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.proxy_post_namespaced_pod_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 proxy_post_namespaced_pod_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_post_namespaced_pod_with_path`")
|
|
# 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 `proxy_post_namespaced_pod_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_post_namespaced_pod_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_post_namespaced_service(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy POST requests to Service
|
|
|
|
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.proxy_post_namespaced_service(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_post_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.proxy_post_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def proxy_post_namespaced_service_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy POST requests to Service
|
|
|
|
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.proxy_post_namespaced_service_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace']
|
|
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 proxy_post_namespaced_service" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_post_namespaced_service`")
|
|
# 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 `proxy_post_namespaced_service`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_post_namespaced_service_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy POST requests to Service
|
|
|
|
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.proxy_post_namespaced_service_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_post_namespaced_service_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_post_namespaced_service_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_post_namespaced_service_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy POST requests to Service
|
|
|
|
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.proxy_post_namespaced_service_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 proxy_post_namespaced_service_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_post_namespaced_service_with_path`")
|
|
# 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 `proxy_post_namespaced_service_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_post_namespaced_service_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_post_node(self, name, **kwargs):
|
|
"""
|
|
|
|
proxy POST requests to Node
|
|
|
|
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.proxy_post_node(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_post_node_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.proxy_post_node_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def proxy_post_node_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
proxy POST requests to Node
|
|
|
|
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.proxy_post_node_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name']
|
|
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 proxy_post_node" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_post_node`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/nodes/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_post_node_with_path(self, name, path, **kwargs):
|
|
"""
|
|
|
|
proxy POST requests to Node
|
|
|
|
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.proxy_post_node_with_path(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_post_node_with_path_with_http_info(name, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_post_node_with_path_with_http_info(name, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_post_node_with_path_with_http_info(self, name, path, **kwargs):
|
|
"""
|
|
|
|
proxy POST requests to Node
|
|
|
|
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.proxy_post_node_with_path_with_http_info(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path']
|
|
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 proxy_post_node_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_post_node_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_post_node_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/nodes/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_put_namespaced_pod(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy PUT requests to Pod
|
|
|
|
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.proxy_put_namespaced_pod(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_put_namespaced_pod_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.proxy_put_namespaced_pod_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def proxy_put_namespaced_pod_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy PUT requests to Pod
|
|
|
|
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.proxy_put_namespaced_pod_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace']
|
|
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 proxy_put_namespaced_pod" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_put_namespaced_pod`")
|
|
# 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 `proxy_put_namespaced_pod`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_put_namespaced_pod_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy PUT requests to Pod
|
|
|
|
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.proxy_put_namespaced_pod_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_put_namespaced_pod_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_put_namespaced_pod_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_put_namespaced_pod_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy PUT requests to Pod
|
|
|
|
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.proxy_put_namespaced_pod_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 proxy_put_namespaced_pod_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_put_namespaced_pod_with_path`")
|
|
# 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 `proxy_put_namespaced_pod_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_put_namespaced_pod_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_put_namespaced_service(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy PUT requests to Service
|
|
|
|
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.proxy_put_namespaced_service(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_put_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.proxy_put_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def proxy_put_namespaced_service_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
proxy PUT requests to Service
|
|
|
|
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.proxy_put_namespaced_service_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace']
|
|
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 proxy_put_namespaced_service" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_put_namespaced_service`")
|
|
# 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 `proxy_put_namespaced_service`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_put_namespaced_service_with_path(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy PUT requests to Service
|
|
|
|
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.proxy_put_namespaced_service_with_path(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_put_namespaced_service_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_put_namespaced_service_with_path_with_http_info(name, namespace, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_put_namespaced_service_with_path_with_http_info(self, name, namespace, path, **kwargs):
|
|
"""
|
|
|
|
proxy PUT requests to Service
|
|
|
|
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.proxy_put_namespaced_service_with_path_with_http_info(name, namespace, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'path']
|
|
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 proxy_put_namespaced_service_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_put_namespaced_service_with_path`")
|
|
# 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 `proxy_put_namespaced_service_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_put_namespaced_service_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_put_node(self, name, **kwargs):
|
|
"""
|
|
|
|
proxy PUT requests to Node
|
|
|
|
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.proxy_put_node(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_put_node_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.proxy_put_node_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def proxy_put_node_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
proxy PUT requests to Node
|
|
|
|
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.proxy_put_node_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name']
|
|
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 proxy_put_node" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_put_node`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/nodes/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 proxy_put_node_with_path(self, name, path, **kwargs):
|
|
"""
|
|
|
|
proxy PUT requests to Node
|
|
|
|
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.proxy_put_node_with_path(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.proxy_put_node_with_path_with_http_info(name, path, **kwargs)
|
|
else:
|
|
(data) = self.proxy_put_node_with_path_with_http_info(name, path, **kwargs)
|
|
return data
|
|
|
|
def proxy_put_node_with_path_with_http_info(self, name, path, **kwargs):
|
|
"""
|
|
|
|
proxy PUT requests to Node
|
|
|
|
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.proxy_put_node_with_path_with_http_info(name, path, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str path: path to the resource (required)
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'path']
|
|
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 proxy_put_node_with_path" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `proxy_put_node_with_path`")
|
|
# verify the required parameter 'path' is set
|
|
if ('path' not in params) or (params['path'] is None):
|
|
raise ValueError("Missing the required parameter `path` when calling `proxy_put_node_with_path`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/proxy/nodes/{name}/{path}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'path' in params:
|
|
path_params['path'] = params['path']
|
|
|
|
query_params = {}
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['*/*'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str',
|
|
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 read_component_status(self, name, **kwargs):
|
|
"""
|
|
|
|
read the specified ComponentStatus
|
|
|
|
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.read_component_status(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ComponentStatus (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ComponentStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_component_status_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.read_component_status_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def read_component_status_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
read the specified ComponentStatus
|
|
|
|
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.read_component_status_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ComponentStatus (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ComponentStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'pretty']
|
|
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 read_component_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_component_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/componentstatuses/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ComponentStatus',
|
|
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 read_namespace(self, name, **kwargs):
|
|
"""
|
|
|
|
read the specified 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.read_namespace(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Namespace (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespace_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.read_namespace_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def read_namespace_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
read the specified 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.read_namespace_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Namespace (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'pretty', 'exact', 'export']
|
|
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 read_namespace" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespace`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace',
|
|
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 read_namespace_status(self, name, **kwargs):
|
|
"""
|
|
|
|
read status of the specified 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.read_namespace_status(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Namespace (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespace_status_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.read_namespace_status_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def read_namespace_status_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
read status of the specified 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.read_namespace_status_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Namespace (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'pretty']
|
|
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 read_namespace_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespace_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace',
|
|
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 read_namespaced_config_map(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified ConfigMap
|
|
|
|
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.read_namespaced_config_map(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ConfigMap (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1ConfigMap
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_config_map_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_config_map_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_config_map_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified ConfigMap
|
|
|
|
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.read_namespaced_config_map_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ConfigMap (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1ConfigMap
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
|
|
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 read_namespaced_config_map" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_config_map`")
|
|
# 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 `read_namespaced_config_map`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/configmaps/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ConfigMap',
|
|
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 read_namespaced_endpoints(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified Endpoints
|
|
|
|
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.read_namespaced_endpoints(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Endpoints (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1Endpoints
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_endpoints_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_endpoints_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified Endpoints
|
|
|
|
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.read_namespaced_endpoints_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Endpoints (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1Endpoints
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
|
|
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 read_namespaced_endpoints" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_endpoints`")
|
|
# 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 `read_namespaced_endpoints`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/endpoints/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Endpoints',
|
|
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 read_namespaced_event(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified Event
|
|
|
|
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.read_namespaced_event(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Event (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1Event
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_event_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_event_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_event_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified Event
|
|
|
|
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.read_namespaced_event_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Event (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1Event
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
|
|
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 read_namespaced_event" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_event`")
|
|
# 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 `read_namespaced_event`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/events/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Event',
|
|
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 read_namespaced_limit_range(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified LimitRange
|
|
|
|
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.read_namespaced_limit_range(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the LimitRange (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1LimitRange
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_limit_range_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_limit_range_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified LimitRange
|
|
|
|
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.read_namespaced_limit_range_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the LimitRange (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1LimitRange
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
|
|
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 read_namespaced_limit_range" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_limit_range`")
|
|
# 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 `read_namespaced_limit_range`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/limitranges/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1LimitRange',
|
|
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 read_namespaced_persistent_volume_claim(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified PersistentVolumeClaim
|
|
|
|
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.read_namespaced_persistent_volume_claim(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_persistent_volume_claim_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_persistent_volume_claim_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_persistent_volume_claim_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified PersistentVolumeClaim
|
|
|
|
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.read_namespaced_persistent_volume_claim_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
|
|
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 read_namespaced_persistent_volume_claim" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_persistent_volume_claim`")
|
|
# 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 `read_namespaced_persistent_volume_claim`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim',
|
|
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 read_namespaced_persistent_volume_claim_status(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read status of the specified PersistentVolumeClaim
|
|
|
|
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.read_namespaced_persistent_volume_claim_status(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_persistent_volume_claim_status_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read status of the specified PersistentVolumeClaim
|
|
|
|
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.read_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty']
|
|
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 read_namespaced_persistent_volume_claim_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_persistent_volume_claim_status`")
|
|
# 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 `read_namespaced_persistent_volume_claim_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim',
|
|
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 read_namespaced_pod(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified Pod
|
|
|
|
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.read_namespaced_pod(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_pod_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_pod_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_pod_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified Pod
|
|
|
|
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.read_namespaced_pod_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
|
|
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 read_namespaced_pod" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_pod`")
|
|
# 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 `read_namespaced_pod`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod',
|
|
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 read_namespaced_pod_log(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read log of the specified Pod
|
|
|
|
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.read_namespaced_pod_log(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str container: The container for which to stream logs. Defaults to only container if there is one container in the pod.
|
|
:param bool follow: Follow the log stream of the pod. Defaults to false.
|
|
:param int limit_bytes: If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool previous: Return previous terminated container logs. Defaults to false.
|
|
:param int since_seconds: A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.
|
|
:param str since_time: An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.
|
|
:param int tail_lines: If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime
|
|
:param bool timestamps: If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_pod_log_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_pod_log_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_pod_log_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read log of the specified Pod
|
|
|
|
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.read_namespaced_pod_log_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str container: The container for which to stream logs. Defaults to only container if there is one container in the pod.
|
|
:param bool follow: Follow the log stream of the pod. Defaults to false.
|
|
:param int limit_bytes: If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool previous: Return previous terminated container logs. Defaults to false.
|
|
:param int since_seconds: A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.
|
|
:param str since_time: An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.
|
|
:param int tail_lines: If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime
|
|
:param bool timestamps: If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'container', 'follow', 'limit_bytes', 'pretty', 'previous', 'since_seconds', 'since_time', 'tail_lines', 'timestamps']
|
|
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 read_namespaced_pod_log" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_pod_log`")
|
|
# 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 `read_namespaced_pod_log`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/log'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'container' in params:
|
|
query_params['container'] = params['container']
|
|
if 'follow' in params:
|
|
query_params['follow'] = params['follow']
|
|
if 'limit_bytes' in params:
|
|
query_params['limitBytes'] = params['limit_bytes']
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'previous' in params:
|
|
query_params['previous'] = params['previous']
|
|
if 'since_seconds' in params:
|
|
query_params['sinceSeconds'] = params['since_seconds']
|
|
if 'since_time' in params:
|
|
query_params['sinceTime'] = params['since_time']
|
|
if 'tail_lines' in params:
|
|
query_params['tailLines'] = params['tail_lines']
|
|
if 'timestamps' in params:
|
|
query_params['timestamps'] = params['timestamps']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['text/plain', 'application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod',
|
|
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 read_namespaced_pod_status(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read status of the specified Pod
|
|
|
|
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.read_namespaced_pod_status(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_pod_status_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_pod_status_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_pod_status_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read status of the specified Pod
|
|
|
|
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.read_namespaced_pod_status_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty']
|
|
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 read_namespaced_pod_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_pod_status`")
|
|
# 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 `read_namespaced_pod_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod',
|
|
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 read_namespaced_pod_template(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified PodTemplate
|
|
|
|
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.read_namespaced_pod_template(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PodTemplate (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1PodTemplate
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_pod_template_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_pod_template_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_pod_template_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified PodTemplate
|
|
|
|
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.read_namespaced_pod_template_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PodTemplate (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1PodTemplate
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
|
|
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 read_namespaced_pod_template" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_pod_template`")
|
|
# 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 `read_namespaced_pod_template`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/podtemplates/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodTemplate',
|
|
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 read_namespaced_replication_controller(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified ReplicationController
|
|
|
|
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.read_namespaced_replication_controller(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_replication_controller_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_replication_controller_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_replication_controller_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified ReplicationController
|
|
|
|
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.read_namespaced_replication_controller_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
|
|
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 read_namespaced_replication_controller" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_replication_controller`")
|
|
# 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 `read_namespaced_replication_controller`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationController',
|
|
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 read_namespaced_replication_controller_status(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read status of the specified ReplicationController
|
|
|
|
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.read_namespaced_replication_controller_status(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_replication_controller_status_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_replication_controller_status_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_replication_controller_status_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read status of the specified ReplicationController
|
|
|
|
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.read_namespaced_replication_controller_status_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty']
|
|
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 read_namespaced_replication_controller_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_replication_controller_status`")
|
|
# 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 `read_namespaced_replication_controller_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationController',
|
|
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 read_namespaced_resource_quota(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified ResourceQuota
|
|
|
|
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.read_namespaced_resource_quota(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_resource_quota_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_resource_quota_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_resource_quota_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified ResourceQuota
|
|
|
|
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.read_namespaced_resource_quota_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
|
|
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 read_namespaced_resource_quota" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_resource_quota`")
|
|
# 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 `read_namespaced_resource_quota`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/resourcequotas/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota',
|
|
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 read_namespaced_resource_quota_status(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read status of the specified ResourceQuota
|
|
|
|
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.read_namespaced_resource_quota_status(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_resource_quota_status_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_resource_quota_status_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_resource_quota_status_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read status of the specified ResourceQuota
|
|
|
|
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.read_namespaced_resource_quota_status_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty']
|
|
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 read_namespaced_resource_quota_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_resource_quota_status`")
|
|
# 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 `read_namespaced_resource_quota_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota',
|
|
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 read_namespaced_scale_scale(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read scale of the specified Scale
|
|
|
|
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.read_namespaced_scale_scale(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Scale (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Scale
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_scale_scale_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_scale_scale_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_scale_scale_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read scale of the specified Scale
|
|
|
|
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.read_namespaced_scale_scale_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Scale (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Scale
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty']
|
|
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 read_namespaced_scale_scale" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_scale_scale`")
|
|
# 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 `read_namespaced_scale_scale`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Scale',
|
|
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 read_namespaced_secret(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified Secret
|
|
|
|
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.read_namespaced_secret(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Secret (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1Secret
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_secret_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_secret_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_secret_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified Secret
|
|
|
|
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.read_namespaced_secret_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Secret (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1Secret
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
|
|
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 read_namespaced_secret" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_secret`")
|
|
# 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 `read_namespaced_secret`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/secrets/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Secret',
|
|
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 read_namespaced_service(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified Service
|
|
|
|
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.read_namespaced_service(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_service_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_service_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified Service
|
|
|
|
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.read_namespaced_service_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
|
|
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 read_namespaced_service" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_service`")
|
|
# 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 `read_namespaced_service`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service',
|
|
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 read_namespaced_service_account(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified ServiceAccount
|
|
|
|
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.read_namespaced_service_account(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ServiceAccount (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1ServiceAccount
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_service_account_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_service_account_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_service_account_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read the specified ServiceAccount
|
|
|
|
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.read_namespaced_service_account_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ServiceAccount (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1ServiceAccount
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
|
|
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 read_namespaced_service_account" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_service_account`")
|
|
# 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 `read_namespaced_service_account`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceAccount',
|
|
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 read_namespaced_service_status(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read status of the specified Service
|
|
|
|
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.read_namespaced_service_status(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_namespaced_service_status_with_http_info(name, namespace, **kwargs)
|
|
else:
|
|
(data) = self.read_namespaced_service_status_with_http_info(name, namespace, **kwargs)
|
|
return data
|
|
|
|
def read_namespaced_service_status_with_http_info(self, name, namespace, **kwargs):
|
|
"""
|
|
|
|
read status of the specified Service
|
|
|
|
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.read_namespaced_service_status_with_http_info(name, namespace, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'pretty']
|
|
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 read_namespaced_service_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_namespaced_service_status`")
|
|
# 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 `read_namespaced_service_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service',
|
|
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 read_node(self, name, **kwargs):
|
|
"""
|
|
|
|
read the specified Node
|
|
|
|
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.read_node(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_node_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.read_node_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def read_node_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
read the specified Node
|
|
|
|
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.read_node_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'pretty', 'exact', 'export']
|
|
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 read_node" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_node`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Node',
|
|
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 read_node_status(self, name, **kwargs):
|
|
"""
|
|
|
|
read status of the specified Node
|
|
|
|
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.read_node_status(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_node_status_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.read_node_status_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def read_node_status_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
read status of the specified Node
|
|
|
|
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.read_node_status_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'pretty']
|
|
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 read_node_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_node_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Node',
|
|
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 read_persistent_volume(self, name, **kwargs):
|
|
"""
|
|
|
|
read the specified PersistentVolume
|
|
|
|
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.read_persistent_volume(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_persistent_volume_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.read_persistent_volume_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def read_persistent_volume_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
read the specified PersistentVolume
|
|
|
|
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.read_persistent_volume_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
|
|
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'pretty', 'exact', 'export']
|
|
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 read_persistent_volume" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_persistent_volume`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/persistentvolumes/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
if 'exact' in params:
|
|
query_params['exact'] = params['exact']
|
|
if 'export' in params:
|
|
query_params['export'] = params['export']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume',
|
|
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 read_persistent_volume_status(self, name, **kwargs):
|
|
"""
|
|
|
|
read status of the specified PersistentVolume
|
|
|
|
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.read_persistent_volume_status(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.read_persistent_volume_status_with_http_info(name, **kwargs)
|
|
else:
|
|
(data) = self.read_persistent_volume_status_with_http_info(name, **kwargs)
|
|
return data
|
|
|
|
def read_persistent_volume_status_with_http_info(self, name, **kwargs):
|
|
"""
|
|
|
|
read status of the specified PersistentVolume
|
|
|
|
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.read_persistent_volume_status_with_http_info(name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'pretty']
|
|
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 read_persistent_volume_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `read_persistent_volume_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/persistentvolumes/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
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'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume',
|
|
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 replace_namespace(self, name, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified 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.replace_namespace(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Namespace (required)
|
|
:param V1Namespace body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespace_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespace_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespace_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified 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.replace_namespace_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Namespace (required)
|
|
:param V1Namespace body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty']
|
|
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 replace_namespace" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespace`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespace`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace',
|
|
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 replace_namespace_finalize(self, body, name, **kwargs):
|
|
"""
|
|
|
|
replace finalize of the specified 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.replace_namespace_finalize(body, name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param V1Namespace body: (required)
|
|
:param str name: name of the Namespace (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespace_finalize_with_http_info(body, name, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespace_finalize_with_http_info(body, name, **kwargs)
|
|
return data
|
|
|
|
def replace_namespace_finalize_with_http_info(self, body, name, **kwargs):
|
|
"""
|
|
|
|
replace finalize of the specified 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.replace_namespace_finalize_with_http_info(body, name, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param V1Namespace body: (required)
|
|
:param str name: name of the Namespace (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['body', 'name', 'pretty']
|
|
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 replace_namespace_finalize" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespace_finalize`")
|
|
# 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 `replace_namespace_finalize`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{name}/finalize'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace',
|
|
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 replace_namespace_status(self, name, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified 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.replace_namespace_status(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Namespace (required)
|
|
:param V1Namespace body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespace_status_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespace_status_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespace_status_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified 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.replace_namespace_status_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Namespace (required)
|
|
:param V1Namespace body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty']
|
|
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 replace_namespace_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespace_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespace_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace',
|
|
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 replace_namespaced_config_map(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified ConfigMap
|
|
|
|
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.replace_namespaced_config_map(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ConfigMap (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ConfigMap body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ConfigMap
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_config_map_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_config_map_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_config_map_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified ConfigMap
|
|
|
|
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.replace_namespaced_config_map_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ConfigMap (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ConfigMap body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ConfigMap
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_config_map" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_config_map`")
|
|
# 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 `replace_namespaced_config_map`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_config_map`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/configmaps/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ConfigMap',
|
|
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 replace_namespaced_endpoints(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified Endpoints
|
|
|
|
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.replace_namespaced_endpoints(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Endpoints (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Endpoints body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Endpoints
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_endpoints_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_endpoints_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_endpoints_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified Endpoints
|
|
|
|
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.replace_namespaced_endpoints_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Endpoints (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Endpoints body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Endpoints
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_endpoints" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_endpoints`")
|
|
# 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 `replace_namespaced_endpoints`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_endpoints`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/endpoints/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Endpoints',
|
|
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 replace_namespaced_event(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified Event
|
|
|
|
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.replace_namespaced_event(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Event (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Event body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Event
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_event_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_event_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified Event
|
|
|
|
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.replace_namespaced_event_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Event (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Event body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Event
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_event" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_event`")
|
|
# 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 `replace_namespaced_event`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_event`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/events/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Event',
|
|
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 replace_namespaced_limit_range(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified LimitRange
|
|
|
|
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.replace_namespaced_limit_range(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the LimitRange (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1LimitRange body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1LimitRange
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_limit_range_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_limit_range_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_limit_range_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified LimitRange
|
|
|
|
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.replace_namespaced_limit_range_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the LimitRange (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1LimitRange body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1LimitRange
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_limit_range" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_limit_range`")
|
|
# 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 `replace_namespaced_limit_range`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_limit_range`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/limitranges/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1LimitRange',
|
|
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 replace_namespaced_persistent_volume_claim(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified PersistentVolumeClaim
|
|
|
|
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.replace_namespaced_persistent_volume_claim(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1PersistentVolumeClaim body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_persistent_volume_claim_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified PersistentVolumeClaim
|
|
|
|
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.replace_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1PersistentVolumeClaim body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_persistent_volume_claim" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_persistent_volume_claim`")
|
|
# 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 `replace_namespaced_persistent_volume_claim`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_persistent_volume_claim`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim',
|
|
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 replace_namespaced_persistent_volume_claim_status(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified PersistentVolumeClaim
|
|
|
|
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.replace_namespaced_persistent_volume_claim_status(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1PersistentVolumeClaim body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_persistent_volume_claim_status_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified PersistentVolumeClaim
|
|
|
|
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.replace_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1PersistentVolumeClaim body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_persistent_volume_claim_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_persistent_volume_claim_status`")
|
|
# 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 `replace_namespaced_persistent_volume_claim_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_persistent_volume_claim_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim',
|
|
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 replace_namespaced_pod(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified Pod
|
|
|
|
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.replace_namespaced_pod(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Pod body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_pod_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_pod_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified Pod
|
|
|
|
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.replace_namespaced_pod_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Pod body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_pod" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_pod`")
|
|
# 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 `replace_namespaced_pod`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_pod`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod',
|
|
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 replace_namespaced_pod_status(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified Pod
|
|
|
|
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.replace_namespaced_pod_status(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Pod body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_pod_status_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_pod_status_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_pod_status_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified Pod
|
|
|
|
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.replace_namespaced_pod_status_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Pod body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_pod_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_pod_status`")
|
|
# 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 `replace_namespaced_pod_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod',
|
|
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 replace_namespaced_pod_template(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified PodTemplate
|
|
|
|
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.replace_namespaced_pod_template(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PodTemplate (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1PodTemplate body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PodTemplate
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_pod_template_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_pod_template_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_pod_template_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified PodTemplate
|
|
|
|
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.replace_namespaced_pod_template_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PodTemplate (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1PodTemplate body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PodTemplate
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_pod_template" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_pod_template`")
|
|
# 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 `replace_namespaced_pod_template`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_template`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/podtemplates/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodTemplate',
|
|
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 replace_namespaced_replication_controller(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified ReplicationController
|
|
|
|
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.replace_namespaced_replication_controller(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ReplicationController body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_replication_controller_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_replication_controller_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_replication_controller_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified ReplicationController
|
|
|
|
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.replace_namespaced_replication_controller_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ReplicationController body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_replication_controller" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_replication_controller`")
|
|
# 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 `replace_namespaced_replication_controller`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_replication_controller`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationController',
|
|
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 replace_namespaced_replication_controller_status(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified ReplicationController
|
|
|
|
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.replace_namespaced_replication_controller_status(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ReplicationController body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_replication_controller_status_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_replication_controller_status_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_replication_controller_status_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified ReplicationController
|
|
|
|
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.replace_namespaced_replication_controller_status_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ReplicationController body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_replication_controller_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_replication_controller_status`")
|
|
# 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 `replace_namespaced_replication_controller_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_replication_controller_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationController',
|
|
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 replace_namespaced_resource_quota(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified ResourceQuota
|
|
|
|
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.replace_namespaced_resource_quota(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ResourceQuota body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_resource_quota_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_resource_quota_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_resource_quota_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified ResourceQuota
|
|
|
|
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.replace_namespaced_resource_quota_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ResourceQuota body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_resource_quota" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_resource_quota`")
|
|
# 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 `replace_namespaced_resource_quota`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_quota`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/resourcequotas/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota',
|
|
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 replace_namespaced_resource_quota_status(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified ResourceQuota
|
|
|
|
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.replace_namespaced_resource_quota_status(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ResourceQuota body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_resource_quota_status_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_resource_quota_status_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_resource_quota_status_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified ResourceQuota
|
|
|
|
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.replace_namespaced_resource_quota_status_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ResourceQuota body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_resource_quota_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_resource_quota_status`")
|
|
# 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 `replace_namespaced_resource_quota_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_quota_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota',
|
|
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 replace_namespaced_scale_scale(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace scale of the specified Scale
|
|
|
|
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.replace_namespaced_scale_scale(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Scale (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Scale body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Scale
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_scale_scale_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_scale_scale_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_scale_scale_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace scale of the specified Scale
|
|
|
|
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.replace_namespaced_scale_scale_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Scale (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Scale body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Scale
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_scale_scale" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_scale_scale`")
|
|
# 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 `replace_namespaced_scale_scale`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_scale_scale`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Scale',
|
|
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 replace_namespaced_secret(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified Secret
|
|
|
|
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.replace_namespaced_secret(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Secret (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Secret body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Secret
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_secret_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_secret_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_secret_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified Secret
|
|
|
|
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.replace_namespaced_secret_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Secret (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Secret body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Secret
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_secret" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_secret`")
|
|
# 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 `replace_namespaced_secret`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_secret`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/secrets/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Secret',
|
|
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 replace_namespaced_service(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified Service
|
|
|
|
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.replace_namespaced_service(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Service body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_service_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_service_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_service_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified Service
|
|
|
|
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.replace_namespaced_service_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Service body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_service" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_service`")
|
|
# 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 `replace_namespaced_service`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_service`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service',
|
|
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 replace_namespaced_service_account(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified ServiceAccount
|
|
|
|
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.replace_namespaced_service_account(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ServiceAccount (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ServiceAccount body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ServiceAccount
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_service_account_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_service_account_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_service_account_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified ServiceAccount
|
|
|
|
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.replace_namespaced_service_account_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the ServiceAccount (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1ServiceAccount body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1ServiceAccount
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_service_account" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_service_account`")
|
|
# 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 `replace_namespaced_service_account`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_service_account`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceAccount',
|
|
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 replace_namespaced_service_status(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified Service
|
|
|
|
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.replace_namespaced_service_status(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Service body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_namespaced_service_status_with_http_info(name, namespace, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_namespaced_service_status_with_http_info(name, namespace, body, **kwargs)
|
|
return data
|
|
|
|
def replace_namespaced_service_status_with_http_info(self, name, namespace, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified Service
|
|
|
|
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.replace_namespaced_service_status_with_http_info(name, namespace, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Service body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'namespace', 'body', 'pretty']
|
|
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 replace_namespaced_service_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_namespaced_service_status`")
|
|
# 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 `replace_namespaced_service_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_service_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/namespaces/{namespace}/services/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
if 'namespace' in params:
|
|
path_params['namespace'] = params['namespace']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service',
|
|
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 replace_node(self, name, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified Node
|
|
|
|
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.replace_node(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param V1Node body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_node_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_node_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def replace_node_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified Node
|
|
|
|
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.replace_node_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param V1Node body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty']
|
|
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 replace_node" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_node`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_node`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Node',
|
|
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 replace_node_status(self, name, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified Node
|
|
|
|
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.replace_node_status(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param V1Node body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_node_status_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_node_status_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def replace_node_status_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified Node
|
|
|
|
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.replace_node_status_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the Node (required)
|
|
:param V1Node body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty']
|
|
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 replace_node_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_node_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_node_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/nodes/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Node',
|
|
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 replace_persistent_volume(self, name, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified PersistentVolume
|
|
|
|
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.replace_persistent_volume(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param V1PersistentVolume body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_persistent_volume_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_persistent_volume_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def replace_persistent_volume_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
replace the specified PersistentVolume
|
|
|
|
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.replace_persistent_volume_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param V1PersistentVolume body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty']
|
|
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 replace_persistent_volume" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_persistent_volume`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_persistent_volume`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/persistentvolumes/{name}'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume',
|
|
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 replace_persistent_volume_status(self, name, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified PersistentVolume
|
|
|
|
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.replace_persistent_volume_status(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param V1PersistentVolume body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('callback'):
|
|
return self.replace_persistent_volume_status_with_http_info(name, body, **kwargs)
|
|
else:
|
|
(data) = self.replace_persistent_volume_status_with_http_info(name, body, **kwargs)
|
|
return data
|
|
|
|
def replace_persistent_volume_status_with_http_info(self, name, body, **kwargs):
|
|
"""
|
|
|
|
replace status of the specified PersistentVolume
|
|
|
|
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.replace_persistent_volume_status_with_http_info(name, body, callback=callback_function)
|
|
|
|
:param callback function: The callback function
|
|
for asynchronous request. (optional)
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param V1PersistentVolume body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'body', 'pretty']
|
|
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 replace_persistent_volume_status" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# 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 `replace_persistent_volume_status`")
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params) or (params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `replace_persistent_volume_status`")
|
|
|
|
|
|
collection_formats = {}
|
|
|
|
resource_path = '/api/v1/persistentvolumes/{name}/status'.replace('{format}', 'json')
|
|
path_params = {}
|
|
if 'name' in params:
|
|
path_params['name'] = params['name']
|
|
|
|
query_params = {}
|
|
if 'pretty' in params:
|
|
query_params['pretty'] = params['pretty']
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.\
|
|
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
|
|
if not header_params['Accept']:
|
|
del header_params['Accept']
|
|
|
|
# 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, 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume',
|
|
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)
|