30454 lines
2.3 MiB
30454 lines
2.3 MiB
# coding: utf-8
|
|
|
|
"""
|
|
Kubernetes
|
|
|
|
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
|
|
|
|
The version of the OpenAPI document: release-1.32
|
|
Generated by: https://openapi-generator.tech
|
|
"""
|
|
|
|
|
|
from __future__ import absolute_import
|
|
|
|
import re # noqa: F401
|
|
|
|
# python 2 and python 3 compatibility library
|
|
import six
|
|
|
|
from kubernetes.client.api_client import ApiClient
|
|
from kubernetes.client.exceptions import ( # noqa: F401
|
|
ApiTypeError,
|
|
ApiValueError
|
|
)
|
|
|
|
|
|
class CoreV1Api(object):
|
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
Ref: https://openapi-generator.tech
|
|
|
|
Do not edit the class manually.
|
|
"""
|
|
|
|
def __init__(self, api_client=None):
|
|
if api_client is None:
|
|
api_client = ApiClient()
|
|
self.api_client = api_client
|
|
|
|
def connect_delete_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_delete_namespaced_pod_proxy # noqa: E501
|
|
|
|
connect DELETE requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_delete_namespaced_pod_proxy(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_delete_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_delete_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_delete_namespaced_pod_proxy # noqa: E501
|
|
|
|
connect DELETE requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_delete_namespaced_pod_proxy_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_delete_namespaced_pod_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_delete_namespaced_pod_proxy`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_delete_namespaced_pod_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/proxy', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_delete_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_delete_namespaced_pod_proxy_with_path # noqa: E501
|
|
|
|
connect DELETE requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_delete_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_delete_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501
|
|
|
|
def connect_delete_namespaced_pod_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_delete_namespaced_pod_proxy_with_path # noqa: E501
|
|
|
|
connect DELETE requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_delete_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_delete_namespaced_pod_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_delete_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_delete_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_delete_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_delete_namespaced_service_proxy(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_delete_namespaced_service_proxy # noqa: E501
|
|
|
|
connect DELETE requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_delete_namespaced_service_proxy(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_delete_namespaced_service_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_delete_namespaced_service_proxy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_delete_namespaced_service_proxy # noqa: E501
|
|
|
|
connect DELETE requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_delete_namespaced_service_proxy_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_delete_namespaced_service_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_delete_namespaced_service_proxy`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_delete_namespaced_service_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/proxy', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_delete_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_delete_namespaced_service_proxy_with_path # noqa: E501
|
|
|
|
connect DELETE requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_delete_namespaced_service_proxy_with_path(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_delete_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501
|
|
|
|
def connect_delete_namespaced_service_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_delete_namespaced_service_proxy_with_path # noqa: E501
|
|
|
|
connect DELETE requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_delete_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_delete_namespaced_service_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_delete_namespaced_service_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_delete_namespaced_service_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_delete_namespaced_service_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_delete_node_proxy(self, name, **kwargs): # noqa: E501
|
|
"""connect_delete_node_proxy # noqa: E501
|
|
|
|
connect DELETE requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_delete_node_proxy(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_delete_node_proxy_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def connect_delete_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""connect_delete_node_proxy # noqa: E501
|
|
|
|
connect DELETE requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_delete_node_proxy_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_delete_node_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_delete_node_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/proxy', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_delete_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501
|
|
"""connect_delete_node_proxy_with_path # noqa: E501
|
|
|
|
connect DELETE requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_delete_node_proxy_with_path(name, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_delete_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501
|
|
|
|
def connect_delete_node_proxy_with_path_with_http_info(self, name, path, **kwargs): # noqa: E501
|
|
"""connect_delete_node_proxy_with_path # noqa: E501
|
|
|
|
connect DELETE requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_delete_node_proxy_with_path_with_http_info(name, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_delete_node_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_delete_node_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_delete_node_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/proxy/{path}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_get_namespaced_pod_attach(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_get_namespaced_pod_attach # noqa: E501
|
|
|
|
connect GET requests to attach of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_namespaced_pod_attach(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodAttachOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_get_namespaced_pod_attach_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_get_namespaced_pod_attach_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_get_namespaced_pod_attach # noqa: E501
|
|
|
|
connect GET requests to attach of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_namespaced_pod_attach_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodAttachOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'container',
|
|
'stderr',
|
|
'stdin',
|
|
'stdout',
|
|
'tty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_get_namespaced_pod_attach" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_attach`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_attach`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'container' in local_var_params and local_var_params['container'] is not None: # noqa: E501
|
|
query_params.append(('container', local_var_params['container'])) # noqa: E501
|
|
if 'stderr' in local_var_params and local_var_params['stderr'] is not None: # noqa: E501
|
|
query_params.append(('stderr', local_var_params['stderr'])) # noqa: E501
|
|
if 'stdin' in local_var_params and local_var_params['stdin'] is not None: # noqa: E501
|
|
query_params.append(('stdin', local_var_params['stdin'])) # noqa: E501
|
|
if 'stdout' in local_var_params and local_var_params['stdout'] is not None: # noqa: E501
|
|
query_params.append(('stdout', local_var_params['stdout'])) # noqa: E501
|
|
if 'tty' in local_var_params and local_var_params['tty'] is not None: # noqa: E501
|
|
query_params.append(('tty', local_var_params['tty'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/attach', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_get_namespaced_pod_exec(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_get_namespaced_pod_exec # noqa: E501
|
|
|
|
connect GET requests to exec of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_namespaced_pod_exec(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodExecOptions (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.
|
|
: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.
|
|
:param bool tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_get_namespaced_pod_exec_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_get_namespaced_pod_exec_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_get_namespaced_pod_exec # noqa: E501
|
|
|
|
connect GET requests to exec of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_namespaced_pod_exec_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodExecOptions (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.
|
|
: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.
|
|
:param bool tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'command',
|
|
'container',
|
|
'stderr',
|
|
'stdin',
|
|
'stdout',
|
|
'tty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_get_namespaced_pod_exec" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_exec`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_exec`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'command' in local_var_params and local_var_params['command'] is not None: # noqa: E501
|
|
query_params.append(('command', local_var_params['command'])) # noqa: E501
|
|
if 'container' in local_var_params and local_var_params['container'] is not None: # noqa: E501
|
|
query_params.append(('container', local_var_params['container'])) # noqa: E501
|
|
if 'stderr' in local_var_params and local_var_params['stderr'] is not None: # noqa: E501
|
|
query_params.append(('stderr', local_var_params['stderr'])) # noqa: E501
|
|
if 'stdin' in local_var_params and local_var_params['stdin'] is not None: # noqa: E501
|
|
query_params.append(('stdin', local_var_params['stdin'])) # noqa: E501
|
|
if 'stdout' in local_var_params and local_var_params['stdout'] is not None: # noqa: E501
|
|
query_params.append(('stdout', local_var_params['stdout'])) # noqa: E501
|
|
if 'tty' in local_var_params and local_var_params['tty'] is not None: # noqa: E501
|
|
query_params.append(('tty', local_var_params['tty'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/exec', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_get_namespaced_pod_portforward(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_get_namespaced_pod_portforward # noqa: E501
|
|
|
|
connect GET requests to portforward of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_namespaced_pod_portforward(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodPortForwardOptions (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param int ports: List of ports to forward Required when using WebSockets
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_get_namespaced_pod_portforward_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_get_namespaced_pod_portforward_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_get_namespaced_pod_portforward # noqa: E501
|
|
|
|
connect GET requests to portforward of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_namespaced_pod_portforward_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodPortForwardOptions (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param int ports: List of ports to forward Required when using WebSockets
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'ports'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_get_namespaced_pod_portforward" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_portforward`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_portforward`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'ports' in local_var_params and local_var_params['ports'] is not None: # noqa: E501
|
|
query_params.append(('ports', local_var_params['ports'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/portforward', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_get_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_get_namespaced_pod_proxy # noqa: E501
|
|
|
|
connect GET requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_namespaced_pod_proxy(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_get_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_get_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_get_namespaced_pod_proxy # noqa: E501
|
|
|
|
connect GET requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_namespaced_pod_proxy_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_get_namespaced_pod_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_proxy`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/proxy', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_get_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_get_namespaced_pod_proxy_with_path # noqa: E501
|
|
|
|
connect GET requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_get_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501
|
|
|
|
def connect_get_namespaced_pod_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_get_namespaced_pod_proxy_with_path # noqa: E501
|
|
|
|
connect GET requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_get_namespaced_pod_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_get_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_get_namespaced_service_proxy(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_get_namespaced_service_proxy # noqa: E501
|
|
|
|
connect GET requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_namespaced_service_proxy(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_get_namespaced_service_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_get_namespaced_service_proxy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_get_namespaced_service_proxy # noqa: E501
|
|
|
|
connect GET requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_namespaced_service_proxy_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_get_namespaced_service_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_get_namespaced_service_proxy`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_service_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/proxy', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_get_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_get_namespaced_service_proxy_with_path # noqa: E501
|
|
|
|
connect GET requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_namespaced_service_proxy_with_path(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_get_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501
|
|
|
|
def connect_get_namespaced_service_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_get_namespaced_service_proxy_with_path # noqa: E501
|
|
|
|
connect GET requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_get_namespaced_service_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_get_namespaced_service_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_service_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_get_namespaced_service_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_get_node_proxy(self, name, **kwargs): # noqa: E501
|
|
"""connect_get_node_proxy # noqa: E501
|
|
|
|
connect GET requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_node_proxy(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_get_node_proxy_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def connect_get_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""connect_get_node_proxy # noqa: E501
|
|
|
|
connect GET requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_node_proxy_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_get_node_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_get_node_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/proxy', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_get_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501
|
|
"""connect_get_node_proxy_with_path # noqa: E501
|
|
|
|
connect GET requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_node_proxy_with_path(name, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_get_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501
|
|
|
|
def connect_get_node_proxy_with_path_with_http_info(self, name, path, **kwargs): # noqa: E501
|
|
"""connect_get_node_proxy_with_path # noqa: E501
|
|
|
|
connect GET requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_get_node_proxy_with_path_with_http_info(name, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_get_node_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_get_node_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_get_node_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/proxy/{path}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_head_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_head_namespaced_pod_proxy # noqa: E501
|
|
|
|
connect HEAD requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_head_namespaced_pod_proxy(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_head_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_head_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_head_namespaced_pod_proxy # noqa: E501
|
|
|
|
connect HEAD requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_head_namespaced_pod_proxy_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_head_namespaced_pod_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_head_namespaced_pod_proxy`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_head_namespaced_pod_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/proxy', 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_head_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_head_namespaced_pod_proxy_with_path # noqa: E501
|
|
|
|
connect HEAD requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_head_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_head_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501
|
|
|
|
def connect_head_namespaced_pod_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_head_namespaced_pod_proxy_with_path # noqa: E501
|
|
|
|
connect HEAD requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_head_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_head_namespaced_pod_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_head_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_head_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_head_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}', 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_head_namespaced_service_proxy(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_head_namespaced_service_proxy # noqa: E501
|
|
|
|
connect HEAD requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_head_namespaced_service_proxy(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_head_namespaced_service_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_head_namespaced_service_proxy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_head_namespaced_service_proxy # noqa: E501
|
|
|
|
connect HEAD requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_head_namespaced_service_proxy_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_head_namespaced_service_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_head_namespaced_service_proxy`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_head_namespaced_service_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/proxy', 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_head_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_head_namespaced_service_proxy_with_path # noqa: E501
|
|
|
|
connect HEAD requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_head_namespaced_service_proxy_with_path(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_head_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501
|
|
|
|
def connect_head_namespaced_service_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_head_namespaced_service_proxy_with_path # noqa: E501
|
|
|
|
connect HEAD requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_head_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_head_namespaced_service_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_head_namespaced_service_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_head_namespaced_service_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_head_namespaced_service_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}', 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_head_node_proxy(self, name, **kwargs): # noqa: E501
|
|
"""connect_head_node_proxy # noqa: E501
|
|
|
|
connect HEAD requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_head_node_proxy(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_head_node_proxy_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def connect_head_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""connect_head_node_proxy # noqa: E501
|
|
|
|
connect HEAD requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_head_node_proxy_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_head_node_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_head_node_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/proxy', 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_head_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501
|
|
"""connect_head_node_proxy_with_path # noqa: E501
|
|
|
|
connect HEAD requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_head_node_proxy_with_path(name, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_head_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501
|
|
|
|
def connect_head_node_proxy_with_path_with_http_info(self, name, path, **kwargs): # noqa: E501
|
|
"""connect_head_node_proxy_with_path # noqa: E501
|
|
|
|
connect HEAD requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_head_node_proxy_with_path_with_http_info(name, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_head_node_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_head_node_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_head_node_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/proxy/{path}', 'HEAD',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_options_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_options_namespaced_pod_proxy # noqa: E501
|
|
|
|
connect OPTIONS requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_options_namespaced_pod_proxy(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_options_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_options_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_options_namespaced_pod_proxy # noqa: E501
|
|
|
|
connect OPTIONS requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_options_namespaced_pod_proxy_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_options_namespaced_pod_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_options_namespaced_pod_proxy`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_options_namespaced_pod_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/proxy', 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_options_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_options_namespaced_pod_proxy_with_path # noqa: E501
|
|
|
|
connect OPTIONS requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_options_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_options_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501
|
|
|
|
def connect_options_namespaced_pod_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_options_namespaced_pod_proxy_with_path # noqa: E501
|
|
|
|
connect OPTIONS requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_options_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_options_namespaced_pod_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_options_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_options_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_options_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}', 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_options_namespaced_service_proxy(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_options_namespaced_service_proxy # noqa: E501
|
|
|
|
connect OPTIONS requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_options_namespaced_service_proxy(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_options_namespaced_service_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_options_namespaced_service_proxy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_options_namespaced_service_proxy # noqa: E501
|
|
|
|
connect OPTIONS requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_options_namespaced_service_proxy_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_options_namespaced_service_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_options_namespaced_service_proxy`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_options_namespaced_service_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/proxy', 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_options_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_options_namespaced_service_proxy_with_path # noqa: E501
|
|
|
|
connect OPTIONS requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_options_namespaced_service_proxy_with_path(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_options_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501
|
|
|
|
def connect_options_namespaced_service_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_options_namespaced_service_proxy_with_path # noqa: E501
|
|
|
|
connect OPTIONS requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_options_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_options_namespaced_service_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_options_namespaced_service_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_options_namespaced_service_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_options_namespaced_service_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}', 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_options_node_proxy(self, name, **kwargs): # noqa: E501
|
|
"""connect_options_node_proxy # noqa: E501
|
|
|
|
connect OPTIONS requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_options_node_proxy(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_options_node_proxy_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def connect_options_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""connect_options_node_proxy # noqa: E501
|
|
|
|
connect OPTIONS requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_options_node_proxy_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_options_node_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_options_node_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/proxy', 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_options_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501
|
|
"""connect_options_node_proxy_with_path # noqa: E501
|
|
|
|
connect OPTIONS requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_options_node_proxy_with_path(name, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_options_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501
|
|
|
|
def connect_options_node_proxy_with_path_with_http_info(self, name, path, **kwargs): # noqa: E501
|
|
"""connect_options_node_proxy_with_path # noqa: E501
|
|
|
|
connect OPTIONS requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_options_node_proxy_with_path_with_http_info(name, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_options_node_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_options_node_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_options_node_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/proxy/{path}', 'OPTIONS',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_patch_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_patch_namespaced_pod_proxy # noqa: E501
|
|
|
|
connect PATCH requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_patch_namespaced_pod_proxy(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_patch_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_patch_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_patch_namespaced_pod_proxy # noqa: E501
|
|
|
|
connect PATCH requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_patch_namespaced_pod_proxy_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_patch_namespaced_pod_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_patch_namespaced_pod_proxy`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_patch_namespaced_pod_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/proxy', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_patch_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_patch_namespaced_pod_proxy_with_path # noqa: E501
|
|
|
|
connect PATCH requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_patch_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_patch_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501
|
|
|
|
def connect_patch_namespaced_pod_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_patch_namespaced_pod_proxy_with_path # noqa: E501
|
|
|
|
connect PATCH requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_patch_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_patch_namespaced_pod_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_patch_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_patch_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_patch_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_patch_namespaced_service_proxy(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_patch_namespaced_service_proxy # noqa: E501
|
|
|
|
connect PATCH requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_patch_namespaced_service_proxy(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_patch_namespaced_service_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_patch_namespaced_service_proxy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_patch_namespaced_service_proxy # noqa: E501
|
|
|
|
connect PATCH requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_patch_namespaced_service_proxy_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_patch_namespaced_service_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_patch_namespaced_service_proxy`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_patch_namespaced_service_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/proxy', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_patch_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_patch_namespaced_service_proxy_with_path # noqa: E501
|
|
|
|
connect PATCH requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_patch_namespaced_service_proxy_with_path(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_patch_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501
|
|
|
|
def connect_patch_namespaced_service_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_patch_namespaced_service_proxy_with_path # noqa: E501
|
|
|
|
connect PATCH requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_patch_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_patch_namespaced_service_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_patch_namespaced_service_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_patch_namespaced_service_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_patch_namespaced_service_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_patch_node_proxy(self, name, **kwargs): # noqa: E501
|
|
"""connect_patch_node_proxy # noqa: E501
|
|
|
|
connect PATCH requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_patch_node_proxy(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_patch_node_proxy_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def connect_patch_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""connect_patch_node_proxy # noqa: E501
|
|
|
|
connect PATCH requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_patch_node_proxy_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_patch_node_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_patch_node_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/proxy', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_patch_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501
|
|
"""connect_patch_node_proxy_with_path # noqa: E501
|
|
|
|
connect PATCH requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_patch_node_proxy_with_path(name, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_patch_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501
|
|
|
|
def connect_patch_node_proxy_with_path_with_http_info(self, name, path, **kwargs): # noqa: E501
|
|
"""connect_patch_node_proxy_with_path # noqa: E501
|
|
|
|
connect PATCH requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_patch_node_proxy_with_path_with_http_info(name, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_patch_node_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_patch_node_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_patch_node_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/proxy/{path}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_post_namespaced_pod_attach(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_post_namespaced_pod_attach # noqa: E501
|
|
|
|
connect POST requests to attach of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_namespaced_pod_attach(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodAttachOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_post_namespaced_pod_attach_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_post_namespaced_pod_attach_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_post_namespaced_pod_attach # noqa: E501
|
|
|
|
connect POST requests to attach of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_namespaced_pod_attach_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodAttachOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'container',
|
|
'stderr',
|
|
'stdin',
|
|
'stdout',
|
|
'tty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_post_namespaced_pod_attach" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_attach`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_attach`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'container' in local_var_params and local_var_params['container'] is not None: # noqa: E501
|
|
query_params.append(('container', local_var_params['container'])) # noqa: E501
|
|
if 'stderr' in local_var_params and local_var_params['stderr'] is not None: # noqa: E501
|
|
query_params.append(('stderr', local_var_params['stderr'])) # noqa: E501
|
|
if 'stdin' in local_var_params and local_var_params['stdin'] is not None: # noqa: E501
|
|
query_params.append(('stdin', local_var_params['stdin'])) # noqa: E501
|
|
if 'stdout' in local_var_params and local_var_params['stdout'] is not None: # noqa: E501
|
|
query_params.append(('stdout', local_var_params['stdout'])) # noqa: E501
|
|
if 'tty' in local_var_params and local_var_params['tty'] is not None: # noqa: E501
|
|
query_params.append(('tty', local_var_params['tty'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/attach', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_post_namespaced_pod_exec(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_post_namespaced_pod_exec # noqa: E501
|
|
|
|
connect POST requests to exec of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_namespaced_pod_exec(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodExecOptions (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.
|
|
: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.
|
|
:param bool tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_post_namespaced_pod_exec_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_post_namespaced_pod_exec_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_post_namespaced_pod_exec # noqa: E501
|
|
|
|
connect POST requests to exec of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_namespaced_pod_exec_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodExecOptions (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.
|
|
: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.
|
|
:param bool tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'command',
|
|
'container',
|
|
'stderr',
|
|
'stdin',
|
|
'stdout',
|
|
'tty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_post_namespaced_pod_exec" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_exec`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_exec`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'command' in local_var_params and local_var_params['command'] is not None: # noqa: E501
|
|
query_params.append(('command', local_var_params['command'])) # noqa: E501
|
|
if 'container' in local_var_params and local_var_params['container'] is not None: # noqa: E501
|
|
query_params.append(('container', local_var_params['container'])) # noqa: E501
|
|
if 'stderr' in local_var_params and local_var_params['stderr'] is not None: # noqa: E501
|
|
query_params.append(('stderr', local_var_params['stderr'])) # noqa: E501
|
|
if 'stdin' in local_var_params and local_var_params['stdin'] is not None: # noqa: E501
|
|
query_params.append(('stdin', local_var_params['stdin'])) # noqa: E501
|
|
if 'stdout' in local_var_params and local_var_params['stdout'] is not None: # noqa: E501
|
|
query_params.append(('stdout', local_var_params['stdout'])) # noqa: E501
|
|
if 'tty' in local_var_params and local_var_params['tty'] is not None: # noqa: E501
|
|
query_params.append(('tty', local_var_params['tty'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/exec', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_post_namespaced_pod_portforward(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_post_namespaced_pod_portforward # noqa: E501
|
|
|
|
connect POST requests to portforward of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_namespaced_pod_portforward(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodPortForwardOptions (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param int ports: List of ports to forward Required when using WebSockets
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_post_namespaced_pod_portforward_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_post_namespaced_pod_portforward_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_post_namespaced_pod_portforward # noqa: E501
|
|
|
|
connect POST requests to portforward of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_namespaced_pod_portforward_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodPortForwardOptions (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param int ports: List of ports to forward Required when using WebSockets
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'ports'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_post_namespaced_pod_portforward" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_portforward`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_portforward`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'ports' in local_var_params and local_var_params['ports'] is not None: # noqa: E501
|
|
query_params.append(('ports', local_var_params['ports'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/portforward', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_post_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_post_namespaced_pod_proxy # noqa: E501
|
|
|
|
connect POST requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_namespaced_pod_proxy(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_post_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_post_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_post_namespaced_pod_proxy # noqa: E501
|
|
|
|
connect POST requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_namespaced_pod_proxy_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_post_namespaced_pod_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_proxy`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/proxy', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_post_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_post_namespaced_pod_proxy_with_path # noqa: E501
|
|
|
|
connect POST requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_post_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501
|
|
|
|
def connect_post_namespaced_pod_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_post_namespaced_pod_proxy_with_path # noqa: E501
|
|
|
|
connect POST requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_post_namespaced_pod_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_post_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_post_namespaced_service_proxy(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_post_namespaced_service_proxy # noqa: E501
|
|
|
|
connect POST requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_namespaced_service_proxy(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_post_namespaced_service_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_post_namespaced_service_proxy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_post_namespaced_service_proxy # noqa: E501
|
|
|
|
connect POST requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_namespaced_service_proxy_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_post_namespaced_service_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_post_namespaced_service_proxy`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_service_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/proxy', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_post_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_post_namespaced_service_proxy_with_path # noqa: E501
|
|
|
|
connect POST requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_namespaced_service_proxy_with_path(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_post_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501
|
|
|
|
def connect_post_namespaced_service_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_post_namespaced_service_proxy_with_path # noqa: E501
|
|
|
|
connect POST requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_post_namespaced_service_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_post_namespaced_service_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_service_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_post_namespaced_service_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_post_node_proxy(self, name, **kwargs): # noqa: E501
|
|
"""connect_post_node_proxy # noqa: E501
|
|
|
|
connect POST requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_node_proxy(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_post_node_proxy_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def connect_post_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""connect_post_node_proxy # noqa: E501
|
|
|
|
connect POST requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_node_proxy_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_post_node_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_post_node_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/proxy', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_post_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501
|
|
"""connect_post_node_proxy_with_path # noqa: E501
|
|
|
|
connect POST requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_node_proxy_with_path(name, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_post_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501
|
|
|
|
def connect_post_node_proxy_with_path_with_http_info(self, name, path, **kwargs): # noqa: E501
|
|
"""connect_post_node_proxy_with_path # noqa: E501
|
|
|
|
connect POST requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_post_node_proxy_with_path_with_http_info(name, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_post_node_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_post_node_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_post_node_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/proxy/{path}', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_put_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_put_namespaced_pod_proxy # noqa: E501
|
|
|
|
connect PUT requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_put_namespaced_pod_proxy(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_put_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_put_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_put_namespaced_pod_proxy # noqa: E501
|
|
|
|
connect PUT requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_put_namespaced_pod_proxy_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_put_namespaced_pod_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_put_namespaced_pod_proxy`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_put_namespaced_pod_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/proxy', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_put_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_put_namespaced_pod_proxy_with_path # noqa: E501
|
|
|
|
connect PUT requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_put_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_put_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501
|
|
|
|
def connect_put_namespaced_pod_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_put_namespaced_pod_proxy_with_path # noqa: E501
|
|
|
|
connect PUT requests to proxy of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_put_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_put_namespaced_pod_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_put_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_put_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_put_namespaced_pod_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_put_namespaced_service_proxy(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_put_namespaced_service_proxy # noqa: E501
|
|
|
|
connect PUT requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_put_namespaced_service_proxy(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_put_namespaced_service_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def connect_put_namespaced_service_proxy_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""connect_put_namespaced_service_proxy # noqa: E501
|
|
|
|
connect PUT requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_put_namespaced_service_proxy_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_put_namespaced_service_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_put_namespaced_service_proxy`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_put_namespaced_service_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/proxy', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_put_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_put_namespaced_service_proxy_with_path # noqa: E501
|
|
|
|
connect PUT requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_put_namespaced_service_proxy_with_path(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_put_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501
|
|
|
|
def connect_put_namespaced_service_proxy_with_path_with_http_info(self, name, namespace, path, **kwargs): # noqa: E501
|
|
"""connect_put_namespaced_service_proxy_with_path # noqa: E501
|
|
|
|
connect PUT requests to proxy of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_put_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_put_namespaced_service_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_put_namespaced_service_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `connect_put_namespaced_service_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_put_namespaced_service_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_put_node_proxy(self, name, **kwargs): # noqa: E501
|
|
"""connect_put_node_proxy # noqa: E501
|
|
|
|
connect PUT requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_put_node_proxy(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_put_node_proxy_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def connect_put_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""connect_put_node_proxy # noqa: E501
|
|
|
|
connect PUT requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_put_node_proxy_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (required)
|
|
:param str path: Path is the URL path to use for the current proxy request to node.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'path'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_put_node_proxy" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_put_node_proxy`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/proxy', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def connect_put_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501
|
|
"""connect_put_node_proxy_with_path # noqa: E501
|
|
|
|
connect PUT requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_put_node_proxy_with_path(name, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (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.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.connect_put_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501
|
|
|
|
def connect_put_node_proxy_with_path_with_http_info(self, name, path, **kwargs): # noqa: E501
|
|
"""connect_put_node_proxy_with_path # noqa: E501
|
|
|
|
connect PUT requests to proxy of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.connect_put_node_proxy_with_path_with_http_info(name, path, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the NodeProxyOptions (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.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'path',
|
|
'path2'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method connect_put_node_proxy_with_path" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `connect_put_node_proxy_with_path`") # noqa: E501
|
|
# verify the required parameter 'path' is set
|
|
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
|
local_var_params['path'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `path` when calling `connect_put_node_proxy_with_path`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'path' in local_var_params:
|
|
path_params['path'] = local_var_params['path'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501
|
|
query_params.append(('path', local_var_params['path2'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['*/*']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/proxy/{path}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespace(self, body, **kwargs): # noqa: E501
|
|
"""create_namespace # noqa: E501
|
|
|
|
create a Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespace(body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param V1Namespace body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespace_with_http_info(body, **kwargs) # noqa: E501
|
|
|
|
def create_namespace_with_http_info(self, body, **kwargs): # noqa: E501
|
|
"""create_namespace # noqa: E501
|
|
|
|
create a Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespace_with_http_info(body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param V1Namespace body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespace" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespace`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_binding(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_binding # noqa: E501
|
|
|
|
create a Binding # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_binding(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Binding body: (required)
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Binding
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_binding_with_http_info(namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_binding_with_http_info(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_binding # noqa: E501
|
|
|
|
create a Binding # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_binding_with_http_info(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Binding body: (required)
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Binding, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'body',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_binding" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_binding`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_binding`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/bindings', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Binding', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_config_map(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_config_map # noqa: E501
|
|
|
|
create a ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_config_map(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ConfigMap
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_config_map_with_http_info(namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_config_map_with_http_info(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_config_map # noqa: E501
|
|
|
|
create a ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_config_map_with_http_info(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_config_map" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_config_map`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_config_map`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/configmaps', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ConfigMap', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_endpoints(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_endpoints # noqa: E501
|
|
|
|
create Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_endpoints(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Endpoints
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_endpoints_with_http_info(namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_endpoints_with_http_info(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_endpoints # noqa: E501
|
|
|
|
create Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_endpoints_with_http_info(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_endpoints" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_endpoints`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_endpoints`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/endpoints', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Endpoints', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_event(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_event # noqa: E501
|
|
|
|
create an Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_event(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param CoreV1Event body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: CoreV1Event
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_event_with_http_info(namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_event # noqa: E501
|
|
|
|
create an Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_event_with_http_info(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param CoreV1Event body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_event" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_event`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_event`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/events', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='CoreV1Event', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_limit_range(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_limit_range # noqa: E501
|
|
|
|
create a LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_limit_range(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1LimitRange
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_limit_range_with_http_info(namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_limit_range_with_http_info(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_limit_range # noqa: E501
|
|
|
|
create a LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_limit_range_with_http_info(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_limit_range" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_limit_range`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_limit_range`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/limitranges', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1LimitRange', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_persistent_volume_claim(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_persistent_volume_claim # noqa: E501
|
|
|
|
create a PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_persistent_volume_claim(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_persistent_volume_claim_with_http_info(namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_persistent_volume_claim_with_http_info(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_persistent_volume_claim # noqa: E501
|
|
|
|
create a PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_persistent_volume_claim_with_http_info(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_persistent_volume_claim" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_persistent_volume_claim`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_persistent_volume_claim`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/persistentvolumeclaims', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_pod(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_pod # noqa: E501
|
|
|
|
create a Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_pod(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_pod_with_http_info(namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_pod_with_http_info(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_pod # noqa: E501
|
|
|
|
create a Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_pod_with_http_info(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_pod" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_pod`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_pod_binding(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_pod_binding # noqa: E501
|
|
|
|
create binding of a Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_pod_binding(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Binding (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Binding body: (required)
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Binding
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_pod_binding_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_pod_binding_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_pod_binding # noqa: E501
|
|
|
|
create binding of a Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_pod_binding_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Binding (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Binding body: (required)
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Binding, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_pod_binding" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `create_namespaced_pod_binding`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod_binding`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_pod_binding`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/binding', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Binding', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_pod_eviction(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_pod_eviction # noqa: E501
|
|
|
|
create eviction of a Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_pod_eviction(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Eviction (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Eviction body: (required)
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Eviction
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_pod_eviction_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_pod_eviction_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_pod_eviction # noqa: E501
|
|
|
|
create eviction of a Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_pod_eviction_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Eviction (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param V1Eviction body: (required)
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Eviction, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_pod_eviction" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `create_namespaced_pod_eviction`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod_eviction`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_pod_eviction`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/eviction', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Eviction', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_pod_template(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_pod_template # noqa: E501
|
|
|
|
create a PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_pod_template(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PodTemplate
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_pod_template_with_http_info(namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_pod_template_with_http_info(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_pod_template # noqa: E501
|
|
|
|
create a PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_pod_template_with_http_info(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_pod_template" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod_template`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_pod_template`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/podtemplates', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodTemplate', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_replication_controller(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_replication_controller # noqa: E501
|
|
|
|
create a ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_replication_controller(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_replication_controller_with_http_info(namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_replication_controller_with_http_info(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_replication_controller # noqa: E501
|
|
|
|
create a ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_replication_controller_with_http_info(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_replication_controller" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_replication_controller`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_replication_controller`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/replicationcontrollers', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationController', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_resource_quota(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_resource_quota # noqa: E501
|
|
|
|
create a ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_resource_quota(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_resource_quota_with_http_info(namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_resource_quota_with_http_info(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_resource_quota # noqa: E501
|
|
|
|
create a ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_resource_quota_with_http_info(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_resource_quota" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_quota`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_quota`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/resourcequotas', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_secret(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_secret # noqa: E501
|
|
|
|
create a Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_secret(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Secret
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_secret_with_http_info(namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_secret_with_http_info(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_secret # noqa: E501
|
|
|
|
create a Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_secret_with_http_info(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_secret" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_secret`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_secret`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/secrets', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Secret', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_service(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_service # noqa: E501
|
|
|
|
create a Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_service(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_service_with_http_info(namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_service_with_http_info(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_service # noqa: E501
|
|
|
|
create a Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_service_with_http_info(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_service" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_service`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_service`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_service_account(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_service_account # noqa: E501
|
|
|
|
create a ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_service_account(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ServiceAccount
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_service_account_with_http_info(namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_service_account_with_http_info(self, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_service_account # noqa: E501
|
|
|
|
create a ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_service_account_with_http_info(namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_service_account" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_service_account`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_service_account`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/serviceaccounts', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceAccount', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_namespaced_service_account_token(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_service_account_token # noqa: E501
|
|
|
|
create token of a ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_service_account_token(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the TokenRequest (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param AuthenticationV1TokenRequest body: (required)
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: AuthenticationV1TokenRequest
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_namespaced_service_account_token_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def create_namespaced_service_account_token_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""create_namespaced_service_account_token # noqa: E501
|
|
|
|
create token of a ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_namespaced_service_account_token_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the TokenRequest (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param AuthenticationV1TokenRequest body: (required)
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(AuthenticationV1TokenRequest, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_namespaced_service_account_token" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `create_namespaced_service_account_token`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_service_account_token`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_service_account_token`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='AuthenticationV1TokenRequest', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_node(self, body, **kwargs): # noqa: E501
|
|
"""create_node # noqa: E501
|
|
|
|
create a Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_node(body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param V1Node body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_node_with_http_info(body, **kwargs) # noqa: E501
|
|
|
|
def create_node_with_http_info(self, body, **kwargs): # noqa: E501
|
|
"""create_node # noqa: E501
|
|
|
|
create a Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_node_with_http_info(body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param V1Node body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Node, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_node" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_node`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Node', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def create_persistent_volume(self, body, **kwargs): # noqa: E501
|
|
"""create_persistent_volume # noqa: E501
|
|
|
|
create a PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_persistent_volume(body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param V1PersistentVolume body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.create_persistent_volume_with_http_info(body, **kwargs) # noqa: E501
|
|
|
|
def create_persistent_volume_with_http_info(self, body, **kwargs): # noqa: E501
|
|
"""create_persistent_volume # noqa: E501
|
|
|
|
create a PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.create_persistent_volume_with_http_info(body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param V1PersistentVolume body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method create_persistent_volume" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `create_persistent_volume`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/persistentvolumes', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_collection_namespaced_config_map(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_config_map # noqa: E501
|
|
|
|
delete collection of ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_config_map(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_collection_namespaced_config_map_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_collection_namespaced_config_map_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_config_map # noqa: E501
|
|
|
|
delete collection of ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_config_map_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'_continue',
|
|
'dry_run',
|
|
'field_selector',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'label_selector',
|
|
'limit',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_collection_namespaced_config_map" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_config_map`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/configmaps', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_collection_namespaced_endpoints(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_endpoints # noqa: E501
|
|
|
|
delete collection of Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_endpoints(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_collection_namespaced_endpoints_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_collection_namespaced_endpoints_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_endpoints # noqa: E501
|
|
|
|
delete collection of Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_endpoints_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'_continue',
|
|
'dry_run',
|
|
'field_selector',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'label_selector',
|
|
'limit',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_collection_namespaced_endpoints" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_endpoints`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/endpoints', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_collection_namespaced_event(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_event # noqa: E501
|
|
|
|
delete collection of Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_event(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_collection_namespaced_event_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_event # noqa: E501
|
|
|
|
delete collection of Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_event_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'_continue',
|
|
'dry_run',
|
|
'field_selector',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'label_selector',
|
|
'limit',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_collection_namespaced_event" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_event`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/events', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_collection_namespaced_limit_range(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_limit_range # noqa: E501
|
|
|
|
delete collection of LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_limit_range(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_collection_namespaced_limit_range_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_collection_namespaced_limit_range_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_limit_range # noqa: E501
|
|
|
|
delete collection of LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_limit_range_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'_continue',
|
|
'dry_run',
|
|
'field_selector',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'label_selector',
|
|
'limit',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_collection_namespaced_limit_range" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_limit_range`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/limitranges', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_collection_namespaced_persistent_volume_claim(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_persistent_volume_claim # noqa: E501
|
|
|
|
delete collection of PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_persistent_volume_claim(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_collection_namespaced_persistent_volume_claim_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_collection_namespaced_persistent_volume_claim_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_persistent_volume_claim # noqa: E501
|
|
|
|
delete collection of PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_persistent_volume_claim_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'_continue',
|
|
'dry_run',
|
|
'field_selector',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'label_selector',
|
|
'limit',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_collection_namespaced_persistent_volume_claim" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_persistent_volume_claim`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/persistentvolumeclaims', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_collection_namespaced_pod(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_pod # noqa: E501
|
|
|
|
delete collection of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_pod(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_collection_namespaced_pod_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_collection_namespaced_pod_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_pod # noqa: E501
|
|
|
|
delete collection of Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_pod_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'_continue',
|
|
'dry_run',
|
|
'field_selector',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'label_selector',
|
|
'limit',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_collection_namespaced_pod" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_pod`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_collection_namespaced_pod_template(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_pod_template # noqa: E501
|
|
|
|
delete collection of PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_pod_template(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_collection_namespaced_pod_template_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_collection_namespaced_pod_template_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_pod_template # noqa: E501
|
|
|
|
delete collection of PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_pod_template_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'_continue',
|
|
'dry_run',
|
|
'field_selector',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'label_selector',
|
|
'limit',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_collection_namespaced_pod_template" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_pod_template`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/podtemplates', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_collection_namespaced_replication_controller(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_replication_controller # noqa: E501
|
|
|
|
delete collection of ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_replication_controller(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_collection_namespaced_replication_controller_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_collection_namespaced_replication_controller_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_replication_controller # noqa: E501
|
|
|
|
delete collection of ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_replication_controller_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'_continue',
|
|
'dry_run',
|
|
'field_selector',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'label_selector',
|
|
'limit',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_collection_namespaced_replication_controller" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_replication_controller`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/replicationcontrollers', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_collection_namespaced_resource_quota(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_resource_quota # noqa: E501
|
|
|
|
delete collection of ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_resource_quota(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_collection_namespaced_resource_quota_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_collection_namespaced_resource_quota_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_resource_quota # noqa: E501
|
|
|
|
delete collection of ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_resource_quota_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'_continue',
|
|
'dry_run',
|
|
'field_selector',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'label_selector',
|
|
'limit',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_collection_namespaced_resource_quota" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_quota`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/resourcequotas', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_collection_namespaced_secret(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_secret # noqa: E501
|
|
|
|
delete collection of Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_secret(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_collection_namespaced_secret_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_collection_namespaced_secret_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_secret # noqa: E501
|
|
|
|
delete collection of Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_secret_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'_continue',
|
|
'dry_run',
|
|
'field_selector',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'label_selector',
|
|
'limit',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_collection_namespaced_secret" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_secret`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/secrets', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_collection_namespaced_service(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_service # noqa: E501
|
|
|
|
delete collection of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_service(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_collection_namespaced_service_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_collection_namespaced_service_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_service # noqa: E501
|
|
|
|
delete collection of Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_service_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'_continue',
|
|
'dry_run',
|
|
'field_selector',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'label_selector',
|
|
'limit',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_collection_namespaced_service" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_service`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_collection_namespaced_service_account(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_service_account # noqa: E501
|
|
|
|
delete collection of ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_service_account(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_collection_namespaced_service_account_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_collection_namespaced_service_account_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""delete_collection_namespaced_service_account # noqa: E501
|
|
|
|
delete collection of ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_namespaced_service_account_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'_continue',
|
|
'dry_run',
|
|
'field_selector',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'label_selector',
|
|
'limit',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_collection_namespaced_service_account" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_service_account`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/serviceaccounts', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_collection_node(self, **kwargs): # noqa: E501
|
|
"""delete_collection_node # noqa: E501
|
|
|
|
delete collection of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_node(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_collection_node_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def delete_collection_node_with_http_info(self, **kwargs): # noqa: E501
|
|
"""delete_collection_node # noqa: E501
|
|
|
|
delete collection of Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_node_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'pretty',
|
|
'_continue',
|
|
'dry_run',
|
|
'field_selector',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'label_selector',
|
|
'limit',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_collection_node" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_collection_persistent_volume(self, **kwargs): # noqa: E501
|
|
"""delete_collection_persistent_volume # noqa: E501
|
|
|
|
delete collection of PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_persistent_volume(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_collection_persistent_volume_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def delete_collection_persistent_volume_with_http_info(self, **kwargs): # noqa: E501
|
|
"""delete_collection_persistent_volume # noqa: E501
|
|
|
|
delete collection of PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_collection_persistent_volume_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'pretty',
|
|
'_continue',
|
|
'dry_run',
|
|
'field_selector',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'label_selector',
|
|
'limit',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_collection_persistent_volume" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/persistentvolumes', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_namespace(self, name, **kwargs): # noqa: E501
|
|
"""delete_namespace # noqa: E501
|
|
|
|
delete a Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespace(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_namespace_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def delete_namespace_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""delete_namespace # noqa: E501
|
|
|
|
delete a Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespace_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_namespace" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_namespace`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_namespaced_config_map(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_config_map # noqa: E501
|
|
|
|
delete a ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_config_map(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_namespaced_config_map_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_namespaced_config_map_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_config_map # noqa: E501
|
|
|
|
delete a ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_config_map_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_namespaced_config_map" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_config_map`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_config_map`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/configmaps/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_namespaced_endpoints(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_endpoints # noqa: E501
|
|
|
|
delete Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_endpoints(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_namespaced_endpoints_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_endpoints # noqa: E501
|
|
|
|
delete Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_endpoints_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_namespaced_endpoints" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_endpoints`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_endpoints`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/endpoints/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_namespaced_event(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_event # noqa: E501
|
|
|
|
delete an Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_event(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_namespaced_event_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_event # noqa: E501
|
|
|
|
delete an Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_event_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_namespaced_event" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_event`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_event`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/events/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_namespaced_limit_range(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_limit_range # noqa: E501
|
|
|
|
delete a LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_limit_range(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_namespaced_limit_range_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_limit_range # noqa: E501
|
|
|
|
delete a LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_limit_range_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_namespaced_limit_range" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_limit_range`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_limit_range`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/limitranges/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_namespaced_persistent_volume_claim(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_persistent_volume_claim # noqa: E501
|
|
|
|
delete a PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_persistent_volume_claim(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_namespaced_persistent_volume_claim_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_namespaced_persistent_volume_claim_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_persistent_volume_claim # noqa: E501
|
|
|
|
delete a PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_persistent_volume_claim_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_namespaced_persistent_volume_claim" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_persistent_volume_claim`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_persistent_volume_claim`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_namespaced_pod(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_pod # noqa: E501
|
|
|
|
delete a Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_pod(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_namespaced_pod_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_pod # noqa: E501
|
|
|
|
delete a Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_pod_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_namespaced_pod" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_pod`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_pod`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_namespaced_pod_template(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_pod_template # noqa: E501
|
|
|
|
delete a PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_pod_template(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PodTemplate
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_namespaced_pod_template_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_namespaced_pod_template_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_pod_template # noqa: E501
|
|
|
|
delete a PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_pod_template_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_namespaced_pod_template" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_pod_template`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_pod_template`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/podtemplates/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodTemplate', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_namespaced_replication_controller(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_replication_controller # noqa: E501
|
|
|
|
delete a ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_replication_controller(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_namespaced_replication_controller_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_namespaced_replication_controller_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_replication_controller # noqa: E501
|
|
|
|
delete a ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_replication_controller_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_namespaced_replication_controller" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_replication_controller`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_replication_controller`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/replicationcontrollers/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_namespaced_resource_quota(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_resource_quota # noqa: E501
|
|
|
|
delete a ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_resource_quota(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_namespaced_resource_quota_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_namespaced_resource_quota_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_resource_quota # noqa: E501
|
|
|
|
delete a ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_resource_quota_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_namespaced_resource_quota" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_quota`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_quota`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/resourcequotas/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_namespaced_secret(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_secret # noqa: E501
|
|
|
|
delete a Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_secret(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_namespaced_secret_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_secret # noqa: E501
|
|
|
|
delete a Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_secret_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_namespaced_secret" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_secret`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_secret`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/secrets/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_namespaced_service(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_service # noqa: E501
|
|
|
|
delete a Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_service(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_namespaced_service_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_namespaced_service_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_service # noqa: E501
|
|
|
|
delete a Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_service_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_namespaced_service" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_service`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_service`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_namespaced_service_account(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_service_account # noqa: E501
|
|
|
|
delete a ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_service_account(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ServiceAccount
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_namespaced_service_account_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def delete_namespaced_service_account_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""delete_namespaced_service_account # noqa: E501
|
|
|
|
delete a ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_namespaced_service_account_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_namespaced_service_account" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_service_account`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_service_account`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/serviceaccounts/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceAccount', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_node(self, name, **kwargs): # noqa: E501
|
|
"""delete_node # noqa: E501
|
|
|
|
delete a Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_node(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Node (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Status
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_node_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def delete_node_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""delete_node # noqa: E501
|
|
|
|
delete a Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_node_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Node (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_node" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_node`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Status', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def delete_persistent_volume(self, name, **kwargs): # noqa: E501
|
|
"""delete_persistent_volume # noqa: E501
|
|
|
|
delete a PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_persistent_volume(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.delete_persistent_volume_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def delete_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""delete_persistent_volume # noqa: E501
|
|
|
|
delete a PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.delete_persistent_volume_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
: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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
|
|
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
|
|
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
|
|
:param V1DeleteOptions body:
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'pretty',
|
|
'dry_run',
|
|
'grace_period_seconds',
|
|
'ignore_store_read_error_with_cluster_breaking_potential',
|
|
'orphan_dependents',
|
|
'propagation_policy',
|
|
'body'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method delete_persistent_volume" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `delete_persistent_volume`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
|
|
query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
|
|
if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
|
|
query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
|
|
if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
|
|
query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
|
|
if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
|
|
query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/persistentvolumes/{name}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def get_api_resources(self, **kwargs): # noqa: E501
|
|
"""get_api_resources # noqa: E501
|
|
|
|
get available resources # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.get_api_resources(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1APIResourceList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.get_api_resources_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def get_api_resources_with_http_info(self, **kwargs): # noqa: E501
|
|
"""get_api_resources # noqa: E501
|
|
|
|
get available resources # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.get_api_resources_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method get_api_resources" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
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', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1APIResourceList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_component_status(self, **kwargs): # noqa: E501
|
|
"""list_component_status # noqa: E501
|
|
|
|
list objects of kind ComponentStatus # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_component_status(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ComponentStatusList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_component_status_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_component_status_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_component_status # noqa: E501
|
|
|
|
list objects of kind ComponentStatus # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_component_status_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ComponentStatusList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'pretty',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_component_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/componentstatuses', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ComponentStatusList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_config_map_for_all_namespaces(self, **kwargs): # noqa: E501
|
|
"""list_config_map_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_config_map_for_all_namespaces(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ConfigMapList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_config_map_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_config_map_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_config_map_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_config_map_for_all_namespaces_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ConfigMapList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'pretty',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_config_map_for_all_namespaces" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/configmaps', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ConfigMapList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_endpoints_for_all_namespaces(self, **kwargs): # noqa: E501
|
|
"""list_endpoints_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_endpoints_for_all_namespaces(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1EndpointsList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_endpoints_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_endpoints_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_endpoints_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_endpoints_for_all_namespaces_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1EndpointsList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'pretty',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_endpoints_for_all_namespaces" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/endpoints', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1EndpointsList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_event_for_all_namespaces(self, **kwargs): # noqa: E501
|
|
"""list_event_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_event_for_all_namespaces(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: CoreV1EventList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_event_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_event_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_event_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_event_for_all_namespaces_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(CoreV1EventList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'pretty',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_event_for_all_namespaces" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/events', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='CoreV1EventList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_limit_range_for_all_namespaces(self, **kwargs): # noqa: E501
|
|
"""list_limit_range_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_limit_range_for_all_namespaces(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1LimitRangeList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_limit_range_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_limit_range_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_limit_range_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_limit_range_for_all_namespaces_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1LimitRangeList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'pretty',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_limit_range_for_all_namespaces" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/limitranges', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1LimitRangeList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_namespace(self, **kwargs): # noqa: E501
|
|
"""list_namespace # noqa: E501
|
|
|
|
list or watch objects of kind Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespace(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1NamespaceList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_namespace_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_namespace_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_namespace # noqa: E501
|
|
|
|
list or watch objects of kind Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespace_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1NamespaceList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_namespace" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1NamespaceList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_namespaced_config_map(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_config_map # noqa: E501
|
|
|
|
list or watch objects of kind ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_config_map(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ConfigMapList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_namespaced_config_map_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def list_namespaced_config_map_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_config_map # noqa: E501
|
|
|
|
list or watch objects of kind ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_config_map_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ConfigMapList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_namespaced_config_map" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_config_map`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/configmaps', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ConfigMapList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_namespaced_endpoints(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_endpoints # noqa: E501
|
|
|
|
list or watch objects of kind Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_endpoints(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1EndpointsList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_namespaced_endpoints_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def list_namespaced_endpoints_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_endpoints # noqa: E501
|
|
|
|
list or watch objects of kind Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_endpoints_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1EndpointsList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_namespaced_endpoints" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_endpoints`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/endpoints', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1EndpointsList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_namespaced_event(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_event # noqa: E501
|
|
|
|
list or watch objects of kind Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_event(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: CoreV1EventList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_namespaced_event_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_event # noqa: E501
|
|
|
|
list or watch objects of kind Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_event_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(CoreV1EventList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_namespaced_event" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_event`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/events', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='CoreV1EventList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_namespaced_limit_range(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_limit_range # noqa: E501
|
|
|
|
list or watch objects of kind LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_limit_range(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1LimitRangeList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_namespaced_limit_range_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def list_namespaced_limit_range_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_limit_range # noqa: E501
|
|
|
|
list or watch objects of kind LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_limit_range_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1LimitRangeList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_namespaced_limit_range" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_limit_range`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/limitranges', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1LimitRangeList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_namespaced_persistent_volume_claim(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_persistent_volume_claim # noqa: E501
|
|
|
|
list or watch objects of kind PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_persistent_volume_claim(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolumeClaimList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_namespaced_persistent_volume_claim_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def list_namespaced_persistent_volume_claim_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_persistent_volume_claim # noqa: E501
|
|
|
|
list or watch objects of kind PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_persistent_volume_claim_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolumeClaimList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_namespaced_persistent_volume_claim" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_persistent_volume_claim`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/persistentvolumeclaims', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaimList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_namespaced_pod(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_pod # noqa: E501
|
|
|
|
list or watch objects of kind Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_pod(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PodList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_namespaced_pod_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def list_namespaced_pod_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_pod # noqa: E501
|
|
|
|
list or watch objects of kind Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_pod_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PodList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_namespaced_pod" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_pod`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_namespaced_pod_template(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_pod_template # noqa: E501
|
|
|
|
list or watch objects of kind PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_pod_template(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PodTemplateList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_namespaced_pod_template_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def list_namespaced_pod_template_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_pod_template # noqa: E501
|
|
|
|
list or watch objects of kind PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_pod_template_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PodTemplateList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_namespaced_pod_template" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_pod_template`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/podtemplates', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodTemplateList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_namespaced_replication_controller(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_replication_controller # noqa: E501
|
|
|
|
list or watch objects of kind ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_replication_controller(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ReplicationControllerList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_namespaced_replication_controller_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def list_namespaced_replication_controller_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_replication_controller # noqa: E501
|
|
|
|
list or watch objects of kind ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_replication_controller_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ReplicationControllerList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_namespaced_replication_controller" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_replication_controller`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/replicationcontrollers', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationControllerList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_namespaced_resource_quota(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_resource_quota # noqa: E501
|
|
|
|
list or watch objects of kind ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_resource_quota(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ResourceQuotaList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_namespaced_resource_quota_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def list_namespaced_resource_quota_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_resource_quota # noqa: E501
|
|
|
|
list or watch objects of kind ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_resource_quota_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ResourceQuotaList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_namespaced_resource_quota" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_quota`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/resourcequotas', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuotaList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_namespaced_secret(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_secret # noqa: E501
|
|
|
|
list or watch objects of kind Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_secret(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1SecretList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_namespaced_secret_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def list_namespaced_secret_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_secret # noqa: E501
|
|
|
|
list or watch objects of kind Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_secret_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1SecretList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_namespaced_secret" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_secret`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/secrets', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1SecretList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_namespaced_service(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_service # noqa: E501
|
|
|
|
list or watch objects of kind Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_service(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ServiceList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_namespaced_service_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def list_namespaced_service_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_service # noqa: E501
|
|
|
|
list or watch objects of kind Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_service_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ServiceList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_namespaced_service" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_service`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_namespaced_service_account(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_service_account # noqa: E501
|
|
|
|
list or watch objects of kind ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_service_account(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ServiceAccountList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_namespaced_service_account_with_http_info(namespace, **kwargs) # noqa: E501
|
|
|
|
def list_namespaced_service_account_with_http_info(self, namespace, **kwargs): # noqa: E501
|
|
"""list_namespaced_service_account # noqa: E501
|
|
|
|
list or watch objects of kind ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_namespaced_service_account_with_http_info(namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ServiceAccountList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'namespace',
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_namespaced_service_account" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_service_account`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/serviceaccounts', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceAccountList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_node(self, **kwargs): # noqa: E501
|
|
"""list_node # noqa: E501
|
|
|
|
list or watch objects of kind Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_node(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1NodeList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_node_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_node_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_node # noqa: E501
|
|
|
|
list or watch objects of kind Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_node_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1NodeList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_node" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1NodeList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_persistent_volume(self, **kwargs): # noqa: E501
|
|
"""list_persistent_volume # noqa: E501
|
|
|
|
list or watch objects of kind PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_persistent_volume(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolumeList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_persistent_volume_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_persistent_volume_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_persistent_volume # noqa: E501
|
|
|
|
list or watch objects of kind PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_persistent_volume_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolumeList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'pretty',
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_persistent_volume" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/persistentvolumes', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_persistent_volume_claim_for_all_namespaces(self, **kwargs): # noqa: E501
|
|
"""list_persistent_volume_claim_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_persistent_volume_claim_for_all_namespaces(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolumeClaimList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_persistent_volume_claim_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_persistent_volume_claim_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_persistent_volume_claim_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_persistent_volume_claim_for_all_namespaces_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolumeClaimList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'pretty',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_persistent_volume_claim_for_all_namespaces" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/persistentvolumeclaims', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaimList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_pod_for_all_namespaces(self, **kwargs): # noqa: E501
|
|
"""list_pod_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_pod_for_all_namespaces(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PodList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_pod_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_pod_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_pod_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_pod_for_all_namespaces_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PodList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'pretty',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_pod_for_all_namespaces" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/pods', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_pod_template_for_all_namespaces(self, **kwargs): # noqa: E501
|
|
"""list_pod_template_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_pod_template_for_all_namespaces(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PodTemplateList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_pod_template_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_pod_template_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_pod_template_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_pod_template_for_all_namespaces_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PodTemplateList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'pretty',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_pod_template_for_all_namespaces" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/podtemplates', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodTemplateList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_replication_controller_for_all_namespaces(self, **kwargs): # noqa: E501
|
|
"""list_replication_controller_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_replication_controller_for_all_namespaces(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ReplicationControllerList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_replication_controller_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_replication_controller_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_replication_controller_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_replication_controller_for_all_namespaces_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ReplicationControllerList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'pretty',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_replication_controller_for_all_namespaces" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/replicationcontrollers', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationControllerList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_resource_quota_for_all_namespaces(self, **kwargs): # noqa: E501
|
|
"""list_resource_quota_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_resource_quota_for_all_namespaces(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ResourceQuotaList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_resource_quota_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_resource_quota_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_resource_quota_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_resource_quota_for_all_namespaces_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ResourceQuotaList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'pretty',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_resource_quota_for_all_namespaces" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/resourcequotas', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuotaList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_secret_for_all_namespaces(self, **kwargs): # noqa: E501
|
|
"""list_secret_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_secret_for_all_namespaces(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1SecretList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_secret_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_secret_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_secret_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_secret_for_all_namespaces_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1SecretList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'pretty',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_secret_for_all_namespaces" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/secrets', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1SecretList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_service_account_for_all_namespaces(self, **kwargs): # noqa: E501
|
|
"""list_service_account_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_service_account_for_all_namespaces(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ServiceAccountList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_service_account_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_service_account_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_service_account_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_service_account_for_all_namespaces_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ServiceAccountList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'pretty',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_service_account_for_all_namespaces" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/serviceaccounts', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceAccountList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def list_service_for_all_namespaces(self, **kwargs): # noqa: E501
|
|
"""list_service_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_service_for_all_namespaces(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ServiceList
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.list_service_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
|
|
|
|
def list_service_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
|
|
"""list_service_for_all_namespaces # noqa: E501
|
|
|
|
list or watch objects of kind Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.list_service_for_all_namespaces_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
|
|
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
: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 int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
|
|
:param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
|
|
:param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ServiceList, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'allow_watch_bookmarks',
|
|
'_continue',
|
|
'field_selector',
|
|
'label_selector',
|
|
'limit',
|
|
'pretty',
|
|
'resource_version',
|
|
'resource_version_match',
|
|
'send_initial_events',
|
|
'timeout_seconds',
|
|
'watch'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method list_service_for_all_namespaces" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
|
|
query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
|
|
if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
|
|
query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
|
|
if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
|
|
query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
|
|
if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
|
|
query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
|
|
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
|
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
|
|
if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
|
|
query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
|
|
if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
|
|
query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
|
|
if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
|
|
query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
|
|
if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
|
|
query_params.append(('watch', local_var_params['watch'])) # noqa: E501
|
|
|
|
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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/services', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceList', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespace(self, name, body, **kwargs): # noqa: E501
|
|
"""patch_namespace # noqa: E501
|
|
|
|
partially update the specified Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespace(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespace_with_http_info(name, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespace_with_http_info(self, name, body, **kwargs): # noqa: E501
|
|
"""patch_namespace # noqa: E501
|
|
|
|
partially update the specified Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespace_with_http_info(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespace" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespace`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespace`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespace_status(self, name, body, **kwargs): # noqa: E501
|
|
"""patch_namespace_status # noqa: E501
|
|
|
|
partially update status of the specified Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespace_status(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespace_status_with_http_info(name, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespace_status_with_http_info(self, name, body, **kwargs): # noqa: E501
|
|
"""patch_namespace_status # noqa: E501
|
|
|
|
partially update status of the specified Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespace_status_with_http_info(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespace_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespace_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespace_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{name}/status', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_config_map(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_config_map # noqa: E501
|
|
|
|
partially update the specified ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_config_map(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ConfigMap (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ConfigMap
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_config_map_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_config_map_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_config_map # noqa: E501
|
|
|
|
partially update the specified ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_config_map_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ConfigMap (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_config_map" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_config_map`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_config_map`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_config_map`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/configmaps/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ConfigMap', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_endpoints(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_endpoints # noqa: E501
|
|
|
|
partially update the specified Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_endpoints(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Endpoints (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Endpoints
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_endpoints_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_endpoints_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_endpoints # noqa: E501
|
|
|
|
partially update the specified Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_endpoints_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Endpoints (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_endpoints" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_endpoints`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_endpoints`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_endpoints`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/endpoints/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Endpoints', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_event(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_event # noqa: E501
|
|
|
|
partially update the specified Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_event(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Event (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: CoreV1Event
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_event_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_event # noqa: E501
|
|
|
|
partially update the specified Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_event_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Event (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_event" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_event`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_event`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_event`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/events/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='CoreV1Event', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_limit_range(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_limit_range # noqa: E501
|
|
|
|
partially update the specified LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_limit_range(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the LimitRange (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1LimitRange
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_limit_range_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_limit_range_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_limit_range # noqa: E501
|
|
|
|
partially update the specified LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_limit_range_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the LimitRange (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_limit_range" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_limit_range`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_limit_range`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_limit_range`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/limitranges/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1LimitRange', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_persistent_volume_claim(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_persistent_volume_claim # noqa: E501
|
|
|
|
partially update the specified PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_persistent_volume_claim(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_persistent_volume_claim_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_persistent_volume_claim # noqa: E501
|
|
|
|
partially update the specified PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_persistent_volume_claim" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_persistent_volume_claim`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_persistent_volume_claim`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_persistent_volume_claim`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_persistent_volume_claim_status(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_persistent_volume_claim_status # noqa: E501
|
|
|
|
partially update status of the specified PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_persistent_volume_claim_status(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_persistent_volume_claim_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_persistent_volume_claim_status # noqa: E501
|
|
|
|
partially update status of the specified PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolumeClaim (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_persistent_volume_claim_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_persistent_volume_claim_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_persistent_volume_claim_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_persistent_volume_claim_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_pod(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_pod # noqa: E501
|
|
|
|
partially update the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_pod(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_pod_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_pod # noqa: E501
|
|
|
|
partially update the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_pod_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_pod" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_pod_ephemeralcontainers(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_pod_ephemeralcontainers # noqa: E501
|
|
|
|
partially update ephemeralcontainers of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_pod_ephemeralcontainers(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_pod_ephemeralcontainers_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_pod_ephemeralcontainers # noqa: E501
|
|
|
|
partially update ephemeralcontainers of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_pod_ephemeralcontainers_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_pod_ephemeralcontainers" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_ephemeralcontainers`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_ephemeralcontainers`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_ephemeralcontainers`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_pod_resize(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_pod_resize # noqa: E501
|
|
|
|
partially update resize of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_pod_resize(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_pod_resize_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_pod_resize_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_pod_resize # noqa: E501
|
|
|
|
partially update resize of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_pod_resize_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_pod_resize" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_resize`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_resize`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_resize`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/resize', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_pod_status(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_pod_status # noqa: E501
|
|
|
|
partially update status of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_pod_status(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_pod_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_pod_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_pod_status # noqa: E501
|
|
|
|
partially update status of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_pod_status_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Pod (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_pod_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/status', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_pod_template(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_pod_template # noqa: E501
|
|
|
|
partially update the specified PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_pod_template(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodTemplate (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PodTemplate
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_pod_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_pod_template_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_pod_template # noqa: E501
|
|
|
|
partially update the specified PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_pod_template_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PodTemplate (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_pod_template" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_template`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_template`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_template`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/podtemplates/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodTemplate', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_replication_controller(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_replication_controller # noqa: E501
|
|
|
|
partially update the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_replication_controller(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_replication_controller_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_replication_controller_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_replication_controller # noqa: E501
|
|
|
|
partially update the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_replication_controller_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_replication_controller" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_replication_controller`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replication_controller`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_replication_controller`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/replicationcontrollers/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationController', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_replication_controller_scale(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_replication_controller_scale # noqa: E501
|
|
|
|
partially update scale of the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_replication_controller_scale(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Scale (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Scale
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_replication_controller_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_replication_controller_scale_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_replication_controller_scale # noqa: E501
|
|
|
|
partially update scale of the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_replication_controller_scale_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Scale (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_replication_controller_scale" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_replication_controller_scale`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replication_controller_scale`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_replication_controller_scale`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Scale', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_replication_controller_status(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_replication_controller_status # noqa: E501
|
|
|
|
partially update status of the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_replication_controller_status(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_replication_controller_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_replication_controller_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_replication_controller_status # noqa: E501
|
|
|
|
partially update status of the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_replication_controller_status_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ReplicationController (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_replication_controller_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_replication_controller_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replication_controller_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_replication_controller_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationController', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_resource_quota(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_resource_quota # noqa: E501
|
|
|
|
partially update the specified ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_resource_quota(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_resource_quota_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_resource_quota_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_resource_quota # noqa: E501
|
|
|
|
partially update the specified ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_resource_quota_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_resource_quota" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_quota`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_quota`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_quota`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/resourcequotas/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_resource_quota_status(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_resource_quota_status # noqa: E501
|
|
|
|
partially update status of the specified ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_resource_quota_status(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_resource_quota_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_resource_quota_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_resource_quota_status # noqa: E501
|
|
|
|
partially update status of the specified ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_resource_quota_status_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ResourceQuota (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_resource_quota_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_quota_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_quota_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_quota_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/resourcequotas/{name}/status', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_secret(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_secret # noqa: E501
|
|
|
|
partially update the specified Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_secret(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Secret (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Secret
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_secret_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_secret_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_secret # noqa: E501
|
|
|
|
partially update the specified Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_secret_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Secret (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_secret" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_secret`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_secret`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_secret`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/secrets/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Secret', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_service(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_service # noqa: E501
|
|
|
|
partially update the specified Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_service(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_service_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_service_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_service # noqa: E501
|
|
|
|
partially update the specified Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_service_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_service" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_service`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_service`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_service`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_service_account(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_service_account # noqa: E501
|
|
|
|
partially update the specified ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_service_account(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceAccount (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ServiceAccount
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_service_account_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_service_account_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_service_account # noqa: E501
|
|
|
|
partially update the specified ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_service_account_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ServiceAccount (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_service_account" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_service_account`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_service_account`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_service_account`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/serviceaccounts/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceAccount', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_namespaced_service_status(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_service_status # noqa: E501
|
|
|
|
partially update status of the specified Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_service_status(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_namespaced_service_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def patch_namespaced_service_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""patch_namespaced_service_status # noqa: E501
|
|
|
|
partially update status of the specified Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_namespaced_service_status_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Service (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_namespaced_service_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_service_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_service_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_service_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/status', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_node(self, name, body, **kwargs): # noqa: E501
|
|
"""patch_node # noqa: E501
|
|
|
|
partially update the specified Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_node(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Node (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_node_with_http_info(name, body, **kwargs) # noqa: E501
|
|
|
|
def patch_node_with_http_info(self, name, body, **kwargs): # noqa: E501
|
|
"""patch_node # noqa: E501
|
|
|
|
partially update the specified Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_node_with_http_info(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Node (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Node, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_node" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_node`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_node`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Node', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_node_status(self, name, body, **kwargs): # noqa: E501
|
|
"""patch_node_status # noqa: E501
|
|
|
|
partially update status of the specified Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_node_status(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Node (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_node_status_with_http_info(name, body, **kwargs) # noqa: E501
|
|
|
|
def patch_node_status_with_http_info(self, name, body, **kwargs): # noqa: E501
|
|
"""patch_node_status # noqa: E501
|
|
|
|
partially update status of the specified Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_node_status_with_http_info(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Node (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Node, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_node_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_node_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_node_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/status', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Node', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_persistent_volume(self, name, body, **kwargs): # noqa: E501
|
|
"""patch_persistent_volume # noqa: E501
|
|
|
|
partially update the specified PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_persistent_volume(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_persistent_volume_with_http_info(name, body, **kwargs) # noqa: E501
|
|
|
|
def patch_persistent_volume_with_http_info(self, name, body, **kwargs): # noqa: E501
|
|
"""patch_persistent_volume # noqa: E501
|
|
|
|
partially update the specified PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_persistent_volume_with_http_info(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_persistent_volume" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_persistent_volume`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_persistent_volume`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/persistentvolumes/{name}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def patch_persistent_volume_status(self, name, body, **kwargs): # noqa: E501
|
|
"""patch_persistent_volume_status # noqa: E501
|
|
|
|
partially update status of the specified PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_persistent_volume_status(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.patch_persistent_volume_status_with_http_info(name, body, **kwargs) # noqa: E501
|
|
|
|
def patch_persistent_volume_status_with_http_info(self, name, body, **kwargs): # noqa: E501
|
|
"""patch_persistent_volume_status # noqa: E501
|
|
|
|
partially update status of the specified PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.patch_persistent_volume_status_with_http_info(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param object body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'force'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method patch_persistent_volume_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `patch_persistent_volume_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `patch_persistent_volume_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
|
|
query_params.append(('force', local_var_params['force'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/persistentvolumes/{name}/status', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_component_status(self, name, **kwargs): # noqa: E501
|
|
"""read_component_status # noqa: E501
|
|
|
|
read the specified ComponentStatus # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_component_status(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ComponentStatus (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ComponentStatus
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_component_status_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def read_component_status_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""read_component_status # noqa: E501
|
|
|
|
read the specified ComponentStatus # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_component_status_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the ComponentStatus (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ComponentStatus, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_component_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_component_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/componentstatuses/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ComponentStatus', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespace(self, name, **kwargs): # noqa: E501
|
|
"""read_namespace # noqa: E501
|
|
|
|
read the specified Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespace(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespace_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def read_namespace_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""read_namespace # noqa: E501
|
|
|
|
read the specified Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespace_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespace" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespace`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespace_status(self, name, **kwargs): # noqa: E501
|
|
"""read_namespace_status # noqa: E501
|
|
|
|
read status of the specified Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespace_status(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespace_status_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def read_namespace_status_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""read_namespace_status # noqa: E501
|
|
|
|
read status of the specified Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespace_status_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespace_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespace_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{name}/status', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_config_map(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_config_map # noqa: E501
|
|
|
|
read the specified ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_config_map(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ConfigMap
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_config_map_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_config_map_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_config_map # noqa: E501
|
|
|
|
read the specified ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_config_map_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_config_map" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_config_map`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_config_map`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/configmaps/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ConfigMap', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_endpoints(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_endpoints # noqa: E501
|
|
|
|
read the specified Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_endpoints(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Endpoints
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_endpoints_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_endpoints # noqa: E501
|
|
|
|
read the specified Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_endpoints_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_endpoints" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_endpoints`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_endpoints`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/endpoints/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Endpoints', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_event(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_event # noqa: E501
|
|
|
|
read the specified Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_event(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: CoreV1Event
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_event_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_event # noqa: E501
|
|
|
|
read the specified Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_event_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_event" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_event`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_event`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/events/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='CoreV1Event', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_limit_range(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_limit_range # noqa: E501
|
|
|
|
read the specified LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_limit_range(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1LimitRange
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_limit_range_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_limit_range # noqa: E501
|
|
|
|
read the specified LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_limit_range_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_limit_range" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_limit_range`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_limit_range`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/limitranges/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1LimitRange', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_persistent_volume_claim(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_persistent_volume_claim # noqa: E501
|
|
|
|
read the specified PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_persistent_volume_claim(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_persistent_volume_claim_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_persistent_volume_claim_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_persistent_volume_claim # noqa: E501
|
|
|
|
read the specified PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_persistent_volume_claim_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_persistent_volume_claim" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_persistent_volume_claim`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_persistent_volume_claim`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_persistent_volume_claim_status(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_persistent_volume_claim_status # noqa: E501
|
|
|
|
read status of the specified PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_persistent_volume_claim_status(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_persistent_volume_claim_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_persistent_volume_claim_status # noqa: E501
|
|
|
|
read status of the specified PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_persistent_volume_claim_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_persistent_volume_claim_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_persistent_volume_claim_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_pod(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_pod # noqa: E501
|
|
|
|
read the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_pod(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_pod_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_pod # noqa: E501
|
|
|
|
read the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_pod_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_pod" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_pod_ephemeralcontainers(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_pod_ephemeralcontainers # noqa: E501
|
|
|
|
read ephemeralcontainers of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_pod_ephemeralcontainers(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_pod_ephemeralcontainers_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_pod_ephemeralcontainers # noqa: E501
|
|
|
|
read ephemeralcontainers of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_pod_ephemeralcontainers_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_pod_ephemeralcontainers" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_ephemeralcontainers`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_ephemeralcontainers`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_pod_log(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_pod_log # noqa: E501
|
|
|
|
read log of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_pod_log(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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 bool insecure_skip_tls_verify_backend: insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet).
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
: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 stream: Specify which container log stream to return to the client. Acceptable values are \"All\", \"Stdout\" and \"Stderr\". If not specified, \"All\" is used, and both stdout and stderr are returned interleaved. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\".
|
|
: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. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\".
|
|
:param bool timestamps: If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: str
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_pod_log_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_pod_log_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_pod_log # noqa: E501
|
|
|
|
read log of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_pod_log_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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 bool insecure_skip_tls_verify_backend: insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet).
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
: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 stream: Specify which container log stream to return to the client. Acceptable values are \"All\", \"Stdout\" and \"Stderr\". If not specified, \"All\" is used, and both stdout and stderr are returned interleaved. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\".
|
|
: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. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\".
|
|
:param bool timestamps: If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'container',
|
|
'follow',
|
|
'insecure_skip_tls_verify_backend',
|
|
'limit_bytes',
|
|
'pretty',
|
|
'previous',
|
|
'since_seconds',
|
|
'stream',
|
|
'tail_lines',
|
|
'timestamps'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_pod_log" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_log`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_log`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'container' in local_var_params and local_var_params['container'] is not None: # noqa: E501
|
|
query_params.append(('container', local_var_params['container'])) # noqa: E501
|
|
if 'follow' in local_var_params and local_var_params['follow'] is not None: # noqa: E501
|
|
query_params.append(('follow', local_var_params['follow'])) # noqa: E501
|
|
if 'insecure_skip_tls_verify_backend' in local_var_params and local_var_params['insecure_skip_tls_verify_backend'] is not None: # noqa: E501
|
|
query_params.append(('insecureSkipTLSVerifyBackend', local_var_params['insecure_skip_tls_verify_backend'])) # noqa: E501
|
|
if 'limit_bytes' in local_var_params and local_var_params['limit_bytes'] is not None: # noqa: E501
|
|
query_params.append(('limitBytes', local_var_params['limit_bytes'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'previous' in local_var_params and local_var_params['previous'] is not None: # noqa: E501
|
|
query_params.append(('previous', local_var_params['previous'])) # noqa: E501
|
|
if 'since_seconds' in local_var_params and local_var_params['since_seconds'] is not None: # noqa: E501
|
|
query_params.append(('sinceSeconds', local_var_params['since_seconds'])) # noqa: E501
|
|
if 'stream' in local_var_params and local_var_params['stream'] is not None: # noqa: E501
|
|
query_params.append(('stream', local_var_params['stream'])) # noqa: E501
|
|
if 'tail_lines' in local_var_params and local_var_params['tail_lines'] is not None: # noqa: E501
|
|
query_params.append(('tailLines', local_var_params['tail_lines'])) # noqa: E501
|
|
if 'timestamps' in local_var_params and local_var_params['timestamps'] is not None: # noqa: E501
|
|
query_params.append(('timestamps', local_var_params['timestamps'])) # noqa: E501
|
|
|
|
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', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/log', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='str', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_pod_resize(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_pod_resize # noqa: E501
|
|
|
|
read resize of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_pod_resize(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_pod_resize_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_pod_resize_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_pod_resize # noqa: E501
|
|
|
|
read resize of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_pod_resize_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_pod_resize" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_resize`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_resize`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/resize', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_pod_status(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_pod_status # noqa: E501
|
|
|
|
read status of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_pod_status(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_pod_status_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_pod_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_pod_status # noqa: E501
|
|
|
|
read status of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_pod_status_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_pod_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/status', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_pod_template(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_pod_template # noqa: E501
|
|
|
|
read the specified PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_pod_template(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PodTemplate
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_pod_template_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_pod_template_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_pod_template # noqa: E501
|
|
|
|
read the specified PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_pod_template_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_pod_template" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_template`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_template`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/podtemplates/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodTemplate', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_replication_controller(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_replication_controller # noqa: E501
|
|
|
|
read the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_replication_controller(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_replication_controller_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_replication_controller_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_replication_controller # noqa: E501
|
|
|
|
read the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_replication_controller_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_replication_controller" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_replication_controller`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_replication_controller`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/replicationcontrollers/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationController', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_replication_controller_scale(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_replication_controller_scale # noqa: E501
|
|
|
|
read scale of the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_replication_controller_scale(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Scale
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_replication_controller_scale_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_replication_controller_scale_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_replication_controller_scale # noqa: E501
|
|
|
|
read scale of the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_replication_controller_scale_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_replication_controller_scale" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_replication_controller_scale`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_replication_controller_scale`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Scale', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_replication_controller_status(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_replication_controller_status # noqa: E501
|
|
|
|
read status of the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_replication_controller_status(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_replication_controller_status_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_replication_controller_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_replication_controller_status # noqa: E501
|
|
|
|
read status of the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_replication_controller_status_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_replication_controller_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_replication_controller_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_replication_controller_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationController', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_resource_quota(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_resource_quota # noqa: E501
|
|
|
|
read the specified ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_resource_quota(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_resource_quota_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_resource_quota_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_resource_quota # noqa: E501
|
|
|
|
read the specified ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_resource_quota_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_resource_quota" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_quota`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_quota`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/resourcequotas/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_resource_quota_status(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_resource_quota_status # noqa: E501
|
|
|
|
read status of the specified ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_resource_quota_status(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_resource_quota_status_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_resource_quota_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_resource_quota_status # noqa: E501
|
|
|
|
read status of the specified ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_resource_quota_status_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_resource_quota_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_quota_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_quota_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/resourcequotas/{name}/status', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_secret(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_secret # noqa: E501
|
|
|
|
read the specified Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_secret(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Secret
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_secret_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_secret # noqa: E501
|
|
|
|
read the specified Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_secret_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_secret" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_secret`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_secret`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/secrets/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Secret', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_service(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_service # noqa: E501
|
|
|
|
read the specified Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_service(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_service_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_service_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_service # noqa: E501
|
|
|
|
read the specified Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_service_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_service" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_service`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_service`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_service_account(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_service_account # noqa: E501
|
|
|
|
read the specified ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_service_account(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ServiceAccount
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_service_account_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_service_account_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_service_account # noqa: E501
|
|
|
|
read the specified ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_service_account_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_service_account" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_service_account`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_service_account`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/serviceaccounts/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceAccount', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_namespaced_service_status(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_service_status # noqa: E501
|
|
|
|
read status of the specified Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_service_status(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_namespaced_service_status_with_http_info(name, namespace, **kwargs) # noqa: E501
|
|
|
|
def read_namespaced_service_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501
|
|
"""read_namespaced_service_status # noqa: E501
|
|
|
|
read status of the specified Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_namespaced_service_status_with_http_info(name, namespace, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_namespaced_service_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_service_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_service_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/status', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_node(self, name, **kwargs): # noqa: E501
|
|
"""read_node # noqa: E501
|
|
|
|
read the specified Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_node(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Node (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_node_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def read_node_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""read_node # noqa: E501
|
|
|
|
read the specified Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_node_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Node (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Node, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_node" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_node`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Node', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_node_status(self, name, **kwargs): # noqa: E501
|
|
"""read_node_status # noqa: E501
|
|
|
|
read status of the specified Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_node_status(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Node (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_node_status_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def read_node_status_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""read_node_status # noqa: E501
|
|
|
|
read status of the specified Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_node_status_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Node (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Node, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_node_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_node_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/status', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Node', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_persistent_volume(self, name, **kwargs): # noqa: E501
|
|
"""read_persistent_volume # noqa: E501
|
|
|
|
read the specified PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_persistent_volume(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_persistent_volume_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def read_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""read_persistent_volume # noqa: E501
|
|
|
|
read the specified PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_persistent_volume_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_persistent_volume" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_persistent_volume`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/persistentvolumes/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def read_persistent_volume_status(self, name, **kwargs): # noqa: E501
|
|
"""read_persistent_volume_status # noqa: E501
|
|
|
|
read status of the specified PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_persistent_volume_status(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.read_persistent_volume_status_with_http_info(name, **kwargs) # noqa: E501
|
|
|
|
def read_persistent_volume_status_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""read_persistent_volume_status # noqa: E501
|
|
|
|
read status of the specified PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.read_persistent_volume_status_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method read_persistent_volume_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `read_persistent_volume_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
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/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/persistentvolumes/{name}/status', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespace(self, name, body, **kwargs): # noqa: E501
|
|
"""replace_namespace # noqa: E501
|
|
|
|
replace the specified Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespace(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param V1Namespace body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespace_with_http_info(name, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespace_with_http_info(self, name, body, **kwargs): # noqa: E501
|
|
"""replace_namespace # noqa: E501
|
|
|
|
replace the specified Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespace_with_http_info(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param V1Namespace body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespace" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespace`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespace`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespace_finalize(self, name, body, **kwargs): # noqa: E501
|
|
"""replace_namespace_finalize # noqa: E501
|
|
|
|
replace finalize of the specified Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespace_finalize(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param V1Namespace body: (required)
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespace_finalize_with_http_info(name, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespace_finalize_with_http_info(self, name, body, **kwargs): # noqa: E501
|
|
"""replace_namespace_finalize # noqa: E501
|
|
|
|
replace finalize of the specified Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespace_finalize_with_http_info(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param V1Namespace body: (required)
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'body',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation',
|
|
'pretty'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespace_finalize" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespace_finalize`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespace_finalize`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{name}/finalize', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespace_status(self, name, body, **kwargs): # noqa: E501
|
|
"""replace_namespace_status # noqa: E501
|
|
|
|
replace status of the specified Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespace_status(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param V1Namespace body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Namespace
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespace_status_with_http_info(name, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespace_status_with_http_info(self, name, body, **kwargs): # noqa: E501
|
|
"""replace_namespace_status # noqa: E501
|
|
|
|
replace status of the specified Namespace # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespace_status_with_http_info(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Namespace (required)
|
|
:param V1Namespace body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespace_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespace_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespace_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{name}/status', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Namespace', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_config_map(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_config_map # noqa: E501
|
|
|
|
replace the specified ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_config_map(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ConfigMap
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_config_map_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_config_map_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_config_map # noqa: E501
|
|
|
|
replace the specified ConfigMap # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_config_map_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_config_map" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_config_map`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_config_map`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_config_map`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/configmaps/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ConfigMap', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_endpoints(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_endpoints # noqa: E501
|
|
|
|
replace the specified Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_endpoints(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Endpoints
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_endpoints_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_endpoints_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_endpoints # noqa: E501
|
|
|
|
replace the specified Endpoints # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_endpoints_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_endpoints" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_endpoints`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_endpoints`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_endpoints`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/endpoints/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Endpoints', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_event(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_event # noqa: E501
|
|
|
|
replace the specified Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_event(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Event (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param CoreV1Event body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: CoreV1Event
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_event_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_event # noqa: E501
|
|
|
|
replace the specified Event # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_event_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Event (required)
|
|
:param str namespace: object name and auth scope, such as for teams and projects (required)
|
|
:param CoreV1Event body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_event" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_event`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_event`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_event`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/events/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='CoreV1Event', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_limit_range(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_limit_range # noqa: E501
|
|
|
|
replace the specified LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_limit_range(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1LimitRange
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_limit_range_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_limit_range_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_limit_range # noqa: E501
|
|
|
|
replace the specified LimitRange # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_limit_range_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_limit_range" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_limit_range`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_limit_range`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_limit_range`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/limitranges/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1LimitRange', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_persistent_volume_claim(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_persistent_volume_claim # noqa: E501
|
|
|
|
replace the specified PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_persistent_volume_claim(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_persistent_volume_claim_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_persistent_volume_claim # noqa: E501
|
|
|
|
replace the specified PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_persistent_volume_claim" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_persistent_volume_claim`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_persistent_volume_claim`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_persistent_volume_claim`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_persistent_volume_claim_status(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_persistent_volume_claim_status # noqa: E501
|
|
|
|
replace status of the specified PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_persistent_volume_claim_status(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolumeClaim
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_persistent_volume_claim_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_persistent_volume_claim_status # noqa: E501
|
|
|
|
replace status of the specified PersistentVolumeClaim # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_persistent_volume_claim_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_persistent_volume_claim_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_persistent_volume_claim_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_persistent_volume_claim_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolumeClaim', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_pod(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_pod # noqa: E501
|
|
|
|
replace the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_pod(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_pod_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_pod # noqa: E501
|
|
|
|
replace the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_pod_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_pod" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_pod_ephemeralcontainers(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_pod_ephemeralcontainers # noqa: E501
|
|
|
|
replace ephemeralcontainers of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_pod_ephemeralcontainers(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_pod_ephemeralcontainers_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_pod_ephemeralcontainers # noqa: E501
|
|
|
|
replace ephemeralcontainers of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_pod_ephemeralcontainers_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_pod_ephemeralcontainers" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_ephemeralcontainers`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_ephemeralcontainers`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_ephemeralcontainers`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_pod_resize(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_pod_resize # noqa: E501
|
|
|
|
replace resize of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_pod_resize(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_pod_resize_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_pod_resize_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_pod_resize # noqa: E501
|
|
|
|
replace resize of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_pod_resize_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_pod_resize" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_resize`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_resize`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_resize`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/resize', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_pod_status(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_pod_status # noqa: E501
|
|
|
|
replace status of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_pod_status(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Pod
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_pod_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_pod_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_pod_status # noqa: E501
|
|
|
|
replace status of the specified Pod # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_pod_status_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_pod_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/pods/{name}/status', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Pod', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_pod_template(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_pod_template # noqa: E501
|
|
|
|
replace the specified PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_pod_template(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PodTemplate
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_pod_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_pod_template_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_pod_template # noqa: E501
|
|
|
|
replace the specified PodTemplate # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_pod_template_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_pod_template" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_template`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_template`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_template`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/podtemplates/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PodTemplate', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_replication_controller(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_replication_controller # noqa: E501
|
|
|
|
replace the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_replication_controller(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_replication_controller_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_replication_controller_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_replication_controller # noqa: E501
|
|
|
|
replace the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_replication_controller_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_replication_controller" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_replication_controller`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_replication_controller`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_replication_controller`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/replicationcontrollers/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationController', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_replication_controller_scale(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_replication_controller_scale # noqa: E501
|
|
|
|
replace scale of the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_replication_controller_scale(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Scale
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_replication_controller_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_replication_controller_scale_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_replication_controller_scale # noqa: E501
|
|
|
|
replace scale of the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_replication_controller_scale_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_replication_controller_scale" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_replication_controller_scale`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_replication_controller_scale`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_replication_controller_scale`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Scale', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_replication_controller_status(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_replication_controller_status # noqa: E501
|
|
|
|
replace status of the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_replication_controller_status(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ReplicationController
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_replication_controller_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_replication_controller_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_replication_controller_status # noqa: E501
|
|
|
|
replace status of the specified ReplicationController # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_replication_controller_status_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_replication_controller_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_replication_controller_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_replication_controller_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_replication_controller_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ReplicationController', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_resource_quota(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_resource_quota # noqa: E501
|
|
|
|
replace the specified ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_resource_quota(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_resource_quota_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_resource_quota_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_resource_quota # noqa: E501
|
|
|
|
replace the specified ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_resource_quota_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_resource_quota" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_quota`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_quota`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_quota`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/resourcequotas/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_resource_quota_status(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_resource_quota_status # noqa: E501
|
|
|
|
replace status of the specified ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_resource_quota_status(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ResourceQuota
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_resource_quota_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_resource_quota_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_resource_quota_status # noqa: E501
|
|
|
|
replace status of the specified ResourceQuota # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_resource_quota_status_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_resource_quota_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_quota_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_quota_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_quota_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/resourcequotas/{name}/status', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ResourceQuota', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_secret(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_secret # noqa: E501
|
|
|
|
replace the specified Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_secret(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Secret
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_secret_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_secret_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_secret # noqa: E501
|
|
|
|
replace the specified Secret # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_secret_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_secret" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_secret`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_secret`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_secret`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/secrets/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Secret', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_service(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_service # noqa: E501
|
|
|
|
replace the specified Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_service(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_service_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_service_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_service # noqa: E501
|
|
|
|
replace the specified Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_service_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_service" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_service`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_service`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_service`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_service_account(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_service_account # noqa: E501
|
|
|
|
replace the specified ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_service_account(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1ServiceAccount
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_service_account_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_service_account_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_service_account # noqa: E501
|
|
|
|
replace the specified ServiceAccount # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_service_account_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_service_account" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_service_account`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_service_account`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_service_account`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/serviceaccounts/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1ServiceAccount', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_namespaced_service_status(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_service_status # noqa: E501
|
|
|
|
replace status of the specified Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_service_status(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Service
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_namespaced_service_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501
|
|
|
|
def replace_namespaced_service_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
|
|
"""replace_namespaced_service_status # noqa: E501
|
|
|
|
replace status of the specified Service # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_namespaced_service_status_with_http_info(name, namespace, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
: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. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'namespace',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_namespaced_service_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_service_status`") # noqa: E501
|
|
# verify the required parameter 'namespace' is set
|
|
if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
|
|
local_var_params['namespace'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_service_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_service_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
if 'namespace' in local_var_params:
|
|
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/namespaces/{namespace}/services/{name}/status', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Service', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_node(self, name, body, **kwargs): # noqa: E501
|
|
"""replace_node # noqa: E501
|
|
|
|
replace the specified Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_node(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Node (required)
|
|
:param V1Node body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_node_with_http_info(name, body, **kwargs) # noqa: E501
|
|
|
|
def replace_node_with_http_info(self, name, body, **kwargs): # noqa: E501
|
|
"""replace_node # noqa: E501
|
|
|
|
replace the specified Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_node_with_http_info(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Node (required)
|
|
:param V1Node body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Node, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_node" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_node`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_node`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Node', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_node_status(self, name, body, **kwargs): # noqa: E501
|
|
"""replace_node_status # noqa: E501
|
|
|
|
replace status of the specified Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_node_status(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Node (required)
|
|
:param V1Node body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1Node
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_node_status_with_http_info(name, body, **kwargs) # noqa: E501
|
|
|
|
def replace_node_status_with_http_info(self, name, body, **kwargs): # noqa: E501
|
|
"""replace_node_status # noqa: E501
|
|
|
|
replace status of the specified Node # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_node_status_with_http_info(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the Node (required)
|
|
:param V1Node body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1Node, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_node_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_node_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_node_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/nodes/{name}/status', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1Node', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_persistent_volume(self, name, body, **kwargs): # noqa: E501
|
|
"""replace_persistent_volume # noqa: E501
|
|
|
|
replace the specified PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_persistent_volume(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param V1PersistentVolume body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_persistent_volume_with_http_info(name, body, **kwargs) # noqa: E501
|
|
|
|
def replace_persistent_volume_with_http_info(self, name, body, **kwargs): # noqa: E501
|
|
"""replace_persistent_volume # noqa: E501
|
|
|
|
replace the specified PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_persistent_volume_with_http_info(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param V1PersistentVolume body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_persistent_volume" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_persistent_volume`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_persistent_volume`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/persistentvolumes/{name}', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|
|
|
|
def replace_persistent_volume_status(self, name, body, **kwargs): # noqa: E501
|
|
"""replace_persistent_volume_status # noqa: E501
|
|
|
|
replace status of the specified PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_persistent_volume_status(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param V1PersistentVolume body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: V1PersistentVolume
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
return self.replace_persistent_volume_status_with_http_info(name, body, **kwargs) # noqa: E501
|
|
|
|
def replace_persistent_volume_status_with_http_info(self, name, body, **kwargs): # noqa: E501
|
|
"""replace_persistent_volume_status # noqa: E501
|
|
|
|
replace status of the specified PersistentVolume # noqa: E501
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.replace_persistent_volume_status_with_http_info(name, body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool: execute request asynchronously
|
|
:param str name: name of the PersistentVolume (required)
|
|
:param V1PersistentVolume body: (required)
|
|
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
|
|
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
|
|
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
|
|
:param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
|
|
:param _return_http_data_only: response data without head status code
|
|
and headers
|
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
be returned without reading/decoding response
|
|
data. Default is True.
|
|
:param _request_timeout: timeout setting for this request. If one
|
|
number provided, it will be total request
|
|
timeout. It can also be a pair (tuple) of
|
|
(connection, read) timeouts.
|
|
:return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict))
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
local_var_params = locals()
|
|
|
|
all_params = [
|
|
'name',
|
|
'body',
|
|
'pretty',
|
|
'dry_run',
|
|
'field_manager',
|
|
'field_validation'
|
|
]
|
|
all_params.extend(
|
|
[
|
|
'async_req',
|
|
'_return_http_data_only',
|
|
'_preload_content',
|
|
'_request_timeout'
|
|
]
|
|
)
|
|
|
|
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
if key not in all_params:
|
|
raise ApiTypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method replace_persistent_volume_status" % key
|
|
)
|
|
local_var_params[key] = val
|
|
del local_var_params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
|
local_var_params['name'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `name` when calling `replace_persistent_volume_status`") # noqa: E501
|
|
# verify the required parameter 'body' is set
|
|
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
|
local_var_params['body'] is None): # noqa: E501
|
|
raise ApiValueError("Missing the required parameter `body` when calling `replace_persistent_volume_status`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'name' in local_var_params:
|
|
path_params['name'] = local_var_params['name'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
|
|
query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
|
|
if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
|
|
query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
|
|
if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
|
|
query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
|
|
if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
|
|
query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in local_var_params:
|
|
body_params = local_var_params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = ['BearerToken'] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v1/persistentvolumes/{name}/status', 'PUT',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V1PersistentVolume', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=local_var_params.get('async_req'),
|
|
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
_preload_content=local_var_params.get('_preload_content', True),
|
|
_request_timeout=local_var_params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|